diff --git a/fml-src-13w02b-4.99.0.528-snapshot15.zip b/fml-src-13w02b-4.99.16.541-snapshot15.zip similarity index 92% rename from fml-src-13w02b-4.99.0.528-snapshot15.zip rename to fml-src-13w02b-4.99.16.541-snapshot15.zip index 034fa897c..85fb498f0 100644 Binary files a/fml-src-13w02b-4.99.0.528-snapshot15.zip and b/fml-src-13w02b-4.99.16.541-snapshot15.zip differ diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index b3b07516d..aaa441c04 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -93,7 +93,7 @@ } @SideOnly(Side.CLIENT) -@@ -623,7 +643,13 @@ +@@ -634,7 +654,13 @@ /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate */ @@ -108,7 +108,7 @@ /** * Returns the quantity of items to drop on block destruction. -@@ -647,8 +673,7 @@ +@@ -658,8 +684,7 @@ */ public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5) { @@ -118,7 +118,7 @@ } /** -@@ -666,18 +691,13 @@ +@@ -677,18 +702,13 @@ { if (!par1World.isRemote) { @@ -141,7 +141,7 @@ } } } -@@ -1067,7 +1087,7 @@ +@@ -1081,7 +1101,7 @@ par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1); par2EntityPlayer.addExhaustion(0.025F); @@ -150,7 +150,7 @@ { ItemStack itemstack = this.createStackedBlock(par6); -@@ -1384,4 +1404,846 @@ +@@ -1398,4 +1418,846 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); } diff --git a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch index db7e4b111..62413eb6e 100644 --- a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch @@ -1,21 +1,21 @@ --- ../src_base/minecraft/net/minecraft/block/BlockBaseRailLogic.java +++ ../src_work/minecraft/net/minecraft/block/BlockBaseRailLogic.java -@@ -13,6 +13,8 @@ - private int field_94515_e; +@@ -14,6 +14,8 @@ private final boolean field_94512_f; private List field_94513_g; -+ + + private final boolean canMakeSlopes; ++ + final BlockRailBase field_94518_a; - final BlockBaseRail field_94518_a; - + public BlockBaseRailLogic(BlockRailBase par1, World par2, int par3, int par4, int par5) @@ -25,17 +27,11 @@ this.field_94514_d = par4; this.field_94515_e = par5; - int l = par2World.getBlockId(par3, par4, par5); -- int i1 = par2World.getBlockMetadata(par3, par4, par5); + int l = par2.getBlockId(par3, par4, par5); +- int i1 = par2.getBlockMetadata(par3, par4, par5); - -- if (((BlockBaseRail)Block.blocksList[l]).isPowered) +- if (((BlockRailBase)Block.blocksList[l]).isPowered) - { - this.field_94512_f = true; - i1 &= -9; @@ -24,11 +24,11 @@ - { - this.field_94512_f = false; - } -+ -+ BlockBaseRail target = (BlockBaseRail)Block.blocksList[l]; -+ int i1 = target.getBasicRailMetadata(par2World, null, par3, par4, par5); -+ field_94512_f = !target.isFlexibleRail(par2World, par3, par4, par5); -+ canMakeSlopes = target.canMakeSlopes(par2World, par3, par4, par5); ++ ++ BlockRailBase target = (BlockRailBase)Block.blocksList[l]; ++ int i1 = target.getBasicRailMetadata(par2, null, par3, par4, par5); ++ field_94512_f = !target.isFlexibleRail(par2, par3, par4, par5); ++ canMakeSlopes = target.canMakeSlopes(par2, par3, par4, par5); this.func_94504_a(i1); } @@ -39,7 +39,7 @@ - if (b0 == 0) + if (b0 == 0 && canMakeSlopes) { - if (BlockBaseRail.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) + if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) { @@ -240,7 +236,7 @@ } @@ -48,7 +48,7 @@ - if (b0 == 1) + if (b0 == 1 && canMakeSlopes) { - if (BlockBaseRail.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) + if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) { @@ -385,7 +381,7 @@ } @@ -57,7 +57,7 @@ - if (b0 == 0) + if (b0 == 0 && canMakeSlopes) { - if (BlockBaseRail.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) + if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) { @@ -398,7 +394,7 @@ } @@ -66,5 +66,5 @@ - if (b0 == 1) + if (b0 == 1 && canMakeSlopes) { - if (BlockBaseRail.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) + if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) { diff --git a/patches/minecraft/net/minecraft/block/BlockButton.java.patch b/patches/minecraft/net/minecraft/block/BlockButton.java.patch index ba604dc3f..f5ca96a7f 100644 --- a/patches/minecraft/net/minecraft/block/BlockButton.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockButton.java.patch @@ -10,7 +10,7 @@ public abstract class BlockButton extends Block { /** Whether this button is sensible to arrows, used by wooden buttons. */ -@@ -63,7 +66,11 @@ +@@ -66,7 +69,11 @@ */ public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) { @@ -23,7 +23,7 @@ } /** -@@ -71,7 +78,10 @@ +@@ -74,7 +81,10 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { @@ -35,7 +35,7 @@ } /** -@@ -83,19 +93,22 @@ +@@ -86,19 +96,22 @@ int k1 = j1 & 8; j1 &= 7; @@ -62,7 +62,7 @@ { j1 = 1; } -@@ -112,7 +125,11 @@ +@@ -115,7 +128,11 @@ */ private int getOrientation(World par1World, int par2, int par3, int par4) { @@ -75,7 +75,7 @@ } /** -@@ -126,22 +143,22 @@ +@@ -129,22 +146,22 @@ int i1 = par1World.getBlockMetadata(par2, par3, par4) & 7; boolean flag = false; diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index e234179d4..1deb1ee93 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/block/BlockDoor.java +++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java -@@ -231,7 +231,7 @@ +@@ -235,7 +235,7 @@ { if (this.blockMaterial == Material.iron) { diff --git a/patches/minecraft/net/minecraft/block/BlockFire.java.patch b/patches/minecraft/net/minecraft/block/BlockFire.java.patch index b95324346..0fa2c859c 100644 --- a/patches/minecraft/net/minecraft/block/BlockFire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFire.java.patch @@ -29,7 +29,7 @@ } /** -@@ -118,12 +122,8 @@ +@@ -121,12 +125,8 @@ { if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick")) { @@ -44,7 +44,7 @@ if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) { -@@ -152,7 +152,7 @@ +@@ -155,7 +155,7 @@ par1World.func_94571_i(par2, par3, par4); } } @@ -53,7 +53,7 @@ { par1World.func_94571_i(par2, par3, par4); } -@@ -166,12 +166,12 @@ +@@ -169,12 +169,12 @@ b0 = -50; } @@ -72,7 +72,7 @@ for (int i1 = par2 - 1; i1 <= par2 + 1; ++i1) { -@@ -225,9 +225,20 @@ +@@ -228,9 +228,20 @@ return false; } @@ -94,7 +94,7 @@ if (par6Random.nextInt(par5) < j1) { -@@ -261,7 +272,12 @@ +@@ -264,7 +275,12 @@ */ private boolean canNeighborBurn(World par1World, int par2, int par3, int par4) { @@ -108,7 +108,7 @@ } /** -@@ -277,12 +293,12 @@ +@@ -280,12 +296,12 @@ } else { @@ -127,7 +127,7 @@ return l; } } -@@ -297,21 +313,24 @@ +@@ -300,21 +316,24 @@ /** * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z @@ -157,7 +157,7 @@ } /** -@@ -369,9 +388,9 @@ +@@ -372,9 +391,9 @@ float f1; float f2; @@ -170,7 +170,7 @@ { for (l = 0; l < 2; ++l) { -@@ -382,7 +401,7 @@ +@@ -385,7 +404,7 @@ } } @@ -179,7 +179,7 @@ { for (l = 0; l < 2; ++l) { -@@ -393,7 +412,7 @@ +@@ -396,7 +415,7 @@ } } @@ -188,7 +188,7 @@ { for (l = 0; l < 2; ++l) { -@@ -404,7 +423,7 @@ +@@ -407,7 +426,7 @@ } } @@ -197,7 +197,7 @@ { for (l = 0; l < 2; ++l) { -@@ -415,7 +434,7 @@ +@@ -418,7 +437,7 @@ } } @@ -206,7 +206,7 @@ { for (l = 0; l < 2; ++l) { -@@ -459,4 +478,46 @@ +@@ -462,4 +481,46 @@ { return this.field_94439_c[0]; } diff --git a/patches/minecraft/net/minecraft/block/BlockBaseRail.java.patch b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch similarity index 94% rename from patches/minecraft/net/minecraft/block/BlockBaseRail.java.patch rename to patches/minecraft/net/minecraft/block/BlockRailBase.java.patch index e5d440836..700502a61 100644 --- a/patches/minecraft/net/minecraft/block/BlockBaseRail.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockBaseRail.java -+++ ../src_work/minecraft/net/minecraft/block/BlockBaseRail.java +--- ../src_base/minecraft/net/minecraft/block/BlockRailBase.java ++++ ../src_work/minecraft/net/minecraft/block/BlockRailBase.java @@ -3,6 +3,7 @@ import java.util.Random; import net.minecraft.block.material.Material; @@ -13,10 +13,10 @@ public static final boolean isRailBlock(int par0) { - return par0 == Block.rail.blockID || par0 == Block.railPowered.blockID || par0 == Block.railDetector.blockID || par0 == Block.field_94337_cv.blockID; -+ return Block.blocksList[par0] instanceof BlockBaseRail; ++ return Block.blocksList[par0] instanceof BlockRailBase; } - protected BlockBaseRail(int par1, boolean par2) + protected BlockRailBase(int par1, boolean par2) @@ -105,7 +106,7 @@ */ public int getRenderType() diff --git a/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch b/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch index d6a78a170..626228d4d 100644 --- a/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch @@ -10,7 +10,7 @@ public class BlockTripWireSource extends Block { public BlockTripWireSource(int par1) -@@ -61,7 +64,11 @@ +@@ -64,7 +67,11 @@ */ public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) { @@ -23,7 +23,7 @@ } /** -@@ -69,7 +76,10 @@ +@@ -72,7 +79,10 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { @@ -35,7 +35,7 @@ } /** -@@ -79,22 +89,22 @@ +@@ -82,22 +92,22 @@ { byte b0 = 0; @@ -62,7 +62,7 @@ { b0 = 3; } -@@ -124,22 +134,22 @@ +@@ -127,22 +137,22 @@ int j1 = i1 & 3; boolean flag = false; @@ -89,7 +89,7 @@ { flag = true; } -@@ -160,7 +170,7 @@ +@@ -163,7 +173,7 @@ boolean flag2 = (par6 & 8) == 8; boolean flag3 = par5 == Block.tripWireSource.blockID; boolean flag4 = false; diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch index 7d9f0d116..28a826861 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch @@ -1,15 +1,15 @@ --- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java -@@ -43,6 +43,8 @@ - import net.minecraft.world.World; +@@ -44,6 +44,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -+ -+import static net.minecraftforge.common.ForgeDirection.*; ++import static net.minecraftforge.common.ForgeDirection.*; ++ @SideOnly(Side.CLIENT) public class RenderBlocks -@@ -629,9 +631,8 @@ + { +@@ -603,9 +605,8 @@ public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4) { Tessellator tessellator = Tessellator.instance; @@ -21,7 +21,7 @@ float f = 0.5F; float f1 = 1.0F; float f2 = 0.8F; -@@ -640,6 +641,7 @@ +@@ -614,6 +615,7 @@ tessellator.setBrightness(j1); tessellator.setColorOpaque_F(f, f, f); Icon icon = this.func_94170_a(par1Block, this.blockAccess, par2, par3, par4, 0); @@ -29,7 +29,7 @@ double d0 = (double)icon.func_94209_e(); double d1 = (double)icon.func_94212_f(); double d2 = (double)icon.func_94206_g(); -@@ -656,6 +658,7 @@ +@@ -630,6 +632,7 @@ tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4)); tessellator.setColorOpaque_F(f1, f1, f1); icon = this.func_94170_a(par1Block, this.blockAccess, par2, par3, par4, 1); @@ -37,7 +37,7 @@ d0 = (double)icon.func_94209_e(); d1 = (double)icon.func_94212_f(); d2 = (double)icon.func_94206_g(); -@@ -2444,7 +2447,7 @@ +@@ -2418,7 +2421,7 @@ double d9; double d10; @@ -46,7 +46,7 @@ { float f1 = 0.2F; float f2 = 0.0625F; -@@ -2464,7 +2467,7 @@ +@@ -2438,7 +2441,7 @@ d0 = d5; } @@ -55,7 +55,7 @@ { tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1); tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 1), d2, d3); -@@ -2476,7 +2479,7 @@ +@@ -2450,7 +2453,7 @@ tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1); } @@ -64,7 +64,7 @@ { tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1); tessellator.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d0, d3); -@@ -2488,7 +2491,7 @@ +@@ -2462,7 +2465,7 @@ tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1); } @@ -73,7 +73,7 @@ { tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1); tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d2, d3); -@@ -2500,7 +2503,7 @@ +@@ -2474,7 +2477,7 @@ tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1); } @@ -82,7 +82,7 @@ { tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1); tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + f2), (double)(par4 + 1 - 0), d0, d3); -@@ -2512,7 +2515,7 @@ +@@ -2486,7 +2489,7 @@ tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1); } diff --git a/patches/minecraft/net/minecraft/entity/ItemChestMinecart.java.patch b/patches/minecraft/net/minecraft/entity/EntityMinecartChest.java.patch similarity index 72% rename from patches/minecraft/net/minecraft/entity/ItemChestMinecart.java.patch rename to patches/minecraft/net/minecraft/entity/EntityMinecartChest.java.patch index f6d1aafef..66c05ad66 100644 --- a/patches/minecraft/net/minecraft/entity/ItemChestMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityMinecartChest.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/ItemChestMinecart.java -+++ ../src_work/minecraft/net/minecraft/entity/ItemChestMinecart.java +--- ../src_base/minecraft/net/minecraft/entity/EntityMinecartChest.java ++++ ../src_work/minecraft/net/minecraft/entity/EntityMinecartChest.java @@ -10,6 +10,8 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.DamageSource; @@ -7,7 +7,7 @@ +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.minecart.MinecartInteractEvent; - public class ItemChestMinecart extends EntityMinecart implements IInventory + public class EntityMinecartChest extends EntityMinecart implements IInventory { @@ -292,6 +294,10 @@ */ diff --git a/patches/minecraft/net/minecraft/entity/ItemRideableMinecart.java.patch b/patches/minecraft/net/minecraft/entity/EntityMinecartEmpty.java.patch similarity index 77% rename from patches/minecraft/net/minecraft/entity/ItemRideableMinecart.java.patch rename to patches/minecraft/net/minecraft/entity/EntityMinecartEmpty.java.patch index 754997ec8..1c9872c45 100644 --- a/patches/minecraft/net/minecraft/entity/ItemRideableMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityMinecartEmpty.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/ItemRideableMinecart.java -+++ ../src_work/minecraft/net/minecraft/entity/ItemRideableMinecart.java +--- ../src_base/minecraft/net/minecraft/entity/EntityMinecartEmpty.java ++++ ../src_work/minecraft/net/minecraft/entity/EntityMinecartEmpty.java @@ -3,6 +3,8 @@ import net.minecraft.entity.item.EntityMinecart; import net.minecraft.entity.player.EntityPlayer; @@ -7,7 +7,7 @@ +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.minecart.MinecartInteractEvent; - public class ItemRideableMinecart extends EntityMinecart + public class EntityMinecartEmpty extends EntityMinecart { @@ -21,6 +23,10 @@ */ diff --git a/patches/minecraft/net/minecraft/entity/ItemFurnaceMinecart.java.patch b/patches/minecraft/net/minecraft/entity/EntityMinecartFurnace.java.patch similarity index 75% rename from patches/minecraft/net/minecraft/entity/ItemFurnaceMinecart.java.patch rename to patches/minecraft/net/minecraft/entity/EntityMinecartFurnace.java.patch index 548a35fa8..d8dfaa3f6 100644 --- a/patches/minecraft/net/minecraft/entity/ItemFurnaceMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityMinecartFurnace.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/ItemFurnaceMinecart.java -+++ ../src_work/minecraft/net/minecraft/entity/ItemFurnaceMinecart.java +--- ../src_base/minecraft/net/minecraft/entity/EntityMinecartFurnace.java ++++ ../src_work/minecraft/net/minecraft/entity/EntityMinecartFurnace.java @@ -8,6 +8,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MathHelper; @@ -7,7 +7,7 @@ +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.minecart.MinecartInteractEvent; - public class ItemFurnaceMinecart extends EntityMinecart + public class EntityMinecartFurnace extends EntityMinecart { @@ -116,6 +118,10 @@ */ diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index 4115e2f3f..acdab7cb9 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -67,12 +67,12 @@ double d5 = 0.0078125D; int l = this.worldObj.getBlockId(j, i, k); -- if (BlockBaseRail.isRailBlock(l)) +- if (BlockRailBase.isRailBlock(l)) - { - this.func_94091_a(j, i, k, d4, d5, l, this.worldObj.getBlockMetadata(j, i, k)); -+ if (canUseRail() && BlockBaseRail.isRailBlock(l)) ++ if (canUseRail() && BlockRailBase.isRailBlock(l)) + { -+ BlockBaseRail rail = (BlockBaseRail)Block.blocksList[l]; ++ BlockRailBase rail = (BlockRailBase)Block.blocksList[l]; + float railMaxSpeed = rail.getRailMaxSpeed(worldObj, this, j, i, k); + double maxSpeed = Math.min(railMaxSpeed, getCurrentCartSpeedCapOnRail()); + this.func_94091_a(j, i, k, maxSpeed, getSlopeAdjustment(), l, rail.getBasicRailMetadata(worldObj, this, j, i, k)); @@ -108,15 +108,17 @@ this.riddenByEntity = null; } -+ ++ + MinecraftForge.EVENT_BUS.post(new MinecartUpdateEvent(this, j, i, k)); } } -@@ -431,6 +473,17 @@ +@@ -429,6 +471,17 @@ + if (this.motionZ > par1) + { this.motionZ = par1; - } - ++ } ++ + double moveY = motionY; + if(getMaxSpeedAirVertical() > 0 && motionY > getMaxSpeedAirVertical()) + { @@ -126,11 +128,9 @@ + moveY = 0.15f; + motionY = moveY; + } -+ } -+ + } + if (this.onGround) - { - this.motionX *= 0.5D; @@ -438,13 +491,13 @@ this.motionZ *= 0.5D; } @@ -201,21 +201,19 @@ - } - - this.moveEntity(d12, 0.0D, d13); -+ ++ + moveMinecartOnRail(par1, par2, par3, par4); if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2]) { -@@ -637,8 +662,13 @@ - this.motionX = d6 * (double)(j1 - par1); +@@ -638,7 +663,12 @@ this.motionZ = d6 * (double)(k1 - par3); } -- + - if (flag) -+ + if(shouldDoRailFunctions()) + { -+ ((BlockBaseRail)Block.blocksList[par8]).onMinecartPass(worldObj, this, par1, par2, par3); ++ ((BlockRailBase)Block.blocksList[par8]).onMinecartPass(worldObj, this, par1, par2, par3); + } + + if (flag && shouldDoRailFunctions()) @@ -228,23 +226,23 @@ { - int i1 = this.worldObj.getBlockMetadata(i, j, k); - -- if (((BlockBaseRail)Block.blocksList[l]).isPowered()) +- if (((BlockRailBase)Block.blocksList[l]).isPowered()) - { - i1 &= 7; - } -+ int i1 = ((BlockBaseRail)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); ++ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); par3 = (double)j; @@ -760,13 +785,8 @@ - if (BlockBaseRail.isRailBlock(l)) + if (BlockRailBase.isRailBlock(l)) { - int i1 = this.worldObj.getBlockMetadata(i, j, k); -+ int i1 = ((BlockBaseRail)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); ++ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); par3 = (double)j; - -- if (((BlockBaseRail)Block.blocksList[l]).isPowered()) +- if (((BlockRailBase)Block.blocksList[l]).isPowered()) - { - i1 &= 7; - } @@ -292,7 +290,7 @@ { return this.field_94102_c != null ? this.field_94102_c : super.getEntityName(); } -+ ++ + /** + * Moved to allow overrides. + * This code handles minecart movement and speed capping when on a rail. @@ -329,7 +327,7 @@ + + this.moveEntity(d12, 0.0D, d13); + } -+ ++ + /** + * Gets the current global Minecart Collision handler if none + * is registered, returns null @@ -349,7 +347,7 @@ + { + collisionHandler = handler; + } -+ ++ + /** + * This function returns an ItemStack that represents this cart. + * This should be an ItemStack that can be used by the player to place the cart, @@ -357,21 +355,21 @@ + * @return An ItemStack that can be used to place the cart. + */ + public ItemStack getCartItem() { -+ if (this instanceof ItemChestMinecart) ++ if (this instanceof EntityMinecartChest) + { + return new ItemStack(Item.minecartCrate); -+ } -+ if (this instanceof ItemTntMinecart) ++ } ++ if (this instanceof EntityMinecartTNT) + { + return new ItemStack(Item.field_94582_cb); -+ } -+ if (this instanceof ItemFurnaceMinecart) ++ } ++ if (this instanceof EntityMinecartFurnace) + { + return new ItemStack(Item.minecartPowered); + } + return new ItemStack(Item.minecartEmpty); + } -+ ++ + /** + * Returns true if this cart can currently use rails. + * This function is mainly used to gracefully detach a minecart from a rail. @@ -400,7 +398,7 @@ + { + return true; + } -+ ++ + /** + * Returns true if this cart is self propelled. + * @return True if powered. @@ -409,20 +407,20 @@ + { + return func_94087_l() == 2; + } -+ ++ + /** + * Returns true if this cart can be ridden by an Entity. + * @return True if this cart can be ridden. + */ + public boolean canBeRidden() + { -+ if(this instanceof ItemRideableMinecart) ++ if(this instanceof EntityMinecartEmpty) + { + return true; + } + return false; + } -+ ++ + /** + * Getters/setters for physics variables + */ @@ -440,7 +438,7 @@ + { + return 1.2f; + } -+ ++ + /** + * Returns the current speed cap for the cart when traveling on rails. This + * functions differs from getMaxCartSpeedOnRail() in that it controls @@ -489,7 +487,7 @@ + { + dragAir = value; + } -+ ++ + public double getSlopeAdjustment() + { + return 0.0078125D; diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index c2617ad31..a14e837d0 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -36,7 +36,7 @@ } itemsList[256 + par1] = this; -@@ -621,6 +627,10 @@ +@@ -625,6 +631,10 @@ float f7 = f4 * f5; float f8 = f3 * f5; double d3 = 5.0D; @@ -47,7 +47,7 @@ Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3); } -@@ -701,4 +711,266 @@ +@@ -705,4 +715,266 @@ { StatList.initStats(); } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index 2815ac1a8..0977b92b2 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -2,25 +2,25 @@ +++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java @@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer; - import net.minecraft.inventory.ContainerWorldly; + import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; -@@ -17,7 +18,10 @@ +@@ -16,8 +17,9 @@ + import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; - --public class TileEntityFurnace extends TileEntity implements ContainerWorldly +- +-public class TileEntityFurnace extends TileEntity implements ISidedInventory +import net.minecraftforge.common.ForgeDirection; -+import net.minecraftforge.common.ISidedInventory; + -+public class TileEntityFurnace extends TileEntity implements ContainerWorldly, ISidedInventory ++public class TileEntityFurnace extends TileEntity implements ISidedInventory, net.minecraftforge.common.ISidedInventory { /** * The ItemStacks that hold the items currently being used in the furnace -@@ -268,8 +272,7 @@ +@@ -268,8 +270,7 @@ if (this.furnaceItemStacks[1].stackSize == 0) { @@ -30,7 +30,7 @@ } } } -@@ -315,8 +318,12 @@ +@@ -315,8 +316,12 @@ } else { @@ -45,7 +45,7 @@ } } -@@ -327,15 +334,15 @@ +@@ -327,15 +332,15 @@ { if (this.canSmelt()) { @@ -65,7 +65,7 @@ } --this.furnaceItemStacks[0].stackSize; -@@ -362,7 +369,7 @@ +@@ -362,7 +367,7 @@ int i = par0ItemStack.getItem().itemID; Item item = par0ItemStack.getItem(); @@ -74,30 +74,30 @@ { Block block = Block.blocksList[i]; -@@ -423,4 +430,41 @@ +@@ -423,4 +428,41 @@ { return 1; } + + /*********************************************************************************** -+ * This function is here for compatibilities sake, Modders should Check for ++ * This function is here for compatibilities sake, Modders should Check for + * Sided before ContainerWorldly, Vanilla Minecraft does not follow the sided standard + * that Modding has for a while. -+ * ++ * + * In vanilla: -+ * ++ * + * Top: Ores + * Sides: Fuel + * Bottom: Output -+ * ++ * + * Standard Modding: + * Top: Ores + * Sides: Output -+ * Bottom: Fuel -+ * -+ * The Modding one is designed after the GUI, the vanilla one is designed because its ++ * Bottom: Fuel ++ * ++ * The Modding one is designed after the GUI, the vanilla one is designed because its + * intended use is for the hopper, which logically would take things in from the top. -+ * ++ * + * This will possibly be removed in future updates, and make vanilla the definitive + * standard. + */ diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 8a281e3a6..278afa9a1 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -613,7 +613,7 @@ } } -@@ -3619,6 +3725,11 @@ +@@ -3622,6 +3728,11 @@ else { if (block != null && (block == Block.waterMoving || block == Block.waterStill || block == Block.lavaMoving || block == Block.lavaStill || block == Block.fire || block.blockMaterial.isReplaceable())) @@ -625,7 +625,7 @@ { block = null; } -@@ -3907,7 +4018,7 @@ +@@ -3910,7 +4021,7 @@ */ public long getSeed() { @@ -634,7 +634,7 @@ } public long getTotalWorldTime() -@@ -3917,7 +4028,7 @@ +@@ -3920,7 +4031,7 @@ public long getWorldTime() { @@ -643,7 +643,7 @@ } /** -@@ -3925,7 +4036,7 @@ +@@ -3928,7 +4039,7 @@ */ public void setWorldTime(long par1) { @@ -652,7 +652,7 @@ } /** -@@ -3933,13 +4044,13 @@ +@@ -3936,13 +4047,13 @@ */ public ChunkCoordinates getSpawnPoint() { @@ -668,7 +668,7 @@ } @SideOnly(Side.CLIENT) -@@ -3963,7 +4074,10 @@ +@@ -3966,7 +4077,10 @@ if (!this.loadedEntityList.contains(par1Entity)) { @@ -680,7 +680,7 @@ } } -@@ -3971,6 +4085,11 @@ +@@ -3974,6 +4088,11 @@ * Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here. */ public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) @@ -692,7 +692,7 @@ { return true; } -@@ -4091,8 +4210,7 @@ +@@ -4094,8 +4213,7 @@ */ public boolean isBlockHighHumidity(int par1, int par2, int par3) { @@ -702,7 +702,7 @@ } /** -@@ -4167,7 +4285,7 @@ +@@ -4170,7 +4288,7 @@ */ public int getHeight() { @@ -711,7 +711,7 @@ } /** -@@ -4175,7 +4293,7 @@ +@@ -4178,7 +4296,7 @@ */ public int getActualHeight() { @@ -720,7 +720,7 @@ } public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart) -@@ -4218,7 +4336,7 @@ +@@ -4221,7 +4339,7 @@ */ public double getHorizon() { @@ -729,7 +729,7 @@ } /** -@@ -4279,4 +4397,75 @@ +@@ -4282,4 +4400,75 @@ @SideOnly(Side.CLIENT) public void func_92088_a(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound) {}