mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Rod of the Shifting Crust and a bunch of other tweaks to go along with it.
This commit is contained in:
1 parent
8989a12835
commit
4eeec9bd49
16 files changed
+693
-12
No files matched your search
@@ -43,14 +43,18 @@ public abstract class BlockCamo extends BlockModContainer<TileCamo> {
|
||||
if(tile instanceof TileCamo) {
|
||||
TileCamo camo = (TileCamo) tile;
|
||||
Block block = camo.camo;
|
||||
if(block != null && (block.isOpaqueCube() || isValidRenderType(block.getRenderType())))
|
||||
if(block != null && isValidBlock(block))
|
||||
return block.getIcon(side, camo.camoMeta);
|
||||
}
|
||||
|
||||
return getIconFromSideAfterCheck(tile, meta, side);
|
||||
}
|
||||
|
||||
public boolean isValidRenderType(int type) {
|
||||
public static boolean isValidBlock(Block block) {
|
||||
return block.isOpaqueCube() || isValidRenderType(block.getRenderType());
|
||||
}
|
||||
|
||||
public static boolean isValidRenderType(int type) {
|
||||
return validRenderTypes.contains(type);
|
||||
}
|
||||
|
||||
@@ -75,7 +79,7 @@ public abstract class BlockCamo extends BlockModContainer<TileCamo> {
|
||||
}
|
||||
|
||||
block = Block.getBlockFromItem(currentStack.getItem());
|
||||
if(block == null || !(isValidRenderType(block.getRenderType()) || block.isOpaqueCube()) || block instanceof BlockCamo || block.getMaterial() == Material.air)
|
||||
if(block == null || !isValidBlock(block) || block instanceof BlockCamo || block.getMaterial() == Material.air)
|
||||
doChange = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user