diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 3c93b437..54ec463c 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/Block.java +++ ../src-work/minecraft/net/minecraft/block/Block.java -@@ -1,10 +1,7 @@ +@@ -1,10 +1,8 @@ package net.minecraft.block; -import com.google.common.collect.Sets; @@ -8,10 +8,11 @@ import java.util.List; import java.util.Random; -import java.util.Set; ++import java.util.concurrent.atomic.AtomicReference; import javax.annotation.Nullable; import net.minecraft.block.material.EnumPushReaction; import net.minecraft.block.material.MapColor; -@@ -21,6 +18,7 @@ +@@ -21,6 +19,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; @@ -19,7 +20,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Enchantments; import net.minecraft.init.Items; -@@ -51,12 +49,15 @@ +@@ -51,12 +50,15 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -38,7 +39,7 @@ public static final AxisAlignedBB field_185505_j = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); @Nullable public static final AxisAlignedBB field_185506_k = null; -@@ -75,11 +76,22 @@ +@@ -75,11 +77,22 @@ public float field_149763_I; protected final Material field_149764_J; protected final MapColor field_181083_K; @@ -61,7 +62,7 @@ public static int func_149682_b(Block p_149682_0_) { return field_149771_c.func_148757_b(p_149682_0_); -@@ -319,7 +331,7 @@ +@@ -319,7 +332,7 @@ public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_) { @@ -70,7 +71,7 @@ } public Block func_149711_c(float p_149711_1_) -@@ -357,9 +369,10 @@ +@@ -357,9 +370,10 @@ return this.field_149789_z; } @@ -82,7 +83,7 @@ } @Deprecated -@@ -372,13 +385,13 @@ +@@ -372,13 +386,13 @@ @SideOnly(Side.CLIENT) public int func_185484_c(IBlockState p_185484_1_, IBlockAccess p_185484_2_, BlockPos p_185484_3_) { @@ -98,7 +99,7 @@ } else { -@@ -442,7 +455,7 @@ +@@ -442,7 +456,7 @@ } } @@ -107,7 +108,7 @@ } @Deprecated -@@ -534,6 +547,10 @@ +@@ -534,6 +548,10 @@ public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_) { @@ -118,7 +119,7 @@ } public int func_149745_a(Random p_149745_1_) -@@ -549,16 +566,7 @@ +@@ -549,16 +567,7 @@ @Deprecated public float func_180647_a(IBlockState p_180647_1_, EntityPlayer p_180647_2_, World p_180647_3_, BlockPos p_180647_4_) { @@ -136,7 +137,7 @@ } public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_) -@@ -568,20 +576,17 @@ +@@ -568,20 +577,16 @@ public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) { @@ -150,9 +151,7 @@ - for (int j = 0; j < i; ++j) + for (ItemStack drop : drops) { -- if (p_180653_1_.field_73012_v.nextFloat() <= p_180653_4_) -+ // CraftBukkit - <= to < to allow for plugins to completely disable block drops from explosions -+ if (p_180653_1_.field_73012_v.nextFloat() < p_180653_4_) + if (p_180653_1_.field_73012_v.nextFloat() <= p_180653_4_) { - Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_); - @@ -164,7 +163,7 @@ } } } -@@ -589,27 +594,47 @@ +@@ -589,8 +594,13 @@ public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) { @@ -179,15 +178,7 @@ float f = 0.5F; double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; - double d2 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; - EntityItem entityitem = new EntityItem(p_180635_0_, (double)p_180635_1_.func_177958_n() + d0, (double)p_180635_1_.func_177956_o() + d1, (double)p_180635_1_.func_177952_p() + d2, p_180635_2_); - entityitem.func_174869_p(); -- p_180635_0_.func_72838_d(entityitem); -+ if (p_180635_0_.captureDrops != null) { -+ p_180635_0_.captureDrops.add(entityitem); -+ } else { -+ p_180635_0_.func_72838_d(entityitem); -+ } +@@ -601,15 +611,27 @@ } } @@ -196,11 +187,12 @@ + return 0; + } + // CraftBukkit end -+ ++ public AtomicReference dropXpOnBlockBreak = new AtomicReference<>(null); // Magma ++ public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) { - if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_82766_b("doTileDrops")) -+ dropXpOnBlockBreak(p_180637_1_, p_180637_2_, p_180637_3_, null); ++ dropXpOnBlockBreak(p_180637_1_, p_180637_2_, p_180637_3_, dropXpOnBlockBreak.getAndSet(null)); // Magma + } + + public void dropXpOnBlockBreak(World worldIn, BlockPos pos, int amount, EntityPlayerMP player) @@ -219,7 +211,7 @@ } } } -@@ -619,6 +644,7 @@ +@@ -619,6 +641,7 @@ return 0; } @@ -227,7 +219,7 @@ public float func_149638_a(Entity p_149638_1_) { return this.field_149781_w / 5.0F; -@@ -657,7 +683,7 @@ +@@ -657,7 +680,7 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -236,7 +228,7 @@ } public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, EnumFacing p_180639_6_, float p_180639_7_, float p_180639_8_, float p_180639_9_) -@@ -669,6 +695,8 @@ +@@ -669,6 +692,8 @@ { } @@ -245,7 +237,7 @@ public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_) { return this.func_176203_a(p_180642_7_); -@@ -710,21 +738,35 @@ +@@ -710,21 +735,35 @@ p_180657_2_.func_71029_a(StatList.func_188055_a(this)); p_180657_2_.func_71020_j(0.005F); @@ -284,7 +276,7 @@ } protected ItemStack func_180643_i(IBlockState p_180643_1_) -@@ -810,6 +852,7 @@ +@@ -810,6 +849,7 @@ p_176216_2_.field_70181_x = 0.0D; } @@ -292,7 +284,7 @@ public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) { return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_)); -@@ -898,27 +941,28 @@ +@@ -898,27 +938,28 @@ return this.field_176228_M; } @@ -326,7 +318,7 @@ public SoundType func_185467_w() { return this.field_149762_H; -@@ -934,6 +978,1386 @@ +@@ -934,6 +975,1386 @@ { } @@ -1713,7 +1705,7 @@ public static void func_149671_p() { func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air")); -@@ -1105,7 +2529,7 @@ +@@ -1105,7 +2526,7 @@ Block block11 = (new BlockQuartz()).func_149672_a(SoundType.field_185851_d).func_149711_c(0.8F).func_149663_c("quartzBlock"); func_176219_a(155, "quartz_block", block11); func_176219_a(156, "quartz_stairs", (new BlockStairs(block11.func_176223_P().func_177226_a(BlockQuartz.field_176335_a, BlockQuartz.EnumType.DEFAULT))).func_149663_c("stairsQuartz")); @@ -1722,7 +1714,7 @@ func_176219_a(158, "dropper", (new BlockDropper()).func_149711_c(3.5F).func_149672_a(SoundType.field_185851_d).func_149663_c("dropper")); func_176219_a(159, "stained_hardened_clay", (new BlockStainedHardenedClay()).func_149711_c(1.25F).func_149752_b(7.0F).func_149672_a(SoundType.field_185851_d).func_149663_c("clayHardenedStained")); func_176219_a(160, "stained_glass_pane", (new BlockStainedGlassPane()).func_149711_c(0.3F).func_149672_a(SoundType.field_185853_f).func_149663_c("thinStainedGlass")); -@@ -1230,31 +2654,6 @@ +@@ -1230,31 +2651,6 @@ block15.field_149783_u = flag; } } @@ -1754,7 +1746,7 @@ } private static void func_176215_a(int p_176215_0_, ResourceLocation p_176215_1_, Block p_176215_2_) -@@ -1267,6 +2666,18 @@ +@@ -1267,6 +2663,18 @@ func_176215_a(p_176219_0_, new ResourceLocation(p_176219_1_), p_176219_2_); } diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index cf6a7867..cc8a0b5d 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch @@ -54,24 +54,7 @@ if (this.func_92059_d().func_190926_b()) { this.func_70106_y(); -@@ -86,10 +99,12 @@ - { - super.func_70071_h_(); - -- if (this.field_145804_b > 0 && this.field_145804_b != 32767) -- { -- --this.field_145804_b; -- } -+ // CraftBukkit start - Use wall time for pickup and despawn timers -+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick; -+ if (this.field_145804_b != 32767) this.field_145804_b -= elapsedTicks; -+ if (this.field_70292_b != -32768) this.field_70292_b += elapsedTicks; -+ this.lastTick = MinecraftServer.currentTick; -+ // CraftBukkit end - - this.field_70169_q = this.field_70165_t; - this.field_70167_r = this.field_70163_u; -@@ -135,7 +150,9 @@ +@@ -135,7 +148,9 @@ if (this.field_70122_E) { @@ -82,22 +65,7 @@ } this.field_70159_w *= (double)f; -@@ -147,10 +164,12 @@ - this.field_70181_x *= -0.5D; - } - -- if (this.field_70292_b != -32768) -+ /* Craftbukkit start - moved up -+ if (this.age != -32768) - { -- ++this.field_70292_b; -+ ++this.age; - } -+ // Craftbukkit end */ - - this.func_70072_I(); - -@@ -167,16 +186,55 @@ +@@ -167,16 +182,60 @@ } } @@ -126,12 +94,17 @@ + // Spigot start - copied from above + @Override + public void inactiveTick() { -+ // CraftBukkit start - Use wall time for pickup and despawn timers -+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick; -+ if (this.field_145804_b != 32767) this.field_145804_b -= elapsedTicks; -+ if (this.field_70292_b != -32768) this.field_70292_b += elapsedTicks; -+ this.lastTick = MinecraftServer.currentTick; -+ // CraftBukkit end ++ // Magma start - Use vanilla time for pickup ++ if (this.field_145804_b > 0 && this.field_145804_b != 32767) ++ { ++ --this.field_145804_b; ++ } ++ ++ if (this.field_70292_b != -32768) ++ { ++ ++this.field_70292_b; ++ } ++ // Magma end - Use vanilla time for pickup + + if (!this.field_70170_p.field_72995_K && this.field_70292_b >= field_70170_p.spigotConfig.itemDespawnRate) { // Spigot + // CraftBukkit start - fire ItemDespawnEvent @@ -155,7 +128,7 @@ { this.func_70289_a(entityitem); } -@@ -225,13 +283,20 @@ +@@ -225,13 +284,20 @@ { return false; } @@ -181,7 +154,7 @@ return true; } } -@@ -282,6 +347,7 @@ +@@ -282,6 +348,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -189,7 +162,7 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -292,6 +358,11 @@ +@@ -292,6 +359,11 @@ } else { @@ -201,7 +174,7 @@ this.func_70018_K(); this.field_70291_e = (int)((float)this.field_70291_e - p_70097_2_); -@@ -314,6 +385,7 @@ +@@ -314,6 +386,7 @@ p_70014_1_.func_74777_a("Health", (short)this.field_70291_e); p_70014_1_.func_74777_a("Age", (short)this.field_70292_b); p_70014_1_.func_74777_a("PickupDelay", (short)this.field_145804_b); @@ -209,7 +182,7 @@ if (this.func_145800_j() != null) { -@@ -358,22 +430,59 @@ +@@ -358,22 +431,59 @@ { this.func_70106_y(); } @@ -271,7 +244,7 @@ this.func_70106_y(); itemstack.func_190920_e(i); } -@@ -394,9 +503,9 @@ +@@ -394,9 +504,9 @@ } @Nullable @@ -283,7 +256,7 @@ if (!this.field_70170_p.field_72995_K && entity instanceof EntityItem) { -@@ -476,6 +585,6 @@ +@@ -476,6 +586,6 @@ public void func_174870_v() { this.func_174871_r(); diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch index da40c65b..c57eaa92 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInteractionManager.java.patch @@ -255,7 +255,7 @@ { return false; } -@@ -264,53 +370,41 @@ +@@ -264,53 +370,42 @@ } else { @@ -316,12 +316,13 @@ + // Drop experience + if (!this.func_73083_d() && flag1 && exp > 0) + { -+ iblockstate.func_177230_c().dropXpOnBlockBreak(field_73092_a, p_180237_1_, exp, this.field_73090_b); ++ iblockstate.func_177230_c().dropXpOnBlockBreak.set(this.field_73090_b); // Magma ++ iblockstate.func_177230_c().func_180637_b(field_73092_a, p_180237_1_, exp); + } return flag1; } } -@@ -328,8 +422,11 @@ +@@ -328,8 +423,11 @@ } else { @@ -333,7 +334,7 @@ ActionResult actionresult = p_187250_3_.func_77957_a(p_187250_2_, p_187250_1_, p_187250_4_); ItemStack itemstack = actionresult.func_188398_b(); -@@ -357,6 +454,7 @@ +@@ -357,6 +455,7 @@ if (itemstack.func_190926_b()) { @@ -341,7 +342,7 @@ p_187250_1_.func_184611_a(p_187250_4_, ItemStack.field_190927_a); } -@@ -370,9 +468,58 @@ +@@ -370,9 +469,58 @@ } } @@ -401,7 +402,7 @@ { TileEntity tileentity = p_187251_2_.func_175625_s(p_187251_5_); -@@ -402,13 +549,27 @@ +@@ -402,13 +550,27 @@ } else { @@ -432,7 +433,7 @@ } } -@@ -420,7 +581,7 @@ +@@ -420,7 +582,7 @@ { return EnumActionResult.PASS; } @@ -441,7 +442,7 @@ { if (p_187251_3_.func_77973_b() instanceof ItemBlock && !p_187251_1_.func_189808_dh()) { -@@ -436,21 +597,43 @@ +@@ -436,21 +598,43 @@ { int j = p_187251_3_.func_77960_j(); int i = p_187251_3_.func_190916_E(); diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 8370ced9..5cc7ea84 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -114,7 +114,7 @@ public final List field_175730_i = Lists.newArrayList(); private final List field_147484_a = Lists.newArrayList(); private final List field_147483_b = Lists.newArrayList(); -@@ -86,30 +103,157 @@ +@@ -86,30 +103,156 @@ public float field_73017_q; private int field_73016_r; public final Random field_73012_v = new Random(); @@ -159,7 +159,6 @@ + public boolean keepSpawnInMemory = true; + public ChunkGenerator generator; + public boolean captureTreeGeneration = false; -+ public List captureDrops; + public long ticksPerAnimalSpawns; + public long ticksPerMonsterSpawns; + public boolean populating; @@ -279,7 +278,7 @@ this.field_73021_x = Lists.newArrayList(this.field_184152_t); this.field_83016_L = Calendar.getInstance(); this.field_96442_D = new Scoreboard(); -@@ -122,6 +266,12 @@ +@@ -122,6 +265,12 @@ this.field_73011_w = p_i45749_3_; this.field_72995_K = p_i45749_5_; this.field_175728_M = p_i45749_3_.func_177501_r(); @@ -292,7 +291,7 @@ } public World func_175643_b() -@@ -131,6 +281,11 @@ +@@ -131,6 +280,11 @@ public Biome func_180494_b(final BlockPos p_180494_1_) { @@ -304,7 +303,7 @@ if (this.func_175667_e(p_180494_1_)) { Chunk chunk = this.func_175726_f(p_180494_1_); -@@ -207,7 +362,7 @@ +@@ -207,7 +361,7 @@ public boolean func_175623_d(BlockPos p_175623_1_) { @@ -313,7 +312,7 @@ } public boolean func_175667_e(BlockPos p_175667_1_) -@@ -278,7 +433,7 @@ +@@ -278,7 +432,7 @@ } } @@ -322,7 +321,7 @@ public Chunk func_175726_f(BlockPos p_175726_1_) { -@@ -297,6 +452,26 @@ +@@ -297,6 +451,26 @@ public boolean func_180501_a(BlockPos p_180501_1_, IBlockState p_180501_2_, int p_180501_3_) { @@ -349,7 +348,7 @@ if (this.func_189509_E(p_180501_1_)) { return false; -@@ -308,24 +483,53 @@ +@@ -308,24 +482,53 @@ else { Chunk chunk = this.func_175726_f(p_180501_1_); @@ -406,7 +405,7 @@ this.func_184138_a(p_180501_1_, iblockstate, p_180501_2_, p_180501_3_); } -@@ -342,8 +546,6 @@ +@@ -342,8 +545,6 @@ { this.func_190522_c(p_180501_1_, block); } @@ -415,7 +414,7 @@ } } } -@@ -358,7 +560,7 @@ +@@ -358,7 +559,7 @@ IBlockState iblockstate = this.func_180495_p(p_175655_1_); Block block = iblockstate.func_177230_c(); @@ -424,7 +423,7 @@ { return false; } -@@ -392,6 +594,11 @@ +@@ -392,6 +593,11 @@ { if (this.field_72986_A.func_76067_t() != WorldType.field_180272_g) { @@ -436,7 +435,7 @@ this.func_175685_c(p_175722_1_, p_175722_2_, p_175722_3_); } } -@@ -441,6 +648,9 @@ +@@ -441,6 +647,9 @@ public void func_175685_c(BlockPos p_175685_1_, Block p_175685_2_, boolean p_175685_3_) { @@ -446,7 +445,7 @@ this.func_190524_a(p_175685_1_.func_177976_e(), p_175685_2_, p_175685_1_); this.func_190524_a(p_175685_1_.func_177974_f(), p_175685_2_, p_175685_1_); this.func_190524_a(p_175685_1_.func_177977_b(), p_175685_2_, p_175685_1_); -@@ -456,6 +666,11 @@ +@@ -456,6 +665,11 @@ public void func_175695_a(BlockPos p_175695_1_, Block p_175695_2_, EnumFacing p_175695_3_) { @@ -458,7 +457,7 @@ if (p_175695_3_ != EnumFacing.WEST) { this.func_190524_a(p_175695_1_.func_177976_e(), p_175695_2_, p_175695_1_); -@@ -507,7 +722,7 @@ +@@ -507,7 +721,7 @@ { try { @@ -467,7 +466,7 @@ } catch (Throwable var2) { -@@ -527,12 +742,17 @@ +@@ -527,12 +741,17 @@ { IBlockState iblockstate = this.func_180495_p(p_190529_1_); @@ -487,7 +486,7 @@ catch (Throwable throwable) { CrashReport crashreport = CrashReport.func_85055_a(throwable, "Exception while updating neighbours"); -@@ -543,7 +763,7 @@ +@@ -543,7 +762,7 @@ { try { @@ -496,7 +495,7 @@ } catch (Throwable var2) { -@@ -588,7 +808,7 @@ +@@ -588,7 +807,7 @@ { IBlockState iblockstate = this.func_180495_p(blockpos1); @@ -505,7 +504,7 @@ { return false; } -@@ -616,6 +836,41 @@ +@@ -616,6 +835,41 @@ } } @@ -547,7 +546,7 @@ public int func_175671_l(BlockPos p_175671_1_) { return this.func_175721_c(p_175671_1_, true); -@@ -849,6 +1104,17 @@ +@@ -849,6 +1103,17 @@ public IBlockState func_180495_p(BlockPos p_180495_1_) { @@ -565,7 +564,7 @@ if (this.func_189509_E(p_180495_1_)) { return Blocks.field_150350_a.func_176223_P(); -@@ -862,7 +1128,7 @@ +@@ -862,7 +1127,7 @@ public boolean func_72935_r() { @@ -574,7 +573,7 @@ } @Nullable -@@ -1065,6 +1331,13 @@ +@@ -1065,6 +1330,13 @@ public void func_184148_a(@Nullable EntityPlayer p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) { @@ -588,7 +587,7 @@ for (int i = 0; i < this.field_73021_x.size(); ++i) { ((IWorldEventListener)this.field_73021_x.get(i)).func_184375_a(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_2_, p_184148_4_, p_184148_6_, p_184148_10_, p_184148_11_); -@@ -1112,12 +1385,77 @@ +@@ -1112,12 +1384,77 @@ public boolean func_72942_c(Entity p_72942_1_) { @@ -668,7 +667,7 @@ int i = MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D); int j = MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D); boolean flag = p_72838_1_.field_98038_p; -@@ -1140,7 +1478,10 @@ +@@ -1140,7 +1477,10 @@ this.func_72854_c(); } @@ -679,7 +678,7 @@ this.field_72996_f.add(p_72838_1_); this.func_72923_a(p_72838_1_); return true; -@@ -1153,6 +1494,9 @@ +@@ -1153,6 +1493,9 @@ { ((IWorldEventListener)this.field_73021_x.get(i)).func_72703_a(p_72923_1_); } @@ -689,7 +688,7 @@ } public void func_72847_b(Entity p_72847_1_) -@@ -1161,6 +1505,9 @@ +@@ -1161,6 +1504,9 @@ { ((IWorldEventListener)this.field_73021_x.get(i)).func_72709_b(p_72847_1_); } @@ -699,7 +698,7 @@ } public void func_72900_e(Entity p_72900_1_) -@@ -1204,7 +1551,16 @@ +@@ -1204,7 +1550,16 @@ this.func_72964_e(i, j).func_76622_b(p_72973_1_); } @@ -717,7 +716,7 @@ this.func_72847_b(p_72973_1_); } -@@ -1227,6 +1583,7 @@ +@@ -1227,6 +1582,7 @@ IBlockState iblockstate = Blocks.field_150348_b.func_176223_P(); BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); @@ -725,7 +724,7 @@ try { for (int k1 = i; k1 < j; ++k1) -@@ -1269,7 +1626,7 @@ +@@ -1269,7 +1625,7 @@ iblockstate1.func_185908_a(this, blockpos$pooledmutableblockpos, p_191504_2_, p_191504_4_, p_191504_1_, false); @@ -734,7 +733,7 @@ { boolean flag5 = true; return flag5; -@@ -1319,11 +1676,10 @@ +@@ -1319,11 +1675,10 @@ } } } @@ -747,7 +746,7 @@ public void func_72848_b(IWorldEventListener p_72848_1_) { this.field_73021_x.remove(p_72848_1_); -@@ -1361,19 +1717,38 @@ +@@ -1361,19 +1716,38 @@ public int func_72967_a(float p_72967_1_) { @@ -788,7 +787,7 @@ float f = this.func_72826_c(p_72971_1_); float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.2F); f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1386,6 +1761,12 @@ +@@ -1386,6 +1760,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72833_a(Entity p_72833_1_, float p_72833_2_) { @@ -801,7 +800,7 @@ float f = this.func_72826_c(p_72833_2_); float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F; f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1393,9 +1774,7 @@ +@@ -1393,9 +1773,7 @@ int j = MathHelper.func_76128_c(p_72833_1_.field_70163_u); int k = MathHelper.func_76128_c(p_72833_1_.field_70161_v); BlockPos blockpos = new BlockPos(i, j, k); @@ -812,7 +811,7 @@ float f3 = (float)(l >> 16 & 255) / 255.0F; float f4 = (float)(l >> 8 & 255) / 255.0F; float f5 = (float)(l & 255) / 255.0F; -@@ -1444,20 +1823,25 @@ +@@ -1444,20 +1822,25 @@ public float func_72826_c(float p_72826_1_) { @@ -841,7 +840,7 @@ public float func_72929_e(float p_72929_1_) { float f = this.func_72826_c(p_72929_1_); -@@ -1467,6 +1851,12 @@ +@@ -1467,6 +1850,12 @@ @SideOnly(Side.CLIENT) public Vec3d func_72824_f(float p_72824_1_) { @@ -854,7 +853,7 @@ float f = this.func_72826_c(p_72824_1_); float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F; f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1522,9 +1912,9 @@ +@@ -1522,9 +1911,9 @@ for (blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); blockpos.func_177956_o() >= 0; blockpos = blockpos1) { blockpos1 = blockpos.func_177977_b(); @@ -866,7 +865,7 @@ { break; } -@@ -1536,6 +1926,12 @@ +@@ -1536,6 +1925,12 @@ @SideOnly(Side.CLIENT) public float func_72880_h(float p_72880_1_) { @@ -879,7 +878,7 @@ float f = this.func_72826_c(p_72880_1_); float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.25F); f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); -@@ -1567,9 +1963,14 @@ +@@ -1567,9 +1962,14 @@ for (int i = 0; i < this.field_73007_j.size(); ++i) { Entity entity = this.field_73007_j.get(i); @@ -895,7 +894,7 @@ ++entity.field_70173_aa; entity.func_70071_h_(); } -@@ -1587,7 +1988,13 @@ +@@ -1587,7 +1987,13 @@ entity.func_85029_a(crashreportcategory); } @@ -910,7 +909,7 @@ } if (entity.field_70128_L) -@@ -1597,6 +2004,7 @@ +@@ -1597,6 +2003,7 @@ } this.field_72984_F.func_76318_c("remove"); @@ -918,7 +917,7 @@ this.field_72996_f.removeAll(this.field_72997_g); for (int k = 0; k < this.field_72997_g.size(); ++k) -@@ -1618,15 +2026,27 @@ +@@ -1618,15 +2025,27 @@ this.field_72997_g.clear(); this.func_184147_l(); @@ -951,7 +950,7 @@ if (!entity3.field_70128_L && entity3.func_184196_w(entity2)) { continue; -@@ -1641,14 +2061,25 @@ +@@ -1641,14 +2060,25 @@ { try { @@ -978,7 +977,7 @@ } } -@@ -1664,24 +2095,38 @@ +@@ -1664,24 +2094,38 @@ { this.func_72964_e(l1, i2).func_76622_b(entity2); } @@ -1022,7 +1021,7 @@ Iterator iterator = this.field_175730_i.iterator(); while (iterator.hasNext()) -@@ -1692,7 +2137,7 @@ +@@ -1692,7 +2136,7 @@ { BlockPos blockpos = tileentity.func_174877_v(); @@ -1031,7 +1030,7 @@ { try { -@@ -1700,16 +2145,28 @@ +@@ -1700,16 +2144,28 @@ { return String.valueOf((Object)TileEntity.func_190559_a(tileentity.getClass())); }); @@ -1063,7 +1062,7 @@ } } -@@ -1720,11 +2177,16 @@ +@@ -1720,11 +2176,16 @@ if (this.func_175667_e(tileentity.func_174877_v())) { @@ -1081,7 +1080,7 @@ this.field_147481_N = false; this.field_72984_F.func_76318_c("pendingBlockEntities"); -@@ -1736,10 +2198,12 @@ +@@ -1736,10 +2197,12 @@ if (!tileentity1.func_145837_r()) { @@ -1096,7 +1095,7 @@ if (this.func_175667_e(tileentity1.func_174877_v())) { -@@ -1747,6 +2211,12 @@ +@@ -1747,6 +2210,12 @@ IBlockState iblockstate = chunk.func_177435_g(tileentity1.func_174877_v()); chunk.func_177426_a(tileentity1.func_174877_v(), tileentity1); this.func_184138_a(tileentity1.func_174877_v(), iblockstate, iblockstate, 3); @@ -1109,7 +1108,7 @@ } } } -@@ -1754,6 +2224,8 @@ +@@ -1754,6 +2223,8 @@ this.field_147484_a.clear(); } @@ -1118,7 +1117,7 @@ this.field_72984_F.func_76319_b(); this.field_72984_F.func_76319_b(); } -@@ -1764,12 +2236,18 @@ +@@ -1764,12 +2235,18 @@ public boolean func_175700_a(TileEntity p_175700_1_) { @@ -1137,7 +1136,7 @@ if (this.field_72995_K) { -@@ -1785,6 +2263,11 @@ +@@ -1785,6 +2262,11 @@ { if (this.field_147481_N) { @@ -1149,7 +1148,7 @@ this.field_147484_a.addAll(p_147448_1_); } else -@@ -1807,14 +2290,26 @@ +@@ -1807,14 +2289,26 @@ { int j2 = MathHelper.func_76128_c(p_72866_1_.field_70165_t); int k2 = MathHelper.func_76128_c(p_72866_1_.field_70161_v); @@ -1178,7 +1177,7 @@ p_72866_1_.field_70142_S = p_72866_1_.field_70165_t; p_72866_1_.field_70137_T = p_72866_1_.field_70163_u; p_72866_1_.field_70136_U = p_72866_1_.field_70161_v; -@@ -1831,7 +2326,9 @@ +@@ -1831,7 +2325,9 @@ } else { @@ -1188,7 +1187,7 @@ } } -@@ -1914,7 +2411,7 @@ +@@ -1914,7 +2410,7 @@ { Entity entity4 = list.get(j2); @@ -1197,7 +1196,7 @@ { return false; } -@@ -1972,6 +2469,12 @@ +@@ -1972,6 +2468,12 @@ { IBlockState iblockstate1 = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(l3, i4, j4)); @@ -1210,7 +1209,7 @@ if (iblockstate1.func_185904_a().func_76224_d()) { blockpos$pooledmutableblockpos.func_185344_t(); -@@ -2011,6 +2514,11 @@ +@@ -2011,6 +2513,11 @@ blockpos$pooledmutableblockpos.func_185344_t(); return true; } @@ -1222,7 +1221,7 @@ } } } -@@ -2050,6 +2558,16 @@ +@@ -2050,6 +2557,16 @@ IBlockState iblockstate1 = this.func_180495_p(blockpos$pooledmutableblockpos); Block block = iblockstate1.func_177230_c(); @@ -1239,7 +1238,7 @@ if (iblockstate1.func_185904_a() == p_72918_2_) { double d0 = (double)((float)(i4 + 1) - BlockLiquid.func_149801_b(((Integer)iblockstate1.func_177229_b(BlockLiquid.field_176367_b)).intValue())); -@@ -2095,7 +2613,14 @@ +@@ -2095,7 +2612,14 @@ { for (int j4 = j3; j4 < k3; ++j4) { @@ -1255,7 +1254,7 @@ { blockpos$pooledmutableblockpos.func_185344_t(); return true; -@@ -2116,6 +2641,7 @@ +@@ -2116,6 +2640,7 @@ public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_) { Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_); @@ -1263,7 +1262,7 @@ explosion.func_77278_a(); explosion.func_77279_a(true); return explosion; -@@ -2227,7 +2753,7 @@ +@@ -2227,7 +2752,7 @@ { TileEntity tileentity2 = this.field_147484_a.get(j2); @@ -1272,7 +1271,7 @@ { return tileentity2; } -@@ -2238,6 +2764,7 @@ +@@ -2238,6 +2763,7 @@ public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) { @@ -1280,7 +1279,7 @@ if (!this.func_189509_E(p_175690_1_)) { if (p_175690_2_ != null && !p_175690_2_.func_145837_r()) -@@ -2245,7 +2772,10 @@ +@@ -2245,7 +2771,10 @@ if (this.field_147481_N) { p_175690_2_.func_174878_a(p_175690_1_); @@ -1291,7 +1290,7 @@ while (iterator1.hasNext()) { -@@ -2253,16 +2783,19 @@ +@@ -2253,16 +2782,19 @@ if (tileentity2.func_174877_v().equals(p_175690_1_)) { @@ -1313,7 +1312,7 @@ this.func_175700_a(p_175690_2_); } } -@@ -2277,6 +2810,8 @@ +@@ -2277,6 +2809,8 @@ { tileentity2.func_145843_s(); this.field_147484_a.remove(tileentity2); @@ -1322,7 +1321,7 @@ } else { -@@ -2289,6 +2824,7 @@ +@@ -2289,6 +2823,7 @@ this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_); } @@ -1330,7 +1329,7 @@ } public void func_147457_a(TileEntity p_147457_1_) -@@ -2315,7 +2851,7 @@ +@@ -2315,7 +2850,7 @@ if (chunk1 != null && !chunk1.func_76621_g()) { IBlockState iblockstate1 = this.func_180495_p(p_175677_1_); @@ -1339,7 +1338,7 @@ } else { -@@ -2338,6 +2874,7 @@ +@@ -2338,6 +2873,7 @@ { this.field_72985_G = p_72891_1_; this.field_72992_H = p_72891_2_; @@ -1347,7 +1346,7 @@ } public void func_72835_b() -@@ -2347,6 +2884,11 @@ +@@ -2347,6 +2883,11 @@ protected void func_72947_a() { @@ -1359,7 +1358,7 @@ if (this.field_72986_A.func_76059_o()) { this.field_73004_o = 1.0F; -@@ -2360,6 +2902,11 @@ +@@ -2360,6 +2901,11 @@ protected void func_72979_l() { @@ -1371,7 +1370,7 @@ if (this.field_73011_w.func_191066_m()) { if (!this.field_72995_K) -@@ -2451,6 +2998,13 @@ +@@ -2451,6 +2997,13 @@ } this.field_73004_o = MathHelper.func_76131_a(this.field_73004_o, 0.0F, 1.0F); @@ -1385,7 +1384,7 @@ } } } -@@ -2484,6 +3038,11 @@ +@@ -2484,6 +3037,11 @@ public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_) { @@ -1397,7 +1396,7 @@ Biome biome = this.func_180494_b(p_175670_1_); float f = biome.func_180626_a(p_175670_1_); -@@ -2525,6 +3084,11 @@ +@@ -2525,6 +3083,11 @@ public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_) { @@ -1409,7 +1408,7 @@ Biome biome = this.func_180494_b(p_175708_1_); float f = biome.func_180626_a(p_175708_1_); -@@ -2542,7 +3106,7 @@ +@@ -2542,7 +3105,7 @@ { IBlockState iblockstate1 = this.func_180495_p(p_175708_1_); @@ -1418,7 +1417,7 @@ { return true; } -@@ -2574,10 +3138,10 @@ +@@ -2574,10 +3137,10 @@ else { IBlockState iblockstate1 = this.func_180495_p(p_175638_1_); @@ -1432,7 +1431,7 @@ { k2 = 1; } -@@ -2589,7 +3153,7 @@ +@@ -2589,7 +3152,7 @@ if (k2 >= 15) { @@ -1441,7 +1440,7 @@ } else if (j2 >= 14) { -@@ -2628,14 +3192,16 @@ +@@ -2628,14 +3191,16 @@ } } @@ -1462,7 +1461,7 @@ int j2 = 0; int k2 = 0; this.field_72984_F.func_76320_a("getBrightness"); -@@ -2673,7 +3239,7 @@ +@@ -2673,7 +3238,7 @@ int l5 = MathHelper.func_76130_a(k4 - k3); int i6 = MathHelper.func_76130_a(l4 - l3); @@ -1471,7 +1470,7 @@ { BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.func_185346_s(); -@@ -2683,7 +3249,8 @@ +@@ -2683,7 +3248,8 @@ int k6 = k4 + enumfacing.func_96559_d(); int l6 = l4 + enumfacing.func_82599_e(); blockpos$pooledmutableblockpos.func_181079_c(j6, k6, l6); @@ -1481,7 +1480,7 @@ j5 = this.func_175642_b(p_180500_1_, blockpos$pooledmutableblockpos); if (j5 == i5 - i7 && k2 < this.field_72994_J.length) -@@ -2725,7 +3292,7 @@ +@@ -2725,7 +3291,7 @@ int j9 = Math.abs(i8 - l3); boolean flag = k2 < this.field_72994_J.length - 6; @@ -1490,7 +1489,7 @@ { if (this.func_175642_b(p_180500_1_, blockpos2.func_177976_e()) < k8) { -@@ -2791,10 +3358,10 @@ +@@ -2791,10 +3357,10 @@ public List func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate p_175674_3_) { List list = Lists.newArrayList(); @@ -1505,7 +1504,7 @@ for (int j3 = j2; j3 <= k2; ++j3) { -@@ -2847,10 +3414,10 @@ +@@ -2847,10 +3413,10 @@ public List func_175647_a(Class p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate p_175647_3_) { @@ -1520,7 +1519,7 @@ List list = Lists.newArrayList(); for (int j3 = j2; j3 < k2; ++j3) -@@ -2919,7 +3486,16 @@ +@@ -2919,7 +3485,16 @@ for (Entity entity4 : this.field_72996_f) { @@ -1538,7 +1537,7 @@ { ++j2; } -@@ -2930,11 +3506,16 @@ +@@ -2930,11 +3505,16 @@ public void func_175650_b(Collection p_175650_1_) { @@ -1558,7 +1557,7 @@ } } -@@ -2948,18 +3529,26 @@ +@@ -2948,18 +3528,26 @@ IBlockState iblockstate1 = this.func_180495_p(p_190527_2_); AxisAlignedBB axisalignedbb = p_190527_3_ ? null : p_190527_1_.func_176223_P().func_185890_d(this, p_190527_2_); @@ -1589,7 +1588,7 @@ } public int func_181545_F() -@@ -3042,7 +3631,7 @@ +@@ -3042,7 +3630,7 @@ public int func_175651_c(BlockPos p_175651_1_, EnumFacing p_175651_2_) { IBlockState iblockstate1 = this.func_180495_p(p_175651_1_); @@ -1598,7 +1597,7 @@ } public boolean func_175640_z(BlockPos p_175640_1_) -@@ -3124,6 +3713,12 @@ +@@ -3124,6 +3712,12 @@ { EntityPlayer entityplayer1 = this.field_73010_i.get(j2); @@ -1611,7 +1610,7 @@ if (p_190525_9_.apply(entityplayer1)) { double d1 = entityplayer1.func_70092_e(p_190525_1_, p_190525_3_, p_190525_5_); -@@ -3208,6 +3803,8 @@ +@@ -3208,6 +3802,8 @@ d2 *= ((Double)MoreObjects.firstNonNull(p_184150_11_.apply(entityplayer1), Double.valueOf(1.0D))).doubleValue(); } @@ -1620,7 +1619,7 @@ if ((p_184150_9_ < 0.0D || Math.abs(entityplayer1.field_70163_u - p_184150_3_) < p_184150_9_ * p_184150_9_) && (p_184150_7_ < 0.0D || d1 < d2 * d2) && (d0 == -1.0D || d1 < d0)) { d0 = d1; -@@ -3269,7 +3866,7 @@ +@@ -3269,7 +3865,7 @@ public long func_72905_C() { @@ -1629,7 +1628,7 @@ } public long func_82737_E() -@@ -3279,17 +3876,17 @@ +@@ -3279,17 +3875,17 @@ public long func_72820_D() { @@ -1650,7 +1649,7 @@ if (!this.func_175723_af().func_177746_a(blockpos1)) { -@@ -3301,7 +3898,7 @@ +@@ -3301,7 +3897,7 @@ public void func_175652_B(BlockPos p_175652_1_) { @@ -1659,7 +1658,7 @@ } @SideOnly(Side.CLIENT) -@@ -3321,12 +3918,18 @@ +@@ -3321,12 +3917,18 @@ if (!this.field_72996_f.contains(p_72897_1_)) { @@ -1678,7 +1677,7 @@ return true; } -@@ -3361,8 +3964,19 @@ +@@ -3361,8 +3963,19 @@ public void func_72854_c() { @@ -1698,7 +1697,7 @@ public float func_72819_i(float p_72819_1_) { return (this.field_73018_p + (this.field_73017_q - this.field_73018_p) * p_72819_1_) * this.func_72867_j(p_72819_1_); -@@ -3428,8 +4042,7 @@ +@@ -3428,8 +4041,7 @@ public boolean func_180502_D(BlockPos p_180502_1_) { @@ -1708,7 +1707,7 @@ } @Nullable -@@ -3490,12 +4103,12 @@ +@@ -3490,12 +4102,12 @@ public int func_72800_K() { @@ -1723,7 +1722,7 @@ } public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_) -@@ -3539,7 +4152,7 @@ +@@ -3539,7 +4151,7 @@ @SideOnly(Side.CLIENT) public double func_72919_O() { @@ -1732,7 +1731,7 @@ } public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_) -@@ -3573,7 +4186,7 @@ +@@ -3573,7 +4185,7 @@ public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) { @@ -1741,7 +1740,7 @@ { BlockPos blockpos1 = p_175666_1_.func_177972_a(enumfacing); -@@ -3581,18 +4194,15 @@ +@@ -3581,18 +4193,15 @@ { IBlockState iblockstate1 = this.func_180495_p(blockpos1); @@ -1764,7 +1763,7 @@ } } } -@@ -3655,9 +4265,127 @@ +@@ -3655,9 +4264,127 @@ int j2 = p_72916_1_ * 16 + 8 - blockpos1.func_177958_n(); int k2 = p_72916_2_ * 16 + 8 - blockpos1.func_177952_p(); int l2 = 128;