mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Vanilla override blocks now relay the registerIcons call to their originals. Should fix an issue with Witchery.
This commit is contained in:
1 parent
c1f9696ae0
commit
fb3a2097e1
3 files changed
+20
-4
No files matched your search
@@ -108,8 +108,8 @@ public final class ModBlocks {
|
||||
Block.blocksList[Block.plantYellow.blockID] = null;
|
||||
|
||||
new BlockSnowOverride(Block.snow.blockID).setHardness(0.1F).setStepSound(Block.soundSnowFootstep).setUnlocalizedName("snow").setLightOpacity(0).setTextureName("snow");
|
||||
new BlockFlowerOverride(Block.plantRed.blockID).setHardness(0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("rose").setTextureName("flower_rose");
|
||||
new BlockFlowerOverride(Block.plantYellow.blockID).setHardness(0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("flower").setTextureName("flower_dandelion");
|
||||
new BlockFlowerOverride(Block.plantRed).setHardness(0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("rose").setTextureName("flower_rose");
|
||||
new BlockFlowerOverride(Block.plantYellow).setHardness(0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("flower").setTextureName("flower_dandelion");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,22 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.vanilla;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
|
||||
public class BlockFlowerOverride extends BlockFlower {
|
||||
|
||||
public BlockFlowerOverride(int par1) {
|
||||
super(par1);
|
||||
Block original;
|
||||
|
||||
public BlockFlowerOverride(Block original) {
|
||||
super(original.blockID);
|
||||
this.original = original;
|
||||
}
|
||||
|
||||
public void registerIcons(net.minecraft.client.renderer.texture.IconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
original.registerIcons(par1IconRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
package vazkii.botania.common.block.vanilla;
|
||||
|
||||
import net.minecraft.block.BlockSnow;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockSnowOverride extends BlockSnow {
|
||||
@@ -22,6 +23,12 @@ public class BlockSnowOverride extends BlockSnow {
|
||||
super(par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
snow.registerIcons(par1IconRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
|
||||
if(forcedMeta != -1) {
|
||||
|
||||
Reference in new issue
Block a user