private void func_72190_l(World p_72190_1_, int p_72190_2_, int p_72190_3_, int p_72190_4_) { if(func_72191_e_(p_72190_1_, p_72190_2_, p_72190_3_ - 1, p_72190_4_) && p_72190_3_ >= 0) { byte var8 = 32; if(!field_72192_a && p_72190_1_.func_72904_c(p_72190_2_ - var8, p_72190_3_ - var8, p_72190_4_ - var8, p_72190_2_ + var8, p_72190_3_ + var8, p_72190_4_ + var8)) { if(!p_72190_1_.field_72995_K) { EntityFallingSand var9 = new EntityFallingSand(p_72190_1_, (double)((float)p_72190_2_ + 0.5F), (double)((float)p_72190_3_ + 0.5F), (double)((float)p_72190_4_ + 0.5F), this.field_71990_ca, p_72190_1_.func_72805_g(p_72190_2_, p_72190_3_, p_72190_4_)); this.func_82520_a(var9); p_72190_1_.func_72838_d(var9); } } else { p_72190_1_.func_94571_i(p_72190_2_, p_72190_3_, p_72190_4_); while(func_72191_e_(p_72190_1_, p_72190_2_, p_72190_3_ - 1, p_72190_4_) && p_72190_3_ > 0) { --p_72190_3_; } if(p_72190_3_ > 0) { p_72190_1_.func_94575_c(p_72190_2_, p_72190_3_, p_72190_4_, this.field_71990_ca); } } } }
private void func_72236_l(World p_72236_1_, int p_72236_2_, int p_72236_3_, int p_72236_4_) { if(BlockSand.func_72191_e_(p_72236_1_, p_72236_2_, p_72236_3_ - 1, p_72236_4_) && p_72236_3_ >= 0) { byte var5 = 32; if(!BlockSand.field_72192_a && p_72236_1_.func_72904_c(p_72236_2_ - var5, p_72236_3_ - var5, p_72236_4_ - var5, p_72236_2_ + var5, p_72236_3_ + var5, p_72236_4_ + var5)) { EntityFallingSand var6 = new EntityFallingSand(p_72236_1_, (double)((float)p_72236_2_ + 0.5F), (double)((float)p_72236_3_ + 0.5F), (double)((float)p_72236_4_ + 0.5F), this.field_71990_ca); p_72236_1_.func_72838_d(var6); } else { p_72236_1_.func_94571_i(p_72236_2_, p_72236_3_, p_72236_4_); while(BlockSand.func_72191_e_(p_72236_1_, p_72236_2_, p_72236_3_ - 1, p_72236_4_) && p_72236_3_ > 0) { --p_72236_3_; } if(p_72236_3_ > 0) { p_72236_1_.func_72832_d(p_72236_2_, p_72236_3_, p_72236_4_, this.field_71990_ca, 0, 2); } } } }
/** * If there is space to fall below will start this block falling */ private void tryToFall(World par1World, int par2, int par3, int par4) { if (canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte b0 = 32; if (!fallInstantly && par1World.checkChunksExist(par2 - b0, par3 - b0, par4 - b0, par2 + b0, par3 + b0, par4 + b0)) { if (!par1World.isRemote) { EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.blockID, par1World.getBlockMetadata(par2, par3, par4)); this.onStartFalling(entityfallingsand); par1World.spawnEntityInWorld(entityfallingsand); } } else { par1World.setBlockToAir(par2, par3, par4); while (canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, this.blockID); } } } }
public void func_77003_a(EntityFallingSand p_77003_1_, double p_77003_2_, double p_77003_4_, double p_77003_6_, float p_77003_8_, float p_77003_9_) { World var10 = p_77003_1_.func_70283_d(); Block var11 = Block.field_71973_m[p_77003_1_.field_70287_a]; if(var10.func_72798_a(MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v)) != p_77003_1_.field_70287_a) { GL11.glPushMatrix(); GL11.glTranslatef((float)p_77003_2_, (float)p_77003_4_, (float)p_77003_6_); this.func_110777_b(p_77003_1_); GL11.glDisable(2896); Tessellator var12; if(var11 instanceof BlockAnvil && var11.func_71857_b() == 35) { this.field_77004_a.field_78669_a = var10; var12 = Tessellator.field_78398_a; var12.func_78382_b(); var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F)); this.field_77004_a.func_85096_a((BlockAnvil)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b); var12.func_78373_b(0.0D, 0.0D, 0.0D); var12.func_78381_a(); } else if(var11.func_71857_b() == 27) { this.field_77004_a.field_78669_a = var10; var12 = Tessellator.field_78398_a; var12.func_78382_b(); var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F)); this.field_77004_a.func_78618_a((BlockDragonEgg)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v)); var12.func_78373_b(0.0D, 0.0D, 0.0D); var12.func_78381_a(); } else if(var11 != null) { this.field_77004_a.func_83018_a(var11); this.field_77004_a.func_78588_a(var11, var10, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b); } GL11.glEnable(2896); GL11.glPopMatrix(); } }
/** * Checks if the dragon egg can fall down, and if so, makes it fall. */ private void fallIfPossible(World par1World, int par2, int par3, int par4) { if (BlockSand.canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte b0 = 32; if (!BlockSand.fallInstantly && par1World.checkChunksExist(par2 - b0, par3 - b0, par4 - b0, par2 + b0, par3 + b0, par4 + b0)) { EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.blockID); par1World.spawnEntityInWorld(entityfallingsand); } else { par1World.setBlockToAir(par2, par3, par4); while (BlockSand.canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, this.blockID, 0, 2); } } } }
private void tryToFall(World par1World, int par2, int par3, int par4) { if (canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte b0 = 32; if (!fallInstantly && par1World.checkChunksExist(par2 - b0, par3 - b0, par4 - b0, par2 + b0, par3 + b0, par4 + b0)) { if (!par1World.isRemote) { EntityFallingSand entityfallingsand = new EntityFallingSand( par1World, par2 + 0.5F, par3 + 0.5F, par4 + 0.5F, blockID, par1World.getBlockMetadata(par2, par3, par4)); this.onStartFalling(entityfallingsand); par1World.spawnEntityInWorld(entityfallingsand); } } else { par1World.setBlockToAir(par2, par3, par4); while (canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, blockID); } } } }
private void tryToFall(World par1World, int par2, int par3, int par4) { fallInstantly = true; if (this.canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte b0 = 32; if (!fallInstantly && par1World.checkChunksExist(par2 - b0, par3 - b0, par4 - b0, par2 + b0, par3 + b0, par4 + b0)) { if (!par1World.isRemote) { EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.blockID, par1World.getBlockMetadata(par2, par3, par4)); this.onStartFalling(entityfallingsand); par1World.spawnEntityInWorld(entityfallingsand); } } else { par1World.setBlock(par2, par3, par4, 0, 0, 3); while (this.canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, this.blockID); } } } }
private void tryToFall(World par1World, int par2, int par3, int par4) { if (canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte var8 = 32; if (!fallInstantly && par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8)) { if (!par1World.isRemote) { EntityFallingSand var9 = new EntityFallingSand(par1World, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.blockID, par1World.getBlockMetadata(par2, par3, par4)); this.onStartFalling(var9); par1World.spawnEntityInWorld(var9); } } else { par1World.setBlock(par2, par3, par4, 0); while (canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, this.blockID); } } } }
private void tryToFall(World par1World, int par2, int par3, int par4) { if (canFallBelow(par1World, par2, par3 - 1, par4) && par3 >= 0) { byte b0 = 32; if (!fallInstantly && par1World.checkChunksExist(par2 - b0, par3 - b0, par4 - b0, par2 + b0, par3 + b0, par4 + b0)) { if (!par1World.isRemote) { EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.blockID, par1World.getBlockMetadata(par2, par3, par4)); this.onStartFalling(entityfallingsand); par1World.spawnEntityInWorld(entityfallingsand); } } else { par1World.setBlockToAir(par2, par3, par4); while (canFallBelow(par1World, par2, par3 - 1, par4) && par3 > 0) { --par3; } if (par3 > 0) { par1World.setBlock(par2, par3, par4, this.blockID); } } } }
public void func_72786_a(Entity p_72786_1_) { if(p_72786_1_ instanceof EntityPlayerMP) { this.func_72791_a(p_72786_1_, 512, 2); EntityPlayerMP var2 = (EntityPlayerMP)p_72786_1_; Iterator var3 = this.field_72793_b.iterator(); while(var3.hasNext()) { EntityTrackerEntry var4 = (EntityTrackerEntry)var3.next(); if(var4.field_73132_a != var2) { var4.func_73117_b(var2); } } } else if(p_72786_1_ instanceof EntityFishHook) { this.func_72785_a(p_72786_1_, 64, 5, true); } else if(p_72786_1_ instanceof EntityArrow) { this.func_72785_a(p_72786_1_, 64, 20, false); } else if(p_72786_1_ instanceof EntitySmallFireball) { this.func_72785_a(p_72786_1_, 64, 10, false); } else if(p_72786_1_ instanceof EntityFireball) { this.func_72785_a(p_72786_1_, 64, 10, false); } else if(p_72786_1_ instanceof EntitySnowball) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityEnderPearl) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityEnderEye) { this.func_72785_a(p_72786_1_, 64, 4, true); } else if(p_72786_1_ instanceof EntityEgg) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityPotion) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityExpBottle) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityFireworkRocket) { this.func_72785_a(p_72786_1_, 64, 10, true); } else if(p_72786_1_ instanceof EntityItem) { this.func_72785_a(p_72786_1_, 64, 20, true); } else if(p_72786_1_ instanceof EntityMinecart) { this.func_72785_a(p_72786_1_, 80, 3, true); } else if(p_72786_1_ instanceof EntityBoat) { this.func_72785_a(p_72786_1_, 80, 3, true); } else if(p_72786_1_ instanceof EntitySquid) { this.func_72785_a(p_72786_1_, 64, 3, true); } else if(p_72786_1_ instanceof EntityWither) { this.func_72785_a(p_72786_1_, 80, 3, false); } else if(p_72786_1_ instanceof EntityBat) { this.func_72785_a(p_72786_1_, 80, 3, false); } else if(p_72786_1_ instanceof IAnimals) { this.func_72785_a(p_72786_1_, 80, 3, true); } else if(p_72786_1_ instanceof EntityDragon) { this.func_72785_a(p_72786_1_, 160, 3, true); } else if(p_72786_1_ instanceof EntityTNTPrimed) { this.func_72785_a(p_72786_1_, 160, 10, true); } else if(p_72786_1_ instanceof EntityFallingSand) { this.func_72785_a(p_72786_1_, 160, 20, true); } else if(p_72786_1_ instanceof EntityHanging) { this.func_72785_a(p_72786_1_, 160, Integer.MAX_VALUE, false); } else if(p_72786_1_ instanceof EntityXPOrb) { this.func_72785_a(p_72786_1_, 160, 20, true); } else if(p_72786_1_ instanceof EntityEnderCrystal) { this.func_72785_a(p_72786_1_, 256, Integer.MAX_VALUE, false); } }
protected void func_82520_a(EntityFallingSand p_82520_1_) { p_82520_1_.func_82154_e(true); }
private RenderManager() { this.field_78729_o.put(EntityCaveSpider.class, new RenderCaveSpider()); this.field_78729_o.put(EntitySpider.class, new RenderSpider()); this.field_78729_o.put(EntityPig.class, new RenderPig(new ModelPig(), new ModelPig(0.5F), 0.7F)); this.field_78729_o.put(EntitySheep.class, new RenderSheep(new ModelSheep2(), new ModelSheep1(), 0.7F)); this.field_78729_o.put(EntityCow.class, new RenderCow(new ModelCow(), 0.7F)); this.field_78729_o.put(EntityMooshroom.class, new RenderMooshroom(new ModelCow(), 0.7F)); this.field_78729_o.put(EntityWolf.class, new RenderWolf(new ModelWolf(), new ModelWolf(), 0.5F)); this.field_78729_o.put(EntityChicken.class, new RenderChicken(new ModelChicken(), 0.3F)); this.field_78729_o.put(EntityOcelot.class, new RenderOcelot(new ModelOcelot(), 0.4F)); this.field_78729_o.put(EntitySilverfish.class, new RenderSilverfish()); this.field_78729_o.put(EntityCreeper.class, new RenderCreeper()); this.field_78729_o.put(EntityEnderman.class, new RenderEnderman()); this.field_78729_o.put(EntitySnowman.class, new RenderSnowMan()); this.field_78729_o.put(EntitySkeleton.class, new RenderSkeleton()); this.field_78729_o.put(EntityWitch.class, new RenderWitch()); this.field_78729_o.put(EntityBlaze.class, new RenderBlaze()); this.field_78729_o.put(EntityZombie.class, new RenderZombie()); this.field_78729_o.put(EntitySlime.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F)); this.field_78729_o.put(EntityMagmaCube.class, new RenderMagmaCube()); this.field_78729_o.put(EntityPlayer.class, new RenderPlayer()); this.field_78729_o.put(EntityGiantZombie.class, new RenderGiantZombie(new ModelZombie(), 0.5F, 6.0F)); this.field_78729_o.put(EntityGhast.class, new RenderGhast()); this.field_78729_o.put(EntitySquid.class, new RenderSquid(new ModelSquid(), 0.7F)); this.field_78729_o.put(EntityVillager.class, new RenderVillager()); this.field_78729_o.put(EntityIronGolem.class, new RenderIronGolem()); this.field_78729_o.put(EntityBat.class, new RenderBat()); this.field_78729_o.put(EntityDragon.class, new RenderDragon()); this.field_78729_o.put(EntityEnderCrystal.class, new RenderEnderCrystal()); this.field_78729_o.put(EntityWither.class, new RenderWither()); this.field_78729_o.put(Entity.class, new RenderEntity()); this.field_78729_o.put(EntityPainting.class, new RenderPainting()); this.field_78729_o.put(EntityItemFrame.class, new RenderItemFrame()); this.field_78729_o.put(EntityLeashKnot.class, new RenderLeashKnot()); this.field_78729_o.put(EntityArrow.class, new RenderArrow()); this.field_78729_o.put(EntitySnowball.class, new RenderSnowball(Item.field_77768_aD)); this.field_78729_o.put(EntityEnderPearl.class, new RenderSnowball(Item.field_77730_bn)); this.field_78729_o.put(EntityEnderEye.class, new RenderSnowball(Item.field_77748_bA)); this.field_78729_o.put(EntityEgg.class, new RenderSnowball(Item.field_77764_aP)); this.field_78729_o.put(EntityPotion.class, new RenderSnowball(Item.field_77726_bs, 16384)); this.field_78729_o.put(EntityExpBottle.class, new RenderSnowball(Item.field_77809_bD)); this.field_78729_o.put(EntityFireworkRocket.class, new RenderSnowball(Item.field_92104_bU)); this.field_78729_o.put(EntityLargeFireball.class, new RenderFireball(2.0F)); this.field_78729_o.put(EntitySmallFireball.class, new RenderFireball(0.5F)); this.field_78729_o.put(EntityWitherSkull.class, new RenderWitherSkull()); this.field_78729_o.put(EntityItem.class, new RenderItem()); this.field_78729_o.put(EntityXPOrb.class, new RenderXPOrb()); this.field_78729_o.put(EntityTNTPrimed.class, new RenderTNTPrimed()); this.field_78729_o.put(EntityFallingSand.class, new RenderFallingSand()); this.field_78729_o.put(EntityMinecartTNT.class, new RenderTntMinecart()); this.field_78729_o.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner()); this.field_78729_o.put(EntityMinecart.class, new RenderMinecart()); this.field_78729_o.put(EntityBoat.class, new RenderBoat()); this.field_78729_o.put(EntityFishHook.class, new RenderFish()); this.field_78729_o.put(EntityHorse.class, new RenderHorse(new ModelHorse(), 0.75F)); this.field_78729_o.put(EntityLightningBolt.class, new RenderLightningBolt()); Iterator var1 = this.field_78729_o.values().iterator(); while(var1.hasNext()) { Render var2 = (Render)var1.next(); var2.func_76976_a(this); } }
protected ResourceLocation func_110783_a(EntityFallingSand p_110783_1_) { return TextureMap.field_110575_b; }
protected ResourceLocation func_110775_a(Entity p_110775_1_) { return this.func_110783_a((EntityFallingSand)p_110775_1_); }
public void func_76986_a(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.func_77003_a((EntityFallingSand)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); }
/** * Called when the falling block entity for this block is created */ protected void onStartFalling(EntityFallingSand par1EntityFallingSand) { par1EntityFallingSand.setIsAnvil(true); }
private RenderManager() { this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider()); this.entityRenderMap.put(EntitySpider.class, new RenderSpider()); this.entityRenderMap.put(EntityPig.class, new RenderPig(new ModelPig(), new ModelPig(0.5F), 0.7F)); this.entityRenderMap.put(EntitySheep.class, new RenderSheep(new ModelSheep2(), new ModelSheep1(), 0.7F)); this.entityRenderMap.put(EntityCow.class, new RenderCow(new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityWolf.class, new RenderWolf(new ModelWolf(), new ModelWolf(), 0.5F)); this.entityRenderMap.put(EntityChicken.class, new RenderChicken(new ModelChicken(), 0.3F)); this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(new ModelOcelot(), 0.4F)); this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish()); this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper()); this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman()); this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan()); this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton()); this.entityRenderMap.put(EntityWitch.class, new RenderWitch()); this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze()); this.entityRenderMap.put(EntityZombie.class, new RenderZombie()); this.entityRenderMap.put(EntitySlime.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F)); this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube()); this.entityRenderMap.put(EntityPlayer.class, new RenderPlayer()); this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(new ModelZombie(), 0.5F, 6.0F)); this.entityRenderMap.put(EntityGhast.class, new RenderGhast()); this.entityRenderMap.put(EntitySquid.class, new RenderSquid(new ModelSquid(), 0.7F)); this.entityRenderMap.put(EntityVillager.class, new RenderVillager()); this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem()); this.entityRenderMap.put(EntityBat.class, new RenderBat()); this.entityRenderMap.put(EntityDragon.class, new RenderDragon()); this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal()); this.entityRenderMap.put(EntityWither.class, new RenderWither()); this.entityRenderMap.put(Entity.class, new RenderEntity()); this.entityRenderMap.put(EntityPainting.class, new RenderPainting()); this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame()); this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot()); this.entityRenderMap.put(EntityArrow.class, new RenderArrow()); this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(Item.snowball)); this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(Item.enderPearl)); this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(Item.eyeOfEnder)); this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(Item.egg)); this.entityRenderMap.put(EntityPotion.class, new RenderSnowball(Item.potion, 16384)); this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(Item.expBottle)); this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(Item.firework)); this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(2.0F)); this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(0.5F)); this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull()); this.entityRenderMap.put(EntityItem.class, new RenderItem()); this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb()); this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed()); this.entityRenderMap.put(EntityFallingSand.class, new RenderFallingSand()); this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart()); this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner()); this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart()); this.entityRenderMap.put(EntityBoat.class, new RenderBoat()); this.entityRenderMap.put(EntityFishHook.class, new RenderFish()); this.entityRenderMap.put(EntityHorse.class, new RenderHorse(new ModelHorse(), 0.75F)); this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt()); Iterator iterator = this.entityRenderMap.values().iterator(); while (iterator.hasNext()) { Render render = (Render)iterator.next(); render.setRenderManager(this); } }
/** * The actual render method that is used in doRender */ public void doRenderFallingSand(EntityFallingSand par1EntityFallingSand, double par2, double par4, double par6, float par8, float par9) { World world = par1EntityFallingSand.getWorld(); Block block = Block.blocksList[par1EntityFallingSand.blockID]; if (world.getBlockId(MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ)) != par1EntityFallingSand.blockID) { GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); this.bindEntityTexture(par1EntityFallingSand); GL11.glDisable(GL11.GL_LIGHTING); Tessellator tessellator; if (block instanceof BlockAnvil && block.getRenderType() == 35) { this.sandRenderBlocks.blockAccess = world; tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F)); this.sandRenderBlocks.renderBlockAnvilMetadata((BlockAnvil)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else if (block.getRenderType() == 27) { this.sandRenderBlocks.blockAccess = world; tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F)); this.sandRenderBlocks.renderBlockDragonEgg((BlockDragonEgg)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ)); tessellator.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); } else if (block != null) { this.sandRenderBlocks.setRenderBoundsFromBlock(block); this.sandRenderBlocks.renderBlockSandFalling(block, world, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata); } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } }
protected ResourceLocation getFallingSandTextures(EntityFallingSand par1EntityFallingSand) { return TextureMap.locationBlocksTexture; }
/** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity par1Entity) { return this.getFallingSandTextures((EntityFallingSand)par1Entity); }
protected void onStartFalling(EntityFallingSand par1EntityFallingSand) { }
private RenderManager() { this.entityRenderMap.put(EntitySpider.class, new RenderSpider()); this.entityRenderMap.put(EntityCaveSpider.class, new RenderSpider()); this.entityRenderMap.put(EntityPig.class, new RenderPig(new ModelPig(), new ModelPig(0.5F), 0.7F)); this.entityRenderMap.put(EntitySheep.class, new RenderSheep(new ModelSheep2(), new ModelSheep1(), 0.7F)); this.entityRenderMap.put(EntityCow.class, new RenderCow(new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityVenio.class, new VenioRender(new ModelVenio(), 0.7F)); this.entityRenderMap.put(EntityCyborg.class, new CyborgRender(new ModelCyborg(), 0.7F)); this.entityRenderMap.put(EntityShell.class, new ShellRender(new ModelShell(), 0.3F)); this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(new ModelCow(), 0.7F)); this.entityRenderMap.put(EntityWolf.class, new RenderWolf(new ModelWolf(), new ModelWolf(), 0.5F)); this.entityRenderMap.put(EntityChicken.class, new RenderChicken(new ModelChicken(), 0.3F)); this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(new ModelOcelot(), 0.4F)); this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish()); this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper()); this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman()); this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan()); this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton()); this.entityRenderMap.put(EntityWitch.class, new RenderWitch()); this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze()); this.entityRenderMap.put(EntityZombie.class, new RenderZombie()); this.entityRenderMap.put(EntitySlime.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F)); this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube()); this.entityRenderMap.put(EntityPlayer.class, new RenderPlayer()); this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(new ModelZombie(), 0.5F, 6.0F)); this.entityRenderMap.put(EntityGhast.class, new RenderGhast()); this.entityRenderMap.put(EntitySquid.class, new RenderSquid(new ModelSquid(), 0.7F)); this.entityRenderMap.put(EntityVillager.class, new RenderVillager()); this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem()); this.entityRenderMap.put(EntityLiving.class, new RenderLiving(new ModelBiped(), 0.5F)); this.entityRenderMap.put(EntityBat.class, new RenderBat()); this.entityRenderMap.put(EntityDragon.class, new RenderDragon()); this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal()); this.entityRenderMap.put(EntityWither.class, new RenderWither()); this.entityRenderMap.put(Entity.class, new RenderEntity()); this.entityRenderMap.put(EntityPainting.class, new RenderPainting()); this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame()); this.entityRenderMap.put(EntityArrow.class, new RenderArrow()); this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(Item.snowball)); this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(Item.enderPearl)); this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(Item.eyeOfEnder)); this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(Item.egg)); this.entityRenderMap.put(EntityPotion.class, new RenderSnowball(Item.potion, 16384)); this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(Item.expBottle)); this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(Item.firework)); this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(2.0F)); this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(0.5F)); this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull()); this.entityRenderMap.put(EntityItem.class, new RenderItem()); this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb()); this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed()); this.entityRenderMap.put(EntityFallingSand.class, new RenderFallingSand()); this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart()); this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner()); this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart()); this.entityRenderMap.put(EntityBoat.class, new RenderBoat()); this.entityRenderMap.put(EntityFishHook.class, new RenderFish()); this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt()); Iterator iterator = this.entityRenderMap.values().iterator(); while (iterator.hasNext()) { Render render = (Render)iterator.next(); render.setRenderManager(this); } }
/** * Called when the falling block entity for this block is created */ protected void onStartFalling(EntityFallingSand par1EntityFallingSand) {}
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.doRenderFallingSand((EntityFallingSand)par1Entity, par2, par4, par6, par8, par9); }