| 42 | import static gregapi.data.CS.*; |
| 43 | |
| 44 | public class ItemBlockBase extends ItemBlock implements IBlock, IItemGT { |
| 45 | public final IBlockBase mPlaceable; |
| 46 | |
| 47 | public ItemBlockBase(Block aBlock) { |
| 48 | super(aBlock); |
| 49 | mPlaceable = (IBlockBase)aBlock; |
| 50 | setMaxDamage(0); |
| 51 | setHasSubtypes(T); |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | @SuppressWarnings("unchecked") |
| 56 | public void addInformation(ItemStack aStack, EntityPlayer aPlayer, @SuppressWarnings("rawtypes") List aList, boolean aF3_H) { |
| 57 | super.addInformation(aStack, aPlayer, aList, aF3_H); |
| 58 | byte aMeta = UT.Code.bind4(ST.meta_(aStack)); |
| 59 | mPlaceable.addInformation(aStack, aMeta, aPlayer, aList, aF3_H); |
| 60 | if (field_150939_a.getCollisionBoundingBoxFromPool(aPlayer.worldObj, 0, 0, 0) != null) { |
| 61 | if (mPlaceable.doesWalkSpeed(aMeta)) aList.add(LH.Chat.CYAN + LH.get(LH.TOOLTIP_WALKSPEED)); |
| 62 | if (mPlaceable.canCreatureSpawn(aMeta)) { |
| 63 | if (ITexture.Util.OPTIFINE_LOADED && aMeta != 0 && !mPlaceable.canCreatureSpawn((byte)0)) { |
| 64 | aList.add(LH.Chat.BLINKING_RED + LH.get(Minecraft.getMinecraft().isSingleplayer() ? LH.TOOLTIP_SPAWNPROOF_SP_BUG : LH.TOOLTIP_SPAWNPROOF_MP_BUG )); |
| 65 | aList.add(LH.Chat.BLINKING_RED + LH.get(LH.TOOLTIP_SPAWNPROOF_OPTIFINE)); |
| 66 | } |
| 67 | } else { |
| 68 | if (ITexture.Util.OPTIFINE_LOADED && aMeta != 0 && mPlaceable.canCreatureSpawn((byte)0)) { |
| 69 | aList.add(LH.Chat.BLINKING_RED + LH.get(Minecraft.getMinecraft().isSingleplayer() ? LH.TOOLTIP_SPAWNPROOF_SP_BROKEN : LH.TOOLTIP_SPAWNPROOF_MP_BROKEN)); |
| 70 | aList.add(LH.Chat.BLINKING_RED + LH.get(LH.TOOLTIP_SPAWNPROOF_OPTIFINE)); |
| 71 | } else { |
| 72 | aList.add(LH.Chat.CYAN + LH.get(LH.TOOLTIP_SPAWNPROOF)); |
| 73 | } |
| 74 | } |
| 75 | if (MD.GC.mLoaded) { |
| 76 | byte tCount = 0; |
| 77 | for (byte tSide : ALL_SIDES_VALID) if (mPlaceable.isSealable(aMeta, tSide)) tCount++; |
| 78 | if (tCount >= 6) { |
| 79 | aList.add(LH.Chat.GREEN + LH.get(LH.TOOLTIP_SEALABLE_ANY)); |
| 80 | } else if (field_150939_a.isOpaqueCube()) { |
| 81 | aList.add(LH.Chat.ORANGE + LH.get(LH.TOOLTIP_SEALABLE_BUGGED)); |
| 82 | } else if (tCount > 0) { |
| 83 | aList.add(LH.Chat.YELLOW + LH.get(LH.TOOLTIP_SEALABLE_SOME)); |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | if (mPlaceable.useGravity(aMeta)) |
| 88 | aList.add(LH.Chat.ORANGE + LH.get(LH.TOOLTIP_GRAVITY)); |
| 89 | if (mPlaceable.doesPistonPush(aMeta)) |
| 90 | aList.add(LH.Chat.DGRAY + LH.get(LH.TOOLTIP_PISTONPUSHABLE)); |
| 91 | if (mPlaceable.isFlammable(aMeta) || mPlaceable.isFireSource(aMeta) || mPlaceable.getFlammability(aMeta) > 0) |
| 92 | aList.add(LH.Chat.RED + LH.get(LH.TOOLTIP_FLAMMABLE)); |
| 93 | float tResistance = mPlaceable.getExplosionResistance(aMeta); |
| 94 | if (tResistance >= 4) aList.add(LH.getToolTipBlastResistance(field_150939_a, tResistance)); |
| 95 | |
| 96 | aList.add(LH.getToolTipHarvest(field_150939_a.getMaterial(), field_150939_a.getHarvestTool(aMeta), field_150939_a.getHarvestLevel(aMeta))); |
| 97 | while (aList.remove(null)); |
| 98 | } |
| 99 | |
| 100 | @Override @SideOnly(Side.CLIENT) public CreativeTabs getCreativeTab() {return field_150939_a.getCreativeTabToDisplayOn();} |
| 101 | @Override public boolean func_150936_a(World aWorld, int aX, int aY, int aZ, int aSide, EntityPlayer aPlayer, ItemStack aStack) {return T;} |
nothing calls this directly
no outgoing calls
no test coverage detected