private TileEntityRendererDispatcher() { this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer()); this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer()); this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer()); this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer()); this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer()); this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer()); for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values()) { tileentityspecialrenderer.setRendererDispatcher(this); } }
private boolean hasDragonBeenKilled() { for (int i = -8; i <= 8; ++i) { for (int j = -8; j <= 8; ++j) { Chunk chunk = this.world.getChunkFromChunkCoords(i, j); for (TileEntity tileentity : chunk.getTileEntityMap().values()) { if (tileentity instanceof TileEntityEndPortal) { return true; } } } } return false; }
public void renderTileEntityAt(TileEntityEndPortal te, double x, double y, double z, float partialTicks, int destroyStage) { GlStateManager.disableFog(); TileEntityEndGateway tileentityendgateway = (TileEntityEndGateway)te; if (tileentityendgateway.isSpawning() || tileentityendgateway.isCoolingDown()) { GlStateManager.alphaFunc(516, 0.1F); this.bindTexture(END_GATEWAY_BEAM_TEXTURE); float f = tileentityendgateway.isSpawning() ? tileentityendgateway.getSpawnPercent(partialTicks) : tileentityendgateway.getCooldownPercent(partialTicks); double d0 = tileentityendgateway.isSpawning() ? 256.0D - y : 50.0D; f = MathHelper.sin(f * (float)Math.PI); int i = MathHelper.floor((double)f * d0); float[] afloat = EntitySheep.getDyeRgb(tileentityendgateway.isSpawning() ? EnumDyeColor.MAGENTA : EnumDyeColor.PURPLE); TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, i, afloat, 0.15D, 0.175D); TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, -i, afloat, 0.15D, 0.175D); } super.renderTileEntityAt(te, x, y, z, partialTicks, destroyStage); GlStateManager.enableFog(); }
private TileEntityRendererDispatcher() { this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer()); this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer()); this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer()); this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer()); this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer()); this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer()); this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer()); this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer()); this.mapSpecialRenderers.put(TileEntityShulkerBox.class, new TileEntityShulkerBoxRenderer(new ModelShulker())); for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values()) { tileentityspecialrenderer.setRendererDispatcher(this); } }
private TileEntityRendererDispatcher() { this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer()); this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer()); this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer()); this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer()); this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer()); this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer()); this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer()); this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer()); for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values()) { tileentityspecialrenderer.setRendererDispatcher(this); } }
private TileEntityRendererDispatcher() { this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer()); this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston()); this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable()); this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal()); this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer()); Iterator var1 = this.mapSpecialRenderers.values().iterator(); while (var1.hasNext()) { TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next(); var2.func_147497_a(this); } }
private TileEntityRendererDispatcher() { this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer()); this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston()); this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable()); this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal()); this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer()); Iterator iterator = this.mapSpecialRenderers.values().iterator(); while (iterator.hasNext()) { TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next(); tileentityspecialrenderer.func_147497_a(this); } }
private TileEntityRenderer() { this.field_76966_m.put(TileEntitySign.class, new TileEntitySignRenderer()); this.field_76966_m.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.field_76966_m.put(TileEntityPiston.class, new TileEntityRendererPiston()); this.field_76966_m.put(TileEntityChest.class, new TileEntityChestRenderer()); this.field_76966_m.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.field_76966_m.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable()); this.field_76966_m.put(TileEntityEndPortal.class, new RenderEndPortal()); this.field_76966_m.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.field_76966_m.put(TileEntitySkull.class, new TileEntitySkullRenderer()); Iterator var1 = this.field_76966_m.values().iterator(); while(var1.hasNext()) { TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next(); var2.func_76893_a(this); } }
private TileEntityRenderer() { this.specialRendererMap.put(TileEntitySign.class, new TileEntitySignRenderer()); this.specialRendererMap.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer()); this.specialRendererMap.put(TileEntityPiston.class, new TileEntityRendererPiston()); this.specialRendererMap.put(TileEntityChest.class, new TileEntityChestRenderer()); this.specialRendererMap.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer()); this.specialRendererMap.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable()); this.specialRendererMap.put(TileEntityEndPortal.class, new RenderEndPortal()); this.specialRendererMap.put(TileEntityBeacon.class, new TileEntityBeaconRenderer()); this.specialRendererMap.put(TileEntitySkull.class, new TileEntitySkullRenderer()); Iterator iterator = this.specialRendererMap.values().iterator(); while (iterator.hasNext()) { TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)iterator.next(); tileentityspecialrenderer.setTileEntityRenderer(this); } }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityEndPortal(); }
@Nullable private BlockPattern.PatternHelper findExitPortal() { for (int i = -8; i <= 8; ++i) { for (int j = -8; j <= 8; ++j) { Chunk chunk = this.world.getChunkFromChunkCoords(i, j); for (TileEntity tileentity : chunk.getTileEntityMap().values()) { if (tileentity instanceof TileEntityEndPortal) { BlockPattern.PatternHelper blockpattern$patternhelper = this.portalPattern.match(this.world, tileentity.getPos()); if (blockpattern$patternhelper != null) { BlockPos blockpos = blockpattern$patternhelper.translateOffset(3, 3, 3).getPos(); if (this.exitPortalLocation == null && blockpos.getX() == 0 && blockpos.getZ() == 0) { this.exitPortalLocation = blockpos; } return blockpattern$patternhelper; } } } } } int k = this.world.getHeight(WorldGenEndPodium.END_PODIUM_LOCATION).getY(); for (int l = k; l >= 0; --l) { BlockPattern.PatternHelper blockpattern$patternhelper1 = this.portalPattern.match(this.world, new BlockPos(WorldGenEndPodium.END_PODIUM_LOCATION.getX(), l, WorldGenEndPodium.END_PODIUM_LOCATION.getZ())); if (blockpattern$patternhelper1 != null) { if (this.exitPortalLocation == null) { this.exitPortalLocation = blockpattern$patternhelper1.translateOffset(3, 3, 3).getPos(); } return blockpattern$patternhelper1; } } return null; }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityEndPortal(); }
public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { this.renderTileEntityAt((TileEntityEndPortal)p_147500_1_, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); }
@Override public TileEntity createNewTileEntity(World world){ return new TileEntityEndPortal(); }
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityEndPortal(); }
public TileEntity func_72274_a(World p_72274_1_) { return new TileEntityEndPortal(); }
public void func_76894_a(TileEntity p_76894_1_, double p_76894_2_, double p_76894_4_, double p_76894_6_, float p_76894_8_) { this.func_76906_a((TileEntityEndPortal)p_76894_1_, p_76894_2_, p_76894_4_, p_76894_6_, p_76894_8_); }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World par1World) { return new TileEntityEndPortal(); }
public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) { this.renderEndPortalTileEntity((TileEntityEndPortal)par1TileEntity, par2, par4, par6, par8); }