use of stevekung.mods.moreplanets.module.planets.chalos.tileentity.TileEntityCheeseSporeChest in project MorePlanets by SteveKunG.
the class BlockCheeseSporeChest method getLockableContainer.
@Override
public ILockableContainer getLockableContainer(World world, BlockPos pos) {
TileEntity tileentity = world.getTileEntity(pos);
if (!(tileentity instanceof TileEntityCheeseSporeChest)) {
return null;
} else {
Object object = tileentity;
if (this.isBlocked(world, pos)) {
return null;
} else {
Iterator iterator = EnumFacing.Plane.HORIZONTAL.iterator();
while (iterator.hasNext()) {
EnumFacing enumfacing = (EnumFacing) iterator.next();
BlockPos blockpos1 = pos.offset(enumfacing);
Block block = world.getBlockState(blockpos1).getBlock();
if (block == this) {
if (this.isBlocked(world, blockpos1)) {
return null;
}
TileEntity tileentity1 = world.getTileEntity(blockpos1);
if (tileentity1 instanceof TileEntityCheeseSporeChest) {
if (enumfacing != EnumFacing.WEST && enumfacing != EnumFacing.NORTH) {
object = new InventoryLargeChest(GCCoreUtil.translate("container.chestDouble"), (ILockableContainer) object, (TileEntityCheeseSporeChest) tileentity1);
} else {
object = new InventoryLargeChest(GCCoreUtil.translate("container.chestDouble"), (TileEntityCheeseSporeChest) tileentity1, (ILockableContainer) object);
}
}
}
}
return (ILockableContainer) object;
}
}
}
use of stevekung.mods.moreplanets.module.planets.chalos.tileentity.TileEntityCheeseSporeChest in project MorePlanets by SteveKunG.
the class TileEntityItemStackRendererMP method renderByItem.
@Override
public void renderByItem(ItemStack itemStack) {
Block block = Block.getBlockFromItem(itemStack.getItem());
if (block == DionaBlocks.DIONA_ANCIENT_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityDionaAncientChest());
} else if (block == DionaBlocks.DIONA_TREASURE_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityDionaTreasureChest());
} else if (block == ChalosBlocks.CHALOS_ANCIENT_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityChalosAncientChest());
} else if (block == ChalosBlocks.CHALOS_TREASURE_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityChalosTreasureChest());
} else if (block == DionaBlocks.ZELIUS_EGG) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityZeliusEgg());
GlStateManager.enableBlend();
} else if (block == DionaBlocks.LARGE_INFECTED_CRYSTALLIZE) {
TileEntityLargeInfectedCrystallizeRenderer.INSTANCE.render();
} else if (block == MPBlocks.DARK_ENERGY_RECEIVER) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityDarkEnergyReceiver());
} else if (itemStack.getItem() == DionaItems.INFECTED_CRYSTALLIZE_BOMB) {
RenderInfectedCrystallizeBomb.INSTANCE.render();
} else if (block == NibiruBlocks.NIBIRU_ANCIENT_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityNibiruAncientChest());
} else if (block == NibiruBlocks.NIBIRU_TREASURE_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityNibiruTreasureChest());
} else if (block == ChalosBlocks.CHEESE_SPORE_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityCheeseSporeChest());
} else if (block == NibiruBlocks.INFECTED_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityInfectedChest());
} else if (block == NibiruBlocks.MULTALIC_CRYSTAL) {
TileEntityMultalicCrystalRenderer.INSTANCE.render();
} else if (block == DionaBlocks.DARK_ENERGY_CORE) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityDarkEnergyCore());
GlStateManager.enableBlend();
} else if (block == NibiruBlocks.ALIEN_BERRY_CHEST) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityAlienBerryChest());
} else if (block == NibiruBlocks.JUICER_EGG) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityJuicerEgg());
TileEntityJuicerEggRenderer.renderItem(null, true);
} else if (block == NibiruBlocks.NUCLEAR_WASTE_TANK) {
TileEntityNuclearWasteTankRenderer.INSTANCE.render();
} else if (block == NibiruBlocks.VEIN_FRAME) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityVeinFrame());
GlStateManager.enableBlend();
} else if (block == DionaBlocks.DARK_ENERGY_GENERATOR) {
TileEntityDarkEnergyGeneratorRenderer.INSTANCE.render();
} else if (block == MPBlocks.BLACK_HOLE_STORAGE) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityBlackHoleStorage());
GlStateManager.enableBlend();
} else if (block == MPBlocks.ALIEN_DEFENDER_BEACON) {
ClientRegisterHelper.registerTileEntityItemStackRendering(new TileEntityAlienDefenderBeacon());
GlStateManager.enableBlend();
GlStateManager.enableCull();
} else if (block == MPBlocks.SHIELD_GENERATOR) {
TileEntityShieldGeneratorRenderer.INSTANCE.render();
} else {
this.old.renderByItem(itemStack);
}
}
Aggregations