diff --git a/common/forge_at.cfg b/common/forge_at.cfg index b9fb01b81..20384f9ab 100644 --- a/common/forge_at.cfg +++ b/common/forge_at.cfg @@ -1,95 +1,95 @@ #Main Forge Access Transformer configuration file # RailLogic.getNAdjacentTracks -public akh.a(Lakh;)I # RailLogic/func_73650_a +public all.a(Lall;)I #MD:RailLogic/func_73650_a # Tessellator -public-f azb.a # Tessellator/field_78398_a instance -public azb.u # Tessellator/field_78409_u drawMode -public azb.v # Tessellator/field_78408_v xOffset -public azb.w # Tessellator/field_78407_w yOffset -public azb.x # Tessellator/field_78417_xzOffset -public azb.z # Tessellator/field_78415_z isDrawing +public-f bah.a #FD:Tessellator/field_78398_a #instance +public bah.u #FD:Tessellator/field_78409_u #drawMode +public bah.v #FD:Tessellator/field_78408_v #xOffset +public bah.w #FD:Tessellator/field_78407_w #yOffset +public bah.x #FD:Tessellator/field_78417_x #zOffset +public bah.z #FD:Tessellator/field_78415_z #isDrawing # ItemPickaxe -public uc.(ILtu;)V # constructor -public+f uc.c # ItemPickaxe/field_77867_c blocksEffectiveAgainst +public ut.(ILul;)V #MD:ItemPickaxe/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f ut.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst # ItemAxe -public tr.(ILtu;)V # constructor -public+f tr.c # ItemAxe/field_77868_c blocksEffectiveAgainst +public ui.(ILul;)V #MD:ItemAxe/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f ui.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst # ItemSpade -public un.(ILtu;)V # constructor -public+f un.c # ItemSpade/field_77866_c blocksEffectiveAgainst +public ve.(ILul;)V #MD:ItemSpade/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f ve.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst # ItemTool -public td.a # ItemTool/field_77864_a efficiencyOnProperMaterial -public td.ck # ItemTool/field_77865_bY damageVsEntity +public tu.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial +public tu.cl #FD:ItemTool/field_77865_bY #damageVsEntity # EntityEnderman -public pm.d # EntityEnderman/field_70827_d carriableBlocks +public qd.d #FD:EntityEnderman/field_70827_d #carriableBlocks # RenderGlobal -public ayy.h # RenderGlobal/field_72769_h theWorld -public ayy.i # RenderGlobal/field_72770_i renderEngine -public ayy.q # RenderGlobal/field_72777_q mc -public ayy.r # RenderGlobal/field_72776_r globalRenderBlocks -public aty.E # RenderGlobal/field_72738_E damagedBlocks +public bad.h #FD:RenderGlobal/field_72769_h #theWorld +public bad.i #FD:RenderGlobal/field_72770_i #renderEngine +public bad.q #FD:RenderGlobal/field_72777_q #mc +public bad.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks +public bad.E #FD:RenderGlobal/field_72738_E #damagedBlocks # SoundManager -public bcx.a # SoundManager/field_77381_a sndSystem -public bcx.b # SoundManager/field_77379_b soundPoolSounds -public bcx.c # SoundManager/field_77380_c soundPoolStreaming -public bcx.d # SoundManager/field_77377_d soundPoolMusic +public bed.a #FD:SoundManager/field_77381_a #sndSystem +public bed.b #FD:SoundManager/field_77379_b #soundPoolSounds +public bed.c #FD:SoundManager/field_77380_c #soundPoolStreaming +public bed.d #FD:SoundManager/field_77377_d #soundPoolMusic # EntityMinecart -protected ph.* # All private -> protected -public ph.h()Z # EntityMinecart/func_70490_h isMinecartPowered +protected py.* #FD:EntityMinecart/* # All private -> protected +public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered # Block -public alf.(ILafg;)V #Constructor -public alf.(IILafg;)V #Constructor -public alf.r()Lalf; # Block/func_71912_p setRequiresSelfNotify -public alf.a(Lalj;)Lalf; # Block/func_71884_a setStepSound -public alf.b(F)Lalf; # Block/func_71894_b setResistance -public alf.c(F)Lalf; # Block/func_71848_c setHardness -public alf.h(I)Lalf; # Block/func_71868_h setLightOpacity -public alf.a(F)Lalf; # Block/func_71900_a setLightValue -public alf.s()Lalf; # Block/func_71875_q setBlockUnbreakable -public alf.b(Z)Lalf; # Block/func_71907_b setTickRandomly -public alf.a(FFFFFF)V #Block/func_71905_a setBlockBounds +public amj.(ILagb;)V #MD:Block/(ILnet/minecraft/src/Material;) #Constructor +public amj.(IILagb;)V #MD:Block/(IILnet/minecraft/src/Material;) #Constructor +public amj.r()Lamj; #MD:Block/func_71912_p #setRequiresSelfNotify +public amj.a(Lamn;)Lamj; #MD:Block/func_71884_a #setStepSound +public amj.b(F)Lamj; #MD:Block/func_71894_b #setResistance +public amj.c(F)Lamj; #MD:Block/func_71848_c #setHardness +public amj.h(I)Lamj; #MD:Block/func_71868_h #setLightOpacity +public amj.a(F)Lamj; #MD:Block/func_71900_a #setLightValue +public amj.s()Lamj; #MD:Block/func_71875_q #setBlockUnbreakable +public amj.b(Z)Lamj; #MD:Block/func_71907_b #setTickRandomly +public amj.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds # NetServerHandler -public im.g # NetServerHandler/field_72572_g playerInAirTime +public iu.g #FD:NetServerHandler/field_72572_g #playerInAirTime # TileEntity -public amm.k # TileEntity/field_70331_k worldObj +public anq.k #FD:TileEntity/field_70331_k #worldObj # BlockLeavesBase -public aln.c # BlockLeavesBase/field_72131_c graphicsLevel +public amr.c #FD:BlockLeavesBase/field_72131_c #graphicsLevel # Item -public tt.e(I)Ltt; # Item/func_77656_e setMaxDamage -public-f tt.f(Ltv;)I # Item/func_77650_f getIconIndex +public uk.e(I)Luk; #MD:Item/func_77656_e #setMaxDamage +public-f uk.f(Lum;)I #MD:Item/func_77650_f #getIconIndex # RailLogic -public akh -public akh.a(Lakh;)I # RailLogic/func_73650_a getNAdjacentTiles +public all #CL:RailLogic +public all.a(Lall;)I #MD:RailLogic/func_73650_a #getNAdjacentTiles # EntityPlayer -public qg.a(Lpg;)V # EntityPlayer/func_71012_a joinEntityItemWithWorld -public qg.i()V # EntityPlayer/func_71053_j closeScreen +public qx.a(Lpx;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld +public qx.i()V #MD:EntityPlayer/func_71053_j #closeScreen # EntityPlayerMP -public axc.a(Lpg;)V # EntityClientPlayerMP/func_71012_a joinEntityItemWithWorld +public ayh.a(Lpx;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld # World Gen Chests Related -public ie.S # WorldServer/field_73069_S bonusChestContent -public abq.a # StructureMineshaftPieces/field_78818_a mineshaftChestContents -public acu.i # ComponentScatteredFeatureDesertPyramid/field_74941_i itemsToGenerateInTemple -public acv.l # ComponentScatteredFeatureJunglePyramid/field_74943_l junglePyramidsChestContents -public acv.m # ComponentScatteredFeatureJunglePyramid/field_74944_m junglePyramidsDispenserContents -public adf.a # ComponentStrongholdChestCorridor/field_75003_a strongholdChestContents -public adj.b # ComponentStrongholdLibrary/field_75007_b strongholdLibraryChestContents -public ado.c # ComponentStrongholdRoomCrossing/field_75014_c strongholdCorridorChestContents -public aem.a # ComponentVillageHouse2/field_74918_a villageBlacksmithChestContents +public im.T #FD:WorldServer/field_73069_S #bonusChestContent +public aci.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents +public adm.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple +public adn.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents +public adn.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents +public adx.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents +public aeb.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents +public aeg.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents +public afh.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents # AnvilChunkLoader.chunkSaveLocation -default zn.d # AnvilChunkLoader/field_75825_d +default aaf.d #FD:AnvilChunkLoader/field_75825_d # ChunkProviderServer.currentChunkLoader -default id.e # ChunkProviderServer/field_73247_e +default il.e #FD:ChunkProviderServer/field_73247_e # PlayerManager -default ib.a(IIZ)Lic; # PlayerManager/func_72690_a getOrCreateChunkWatcher +default ij.a(IIZ)Lik; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher # World -public-f xe.C # World/field_72982_D villageCollectionObj -public xe.H # World/field_72993_I activeChunkSet +public-f xv.C #FD:World/field_72982_D #villageCollectionObj +public xv.H #FD:World/field_72993_I #activeChunkSet # EntityLiving -public ln.bc # EntityLiving/field_70728_aV experienceValue +public mc.bc #FD:EntityLiving/field_70728_aV #experienceValue # GuiFlatPresets -public asr.a(Ljava/lang/String;ILxz;Ljava/util/List;[Labm;)V # GuiFlatPresets/func_82294_a -public asr.a(Ljava/lang/String;ILxz;[Labm;)V # GuiFlatPresets/func_82297_a +public atw.a(Ljava/lang/String;ILyr;Ljava/util/List;[Lace;)V #MD:GuiFlatPresets/func_82294_a +public atw.a(Ljava/lang/String;ILyr;[Lace;)V #MD:GuiFlatPresets/func_82297_a # BiomeGenBase -public xz.*() # Everything protected->public +public yr.*() #MD:BiomeGenBase/* #Everything protected->public # MapGenVillage -public-f aea.e # MapGenVillage/field_75055_e villageSpawnBiomes \ No newline at end of file +public-f aev.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes diff --git a/common/net/minecraftforge/common/ForgeVersion.java b/common/net/minecraftforge/common/ForgeVersion.java index 025bdd7c7..f1322fb4f 100644 --- a/common/net/minecraftforge/common/ForgeVersion.java +++ b/common/net/minecraftforge/common/ForgeVersion.java @@ -7,10 +7,10 @@ package net.minecraftforge.common; public class ForgeVersion { - //This number is incremented every Minecraft version, and never reset + //This number is incremented every time we remove deprecated code/major API changes, never reset public static final int majorVersion = 6; - //This number is incremented every official release, and reset every Minecraft version - public static final int minorVersion = 0; + //This number is incremented every minecraft release, never reset + public static final int minorVersion = 2; //This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version public static final int revisionVersion = 1; //This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code. diff --git a/fml-src-4.2.18.433.zip b/fml-src-4.3.2.436.zip similarity index 61% rename from fml-src-4.2.18.433.zip rename to fml-src-4.3.2.436.zip index 8075f1f96..c7250dd60 100644 Binary files a/fml-src-4.2.18.433.zip and b/fml-src-4.3.2.436.zip differ diff --git a/patches/common/net/minecraft/server/MinecraftServer.java.patch b/patches/common/net/minecraft/server/MinecraftServer.java.patch index b7ddad5bc..6eb402968 100644 --- a/patches/common/net/minecraft/server/MinecraftServer.java.patch +++ b/patches/common/net/minecraft/server/MinecraftServer.java.patch @@ -8,7 +8,7 @@ import java.util.Iterator; import java.util.List; import java.util.logging.Level; -@@ -71,6 +72,9 @@ +@@ -70,6 +71,9 @@ import net.minecraft.src.WorldServerMulti; import net.minecraft.src.WorldSettings; import net.minecraft.src.WorldType; @@ -16,9 +16,9 @@ +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.WorldEvent; - public abstract class MinecraftServer implements Runnable, IPlayerUsage, ICommandSender + public abstract class MinecraftServer implements ICommandSender, Runnable, IPlayerUsage { -@@ -152,7 +156,8 @@ +@@ -151,7 +155,8 @@ public final long[] tickTimeArray = new long[100]; /** Stats are [dimension][tick%100] system.nanoTime is stored. */ @@ -28,7 +28,7 @@ private KeyPair serverKeyPair; /** Username of the server owner (for integrated servers) */ -@@ -243,8 +248,6 @@ +@@ -242,8 +247,6 @@ { this.convertMapIfNeeded(par1Str); this.setUserMessage("menu.loadingLevel"); @@ -37,7 +37,7 @@ ISaveHandler var7 = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true); WorldInfo var9 = var7.loadWorldInfo(); WorldSettings var8; -@@ -264,46 +267,23 @@ +@@ -263,46 +266,23 @@ var8.enableBonusChest(); } @@ -95,7 +95,7 @@ this.setDifficultyForAllWorlds(this.getDifficulty()); this.initialWorldChunkLoad(); } -@@ -434,7 +414,9 @@ +@@ -433,7 +413,9 @@ for (int var3 = 0; var3 < var2; ++var3) { WorldServer var4 = var1[var3]; @@ -105,7 +105,7 @@ } if (this.usageSnooper != null && this.usageSnooper.isSnooperRunning()) -@@ -647,13 +629,13 @@ +@@ -646,13 +628,13 @@ { this.theProfiler.startSection("levels"); @@ -123,7 +123,7 @@ this.theProfiler.startSection(var4.getWorldInfo().getWorldName()); this.theProfiler.startSection("pools"); var4.getWorldVec3Pool().clear(); -@@ -678,9 +660,11 @@ +@@ -699,9 +681,11 @@ this.theProfiler.endSection(); } @@ -138,7 +138,7 @@ this.theProfiler.endStartSection("connection"); this.getNetworkThread().networkTick(); this.theProfiler.endStartSection("players"); -@@ -736,7 +720,13 @@ +@@ -757,7 +741,13 @@ */ public WorldServer worldServerForDimension(int par1) { @@ -153,7 +153,7 @@ } @SideOnly(Side.SERVER) -@@ -845,7 +835,7 @@ +@@ -866,7 +856,7 @@ public String getServerModName() { @@ -162,7 +162,7 @@ } /** -@@ -1124,6 +1114,7 @@ +@@ -1128,6 +1118,7 @@ if (var2 != null) { diff --git a/patches/common/net/minecraft/src/Block.java.patch b/patches/common/net/minecraft/src/Block.java.patch index 29ddfd6a7..29a899f70 100644 --- a/patches/common/net/minecraft/src/Block.java.patch +++ b/patches/common/net/minecraft/src/Block.java.patch @@ -102,7 +102,7 @@ { ItemStack var8 = this.createStackedBlock(par6); -@@ -1315,4 +1321,848 @@ +@@ -1322,4 +1328,848 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); } diff --git a/patches/common/net/minecraft/src/BlockButton.java.patch b/patches/common/net/minecraft/src/BlockButton.java.patch index e4a3619af..124bef819 100644 --- a/patches/common/net/minecraft/src/BlockButton.java.patch +++ b/patches/common/net/minecraft/src/BlockButton.java.patch @@ -35,49 +35,48 @@ + (par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)); } - /** -@@ -74,20 +85,22 @@ - int var9 = par1World.getBlockMetadata(par2, par3, par4); - int var10 = var9 & 8; - var9 &= 7; -- + public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) +@@ -72,19 +83,22 @@ + int var11 = var10 & 8; + var10 &= 7; + - if (par5 == 2 && par1World.isBlockNormalCube(par2, par3, par4 + 1)) -+ ++ + ForgeDirection dir = ForgeDirection.getOrientation(par5); + + if (dir == NORTH && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) { - var9 = 4; + var10 = 4; } - else if (par5 == 3 && par1World.isBlockNormalCube(par2, par3, par4 - 1)) + else if (dir == SOUTH && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) { - var9 = 3; + var10 = 3; } - else if (par5 == 4 && par1World.isBlockNormalCube(par2 + 1, par3, par4)) + else if (dir == WEST && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) { - var9 = 2; + var10 = 2; } - else if (par5 == 5 && par1World.isBlockNormalCube(par2 - 1, par3, par4)) + else if (dir == EAST && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) { - var9 = 1; + var10 = 1; } -@@ -104,7 +117,11 @@ +@@ -101,7 +115,11 @@ */ private int getOrientation(World par1World, int par2, int par3, int par4) { - return par1World.isBlockNormalCube(par2 - 1, par3, par4) ? 1 : (par1World.isBlockNormalCube(par2 + 1, par3, par4) ? 2 : (par1World.isBlockNormalCube(par2, par3, par4 - 1) ? 3 : (par1World.isBlockNormalCube(par2, par3, par4 + 1) ? 4 : 1))); -+ if (par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) return 1; -+ if (par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) return 2; -+ if (par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) return 3; ++ if (par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) return 1; ++ if (par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) return 2; ++ if (par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) return 3; + if (par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) return 4; + return 1; } /** -@@ -118,22 +135,22 @@ +@@ -115,22 +133,22 @@ int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7; boolean var7 = false; diff --git a/patches/common/net/minecraft/src/BlockChest.java.patch b/patches/common/net/minecraft/src/BlockChest.java.patch index bf14682ca..daf25d97b 100644 --- a/patches/common/net/minecraft/src/BlockChest.java.patch +++ b/patches/common/net/minecraft/src/BlockChest.java.patch @@ -8,7 +8,7 @@ public class BlockChest extends BlockContainer { -@@ -383,7 +384,7 @@ +@@ -411,7 +412,7 @@ { return true; } @@ -17,7 +17,7 @@ { return true; } -@@ -391,19 +392,19 @@ +@@ -419,19 +420,19 @@ { return true; } diff --git a/patches/common/net/minecraft/src/BlockFarmland.java.patch b/patches/common/net/minecraft/src/BlockFarmland.java.patch index cefaeb5a6..6d17c30f4 100644 --- a/patches/common/net/minecraft/src/BlockFarmland.java.patch +++ b/patches/common/net/minecraft/src/BlockFarmland.java.patch @@ -14,7 +14,7 @@ { int var8 = par1World.getBlockId(var6, par3 + 1, var7); -- if (var8 == Block.crops.blockID || var8 == Block.melonStem.blockID || var8 == Block.pumpkinStem.blockID) +- if (var8 == Block.crops.blockID || var8 == Block.melonStem.blockID || var8 == Block.pumpkinStem.blockID || var8 == Block.potatoe.blockID || var8 == Block.carrot.blockID) + Block plant = blocksList[var8]; + if (plant instanceof IPlantable && canSustainPlant(par1World, par2, par3, par4, ForgeDirection.UP, (IPlantable)plant)) { diff --git a/patches/common/net/minecraft/src/BlockLadder.java.patch b/patches/common/net/minecraft/src/BlockLadder.java.patch index 017038202..4648f5114 100644 --- a/patches/common/net/minecraft/src/BlockLadder.java.patch +++ b/patches/common/net/minecraft/src/BlockLadder.java.patch @@ -9,7 +9,7 @@ public class BlockLadder extends Block { -@@ -107,7 +109,10 @@ +@@ -96,29 +98,32 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { @@ -20,35 +20,34 @@ + par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH); } - /** -@@ -117,22 +122,22 @@ + public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { - int var9 = par1World.getBlockMetadata(par2, par3, par4); + int var10 = par9; -- if ((var9 == 0 || par5 == 2) && par1World.isBlockNormalCube(par2, par3, par4 + 1)) -+ if ((var9 == 0 || par5 == 2) && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) +- if ((par9 == 0 || par5 == 2) && par1World.isBlockNormalCube(par2, par3, par4 + 1)) ++ if ((var10 == 0 || par5 == 2) && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) { - var9 = 2; + var10 = 2; } -- if ((var9 == 0 || par5 == 3) && par1World.isBlockNormalCube(par2, par3, par4 - 1)) -+ if ((var9 == 0 || par5 == 3) && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) +- if ((var10 == 0 || par5 == 3) && par1World.isBlockNormalCube(par2, par3, par4 - 1)) ++ if ((var10 == 0 || par5 == 3) && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) { - var9 = 3; + var10 = 3; } -- if ((var9 == 0 || par5 == 4) && par1World.isBlockNormalCube(par2 + 1, par3, par4)) -+ if ((var9 == 0 || par5 == 4) && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) +- if ((var10 == 0 || par5 == 4) && par1World.isBlockNormalCube(par2 + 1, par3, par4)) ++ if ((var10 == 0 || par5 == 4) && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) { - var9 = 4; + var10 = 4; } -- if ((var9 == 0 || par5 == 5) && par1World.isBlockNormalCube(par2 - 1, par3, par4)) -+ if ((var9 == 0 || par5 == 5) && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) +- if ((var10 == 0 || par5 == 5) && par1World.isBlockNormalCube(par2 - 1, par3, par4)) ++ if ((var10 == 0 || par5 == 5) && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) { - var9 = 5; + var10 = 5; } -@@ -149,22 +154,22 @@ +@@ -135,22 +140,22 @@ int var6 = par1World.getBlockMetadata(par2, par3, par4); boolean var7 = false; @@ -75,7 +74,7 @@ { var7 = true; } -@@ -185,4 +190,10 @@ +@@ -171,4 +176,10 @@ { return 1; } diff --git a/patches/common/net/minecraft/src/BlockLever.java.patch b/patches/common/net/minecraft/src/BlockLever.java.patch index 5d50f0e80..cbdec2302 100644 --- a/patches/common/net/minecraft/src/BlockLever.java.patch +++ b/patches/common/net/minecraft/src/BlockLever.java.patch @@ -36,47 +36,47 @@ + par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN ); } - /** -@@ -68,32 +82,32 @@ - var9 &= 7; - var9 = -1; + public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) +@@ -64,32 +78,32 @@ + int var10 = par9 & 7; + var10 = -1; - if (par5 == 0 && par1World.isBlockNormalCube(par2, par3 + 1, par4)) + if (par5 == 0 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN)) { - var9 = par1World.rand.nextBoolean() ? 0 : 7; + var10 = par1World.rand.nextBoolean() ? 0 : 7; } - if (par5 == 1 && par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4)) + if (par5 == 1 && par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP)) { - var9 = 5 + par1World.rand.nextInt(2); + var10 = 5 + par1World.rand.nextInt(2); } - if (par5 == 2 && par1World.isBlockNormalCube(par2, par3, par4 + 1)) + if (par5 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) { - var9 = 4; + var10 = 4; } - if (par5 == 3 && par1World.isBlockNormalCube(par2, par3, par4 - 1)) + if (par5 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) { - var9 = 3; + var10 = 3; } - if (par5 == 4 && par1World.isBlockNormalCube(par2 + 1, par3, par4)) + if (par5 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) { - var9 = 2; + var10 = 2; } - if (par5 == 5 && par1World.isBlockNormalCube(par2 - 1, par3, par4)) + if (par5 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST)) { - var9 = 1; + var10 = 1; } -@@ -144,42 +158,42 @@ +@@ -132,42 +146,42 @@ int var6 = par1World.getBlockMetadata(par2, par3, par4) & 7; boolean var7 = false; diff --git a/patches/common/net/minecraft/src/BlockLog.java.patch b/patches/common/net/minecraft/src/BlockLog.java.patch index 1415327d0..093bd109e 100644 --- a/patches/common/net/minecraft/src/BlockLog.java.patch +++ b/patches/common/net/minecraft/src/BlockLog.java.patch @@ -17,7 +17,7 @@ } } } -@@ -147,4 +142,16 @@ +@@ -144,4 +139,16 @@ { return new ItemStack(this.blockID, 1, limitToValidMetadata(par1)); } diff --git a/patches/common/net/minecraft/src/BlockTorch.java.patch b/patches/common/net/minecraft/src/BlockTorch.java.patch index c98c719df..0d529df2b 100644 --- a/patches/common/net/minecraft/src/BlockTorch.java.patch +++ b/patches/common/net/minecraft/src/BlockTorch.java.patch @@ -30,35 +30,35 @@ + canPlaceTorchOn(par1World, par2, par3 - 1, par4); } - /** -@@ -83,22 +89,22 @@ - var9 = 5; + public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) +@@ -80,22 +86,22 @@ + var10 = 5; } - if (par5 == 2 && par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true)) + if (par5 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true)) { - var9 = 4; + var10 = 4; } - if (par5 == 3 && par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true)) + if (par5 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true)) { - var9 = 3; + var10 = 3; } - if (par5 == 4 && par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true)) + if (par5 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true)) { - var9 = 2; + var10 = 2; } - if (par5 == 5 && par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true)) + if (par5 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true)) { - var9 = 1; + var10 = 1; } -@@ -124,19 +130,19 @@ +@@ -121,19 +127,19 @@ */ public void onBlockAdded(World par1World, int par2, int par3, int par4) { @@ -82,7 +82,7 @@ { par1World.setBlockMetadataWithNotify(par2, par3, par4, 4); } -@@ -159,22 +165,22 @@ +@@ -156,22 +162,22 @@ int var6 = par1World.getBlockMetadata(par2, par3, par4); boolean var7 = false; diff --git a/patches/common/net/minecraft/src/BlockTrapDoor.java.patch b/patches/common/net/minecraft/src/BlockTrapDoor.java.patch index cf3b88981..d362966bb 100644 --- a/patches/common/net/minecraft/src/BlockTrapDoor.java.patch +++ b/patches/common/net/minecraft/src/BlockTrapDoor.java.patch @@ -24,7 +24,7 @@ { par1World.setBlockWithNotify(par2, par3, par4, 0); this.dropBlockAsItem(par1World, par2, par3, par4, var6, 0); -@@ -260,6 +264,10 @@ +@@ -255,6 +259,10 @@ */ public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) { @@ -35,7 +35,7 @@ if (par5 == 0) { return false; -@@ -290,7 +298,7 @@ +@@ -285,7 +293,7 @@ --par2; } @@ -44,7 +44,7 @@ } } -@@ -305,6 +313,10 @@ +@@ -300,6 +308,10 @@ */ private static boolean isValidSupportBlock(int par0) { diff --git a/patches/common/net/minecraft/src/BlockTripWireSource.java.patch b/patches/common/net/minecraft/src/BlockTripWireSource.java.patch index 271e17bcd..d450766e8 100644 --- a/patches/common/net/minecraft/src/BlockTripWireSource.java.patch +++ b/patches/common/net/minecraft/src/BlockTripWireSource.java.patch @@ -23,7 +23,7 @@ } /** -@@ -66,7 +73,10 @@ +@@ -66,29 +73,32 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { @@ -34,35 +34,34 @@ + par1World.isBlockSolidOnSide(par2, par3, par4 + 1, WEST ); } - /** -@@ -76,22 +86,22 @@ + public int func_85104_a(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { - byte var9 = 0; + byte var10 = 0; - if (par5 == 2 && par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true)) + if (par5 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, WEST, true)) { - var9 = 2; + var10 = 2; } - if (par5 == 3 && par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true)) + if (par5 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, EAST, true)) { - var9 = 0; + var10 = 0; } - if (par5 == 4 && par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true)) + if (par5 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, NORTH, true)) { - var9 = 1; + var10 = 1; } - if (par5 == 5 && par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true)) + if (par5 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, SOUTH, true)) { - var9 = 3; + var10 = 3; } -@@ -113,22 +123,22 @@ +@@ -115,22 +125,22 @@ int var7 = var6 & 3; boolean var8 = false; @@ -89,7 +88,7 @@ { var8 = true; } -@@ -149,7 +159,7 @@ +@@ -151,7 +161,7 @@ boolean var12 = (par6 & 8) == 8; boolean var13 = par5 == Block.tripWireSource.blockID; boolean var14 = false; diff --git a/patches/common/net/minecraft/src/BlockVine.java.patch b/patches/common/net/minecraft/src/BlockVine.java.patch index df65bbad0..754e2419a 100644 --- a/patches/common/net/minecraft/src/BlockVine.java.patch +++ b/patches/common/net/minecraft/src/BlockVine.java.patch @@ -15,7 +15,7 @@ { public BlockVine(int par1) { -@@ -431,14 +435,26 @@ +@@ -425,14 +429,26 @@ */ public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) { diff --git a/patches/common/net/minecraft/src/ChunkProviderServer.java.patch b/patches/common/net/minecraft/src/ChunkProviderServer.java.patch index 17c523aca..386b2b328 100644 --- a/patches/common/net/minecraft/src/ChunkProviderServer.java.patch +++ b/patches/common/net/minecraft/src/ChunkProviderServer.java.patch @@ -32,7 +32,7 @@ if (var5 == null) { -@@ -279,6 +286,11 @@ +@@ -291,6 +298,11 @@ { if (!this.currentServer.canNotSave) { @@ -44,7 +44,7 @@ for (int var1 = 0; var1 < 100; ++var1) { if (!this.chunksToUnload.isEmpty()) -@@ -291,6 +303,11 @@ +@@ -303,6 +315,11 @@ this.chunksToUnload.remove(var2); this.loadedChunkHashMap.remove(var2.longValue()); this.loadedChunks.remove(var3); diff --git a/patches/common/net/minecraft/src/Entity.java.patch b/patches/common/net/minecraft/src/Entity.java.patch index c8e15ba89..57a6b2e77 100644 --- a/patches/common/net/minecraft/src/Entity.java.patch +++ b/patches/common/net/minecraft/src/Entity.java.patch @@ -9,9 +9,9 @@ import net.minecraft.server.MinecraftServer; public abstract class Entity -@@ -197,6 +199,11 @@ - public int dimension; +@@ -198,6 +200,11 @@ protected int field_82152_aq; + private boolean field_83001_bt; public EnumEntitySize myEntitySize; + /** Forge: Used to store custom data for each entity. */ + private NBTTagCompound customEntityData; @@ -21,38 +21,38 @@ public Entity(World par1World) { -@@ -1466,6 +1473,15 @@ - par1NBTTagCompound.setShort("Air", (short)this.getAir()); - par1NBTTagCompound.setBoolean("OnGround", this.onGround); - par1NBTTagCompound.setInteger("Dimension", this.dimension); -+ if (persistentID != null) -+ { -+ par1NBTTagCompound.setLong("PersistentIDMSB", persistentID.getMostSignificantBits()); -+ par1NBTTagCompound.setLong("PersistentIDLSB", persistentID.getLeastSignificantBits()); -+ } -+ if (customEntityData != null) -+ { -+ par1NBTTagCompound.setCompoundTag("ForgeData", customEntityData); -+ } - this.writeEntityToNBT(par1NBTTagCompound); - } - -@@ -1508,6 +1524,14 @@ - this.dimension = par1NBTTagCompound.getInteger("Dimension"); - this.setPosition(this.posX, this.posY, this.posZ); - this.setRotation(this.rotationYaw, this.rotationPitch); -+ if (par1NBTTagCompound.hasKey("ForgeData")) -+ { -+ customEntityData = par1NBTTagCompound.getCompoundTag("ForgeData"); -+ } -+ if (par1NBTTagCompound.hasKey("PersistentIDMSB") && par1NBTTagCompound.hasKey("PersistentIDLSB")) -+ { -+ persistentID = new UUID(par1NBTTagCompound.getLong("PersistentIDMSB"), par1NBTTagCompound.getLong("PersistentIDLSB")); -+ } - this.readEntityFromNBT(par1NBTTagCompound); - } - -@@ -1594,7 +1618,14 @@ +@@ -1493,6 +1500,15 @@ + par1NBTTagCompound.setInteger("Dimension", this.dimension); + par1NBTTagCompound.setBoolean("Invulnerable", this.field_83001_bt); + par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal); ++ if (persistentID != null) ++ { ++ par1NBTTagCompound.setLong("PersistentIDMSB", persistentID.getMostSignificantBits()); ++ par1NBTTagCompound.setLong("PersistentIDLSB", persistentID.getLeastSignificantBits()); ++ } ++ if (customEntityData != null) ++ { ++ par1NBTTagCompound.setCompoundTag("ForgeData", customEntityData); ++ } + this.writeEntityToNBT(par1NBTTagCompound); + } + catch (Throwable var5) +@@ -1547,6 +1563,14 @@ + this.timeUntilPortal = par1NBTTagCompound.getInteger("PortalCooldown"); + this.setPosition(this.posX, this.posY, this.posZ); + this.setRotation(this.rotationYaw, this.rotationPitch); ++ if (par1NBTTagCompound.hasKey("ForgeData")) ++ { ++ customEntityData = par1NBTTagCompound.getCompoundTag("ForgeData"); ++ } ++ if (par1NBTTagCompound.hasKey("PersistentIDMSB") && par1NBTTagCompound.hasKey("PersistentIDLSB")) ++ { ++ persistentID = new UUID(par1NBTTagCompound.getLong("PersistentIDMSB"), par1NBTTagCompound.getLong("PersistentIDLSB")); ++ } + this.readEntityFromNBT(par1NBTTagCompound); + } + catch (Throwable var5) +@@ -1641,7 +1665,14 @@ { EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack); var3.delayBeforeCanPickup = 10; @@ -68,7 +68,7 @@ return var3; } -@@ -1954,7 +1985,7 @@ +@@ -2001,7 +2032,7 @@ */ public boolean isRiding() { @@ -77,7 +77,7 @@ } /** -@@ -2279,7 +2310,7 @@ +@@ -2336,7 +2367,7 @@ public float func_82146_a(Explosion par1Explosion, Block par2Block, int par3, int par4, int par5) { @@ -86,9 +86,9 @@ } public int func_82143_as() -@@ -2299,4 +2330,84 @@ - { - return false; +@@ -2366,4 +2397,84 @@ + par1CrashReportCategory.addCrashSection("Block location", CrashReportCategory.func_85071_a(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))); + par1CrashReportCategory.addCrashSection("Momentum", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ)})); } + + /* ================================== Forge Start =====================================*/ diff --git a/patches/common/net/minecraft/src/EntityItem.java.patch b/patches/common/net/minecraft/src/EntityItem.java.patch index 4e2edaf32..7cba51dea 100644 --- a/patches/common/net/minecraft/src/EntityItem.java.patch +++ b/patches/common/net/minecraft/src/EntityItem.java.patch @@ -32,7 +32,7 @@ } /** -@@ -118,7 +129,20 @@ +@@ -112,7 +123,20 @@ ++this.age; @@ -54,7 +54,7 @@ { this.setDead(); } -@@ -215,6 +239,7 @@ +@@ -228,6 +252,7 @@ { par1NBTTagCompound.setShort("Health", (short)((byte)this.health)); par1NBTTagCompound.setShort("Age", (short)this.age); @@ -62,7 +62,7 @@ if (this.item != null) { -@@ -232,10 +257,15 @@ +@@ -245,10 +270,15 @@ NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item"); this.item = ItemStack.loadItemStackFromNBT(var2); @@ -79,7 +79,7 @@ } /** -@@ -245,9 +275,21 @@ +@@ -258,9 +288,21 @@ { if (!this.worldObj.isRemote) { diff --git a/patches/common/net/minecraft/src/EntityLiving.java.patch b/patches/common/net/minecraft/src/EntityLiving.java.patch index 30866a650..dbbd6fd12 100644 --- a/patches/common/net/minecraft/src/EntityLiving.java.patch +++ b/patches/common/net/minecraft/src/EntityLiving.java.patch @@ -11,7 +11,7 @@ public abstract class EntityLiving extends Entity { -@@ -351,6 +355,7 @@ +@@ -344,6 +348,7 @@ public void setAttackTarget(EntityLiving par1EntityLiving) { this.attackTarget = par1EntityLiving; @@ -27,7 +27,7 @@ } protected void entityInit() -@@ -722,6 +728,11 @@ +@@ -723,6 +729,11 @@ */ public void onUpdate() { @@ -39,7 +39,7 @@ super.onUpdate(); if (!this.worldObj.isRemote) -@@ -903,6 +914,11 @@ +@@ -908,6 +919,11 @@ */ public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) { @@ -48,12 +48,12 @@ + return false; + } + - if (this.worldObj.isRemote) + if (this.func_85032_ar()) { return false; -@@ -1109,6 +1125,11 @@ +@@ -1118,6 +1134,11 @@ { - if (!this.field_83001_bt) + if (!this.func_85032_ar()) { + par2 = ForgeHooks.onLivingHurt(this, par1DamageSource, par2); + if (par2 <= 0) @@ -63,7 +63,7 @@ par2 = this.applyArmorCalculations(par1DamageSource, par2); par2 = this.applyPotionDamageCalculations(par1DamageSource, par2); this.health -= par2; -@@ -1173,6 +1194,11 @@ +@@ -1182,6 +1203,11 @@ */ public void onDeath(DamageSource par1DamageSource) { @@ -75,7 +75,7 @@ Entity var2 = par1DamageSource.getEntity(); if (this.scoreValue >= 0 && var2 != null) -@@ -1195,6 +1221,10 @@ +@@ -1204,6 +1230,10 @@ { var3 = EnchantmentHelper.getLootingModifier((EntityLiving)var2); } @@ -86,7 +86,7 @@ if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) { -@@ -1203,7 +1233,7 @@ +@@ -1212,7 +1242,7 @@ if (this.recentlyHit > 0) { @@ -95,7 +95,7 @@ if (var4 < 5) { -@@ -1211,6 +1241,16 @@ +@@ -1220,6 +1250,16 @@ } } } @@ -112,7 +112,7 @@ } this.worldObj.setEntityState(this, (byte)3); -@@ -1254,6 +1294,12 @@ +@@ -1263,6 +1303,12 @@ */ protected void fall(float par1) { @@ -125,7 +125,7 @@ super.fall(par1); int var2 = MathHelper.ceiling_float_int(par1 - 3.0F); -@@ -1441,7 +1487,7 @@ +@@ -1465,7 +1511,7 @@ int var2 = MathHelper.floor_double(this.boundingBox.minY); int var3 = MathHelper.floor_double(this.posZ); int var4 = this.worldObj.getBlockId(var1, var2, var3); @@ -134,7 +134,7 @@ } /** -@@ -1849,6 +1895,7 @@ +@@ -1874,6 +1920,7 @@ } this.isAirBorne = true; @@ -142,7 +142,7 @@ } /** -@@ -2379,8 +2426,6 @@ +@@ -2411,8 +2458,6 @@ return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD; } @@ -151,9 +151,9 @@ /** * Remove the speified potion effect from this entity. */ -@@ -2818,4 +2863,30 @@ +@@ -2860,4 +2905,30 @@ { - return false; + this.dataWatcher.updateObject(10, Byte.valueOf((byte)par1)); } + + /*** @@ -163,17 +163,17 @@ + public void curePotionEffects(ItemStack curativeItem) + { + Iterator potionKey = activePotionsMap.keySet().iterator(); -+ ++ + if (worldObj.isRemote) + { + return; + } -+ ++ + while (potionKey.hasNext()) + { + Integer key = potionKey.next(); + PotionEffect effect = (PotionEffect)activePotionsMap.get(key); -+ ++ + if (effect.isCurativeItem(curativeItem)) + { + potionKey.remove(); diff --git a/patches/common/net/minecraft/src/EntityMinecart.java.patch b/patches/common/net/minecraft/src/EntityMinecart.java.patch index 0b96093db..d8064d07b 100644 --- a/patches/common/net/minecraft/src/EntityMinecart.java.patch +++ b/patches/common/net/minecraft/src/EntityMinecart.java.patch @@ -69,7 +69,7 @@ + { + return getCollisionHandler().getCollisionBox(this, par1Entity); + } - return par1Entity.boundingBox; + return par1Entity.canBePushed() ? par1Entity.boundingBox : null; } @@ -77,6 +120,10 @@ @@ -92,57 +92,57 @@ } public EntityMinecart(World par1World, double par2, double par4, double par6, int par8) -@@ -134,48 +181,7 @@ - } +@@ -140,48 +187,7 @@ + } - this.setDead(); -- this.dropItemWithOffset(Item.minecartEmpty.shiftedIndex, 1, 0.0F); + this.setDead(); +- this.dropItemWithOffset(Item.minecartEmpty.shiftedIndex, 1, 0.0F); - -- if (this.minecartType == 1) -- { -- EntityMinecart var3 = this; -- -- for (int var4 = 0; var4 < var3.getSizeInventory(); ++var4) +- if (this.minecartType == 1) - { -- ItemStack var5 = var3.getStackInSlot(var4); +- EntityMinecart var3 = this; - -- if (var5 != null) +- for (int var4 = 0; var4 < var3.getSizeInventory(); ++var4) - { -- float var6 = this.rand.nextFloat() * 0.8F + 0.1F; -- float var7 = this.rand.nextFloat() * 0.8F + 0.1F; -- float var8 = this.rand.nextFloat() * 0.8F + 0.1F; +- ItemStack var5 = var3.getStackInSlot(var4); - -- while (var5.stackSize > 0) +- if (var5 != null) - { -- int var9 = this.rand.nextInt(21) + 10; +- float var6 = this.rand.nextFloat() * 0.8F + 0.1F; +- float var7 = this.rand.nextFloat() * 0.8F + 0.1F; +- float var8 = this.rand.nextFloat() * 0.8F + 0.1F; - -- if (var9 > var5.stackSize) +- while (var5.stackSize > 0) - { -- var9 = var5.stackSize; -- } +- int var9 = this.rand.nextInt(21) + 10; - -- var5.stackSize -= var9; -- EntityItem var10 = new EntityItem(this.worldObj, this.posX + (double)var6, this.posY + (double)var7, this.posZ + (double)var8, new ItemStack(var5.itemID, var9, var5.getItemDamage())); -- float var11 = 0.05F; -- var10.motionX = (double)((float)this.rand.nextGaussian() * var11); -- var10.motionY = (double)((float)this.rand.nextGaussian() * var11 + 0.2F); -- var10.motionZ = (double)((float)this.rand.nextGaussian() * var11); -- this.worldObj.spawnEntityInWorld(var10); +- if (var9 > var5.stackSize) +- { +- var9 = var5.stackSize; +- } +- +- var5.stackSize -= var9; +- EntityItem var10 = new EntityItem(this.worldObj, this.posX + (double)var6, this.posY + (double)var7, this.posZ + (double)var8, new ItemStack(var5.itemID, var9, var5.getItemDamage())); +- float var11 = 0.05F; +- var10.motionX = (double)((float)this.rand.nextGaussian() * var11); +- var10.motionY = (double)((float)this.rand.nextGaussian() * var11 + 0.2F); +- var10.motionZ = (double)((float)this.rand.nextGaussian() * var11); +- this.worldObj.spawnEntityInWorld(var10); +- } - } - } -- } - -- this.dropItemWithOffset(Block.chest.blockID, 1, 0.0F); -- } -- else if (this.minecartType == 2) -- { -- this.dropItemWithOffset(Block.stoneOvenIdle.blockID, 1, 0.0F); -- } -+ dropCartAsItem(); - } +- this.dropItemWithOffset(Block.chest.blockID, 1, 0.0F); +- } +- else if (this.minecartType == 2) +- { +- this.dropItemWithOffset(Block.stoneOvenIdle.blockID, 1, 0.0F); +- } ++ dropCartAsItem(); + } - return true; -@@ -292,7 +298,7 @@ + return true; +@@ -299,7 +305,7 @@ this.kill(); } @@ -151,13 +151,14 @@ { this.worldObj.spawnParticle("largesmoke", this.posX, this.posY + 0.8D, this.posZ, 0.0D, 0.0D, 0.0D); } -@@ -336,17 +342,17 @@ +@@ -343,18 +349,18 @@ double var6 = 0.0078125D; int var8 = this.worldObj.getBlockId(var1, var2, var3); - if (BlockRail.isRailBlock(var8)) + if (canUseRail() && BlockRail.isRailBlock(var8)) { + this.fallDistance = 0.0F; Vec3 var9 = this.func_70489_a(this.posX, this.posY, this.posZ); - int var10 = this.worldObj.getBlockMetadata(var1, var2, var3); + int var10 = ((BlockRail)Block.blocksList[var8]).getBasicRailMetadata(worldObj, this, var1, var2, var3); @@ -172,7 +173,7 @@ var12 = !var11; } -@@ -360,25 +366,7 @@ +@@ -368,25 +374,7 @@ this.posY = (double)(var2 + 1); } @@ -199,7 +200,7 @@ int[][] var13 = field_70500_g[var10]; double var14 = (double)(var13[1][0] - var13[0][0]); -@@ -411,7 +399,7 @@ +@@ -419,7 +407,7 @@ } } @@ -208,7 +209,7 @@ { var24 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -459,36 +447,8 @@ +@@ -467,36 +455,8 @@ this.posX = var26 + var14 * var24; this.posZ = var28 + var16 * var24; this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ); @@ -247,7 +248,7 @@ if (var13[0][1] != 0 && MathHelper.floor_double(this.posX) - var1 == var13[0][0] && MathHelper.floor_double(this.posZ) - var3 == var13[0][2]) { -@@ -499,42 +459,7 @@ +@@ -507,42 +467,7 @@ this.setPosition(this.posX, this.posY + (double)var13[1][1], this.posZ); } @@ -291,7 +292,7 @@ Vec3 var52 = this.func_70489_a(this.posX, this.posY, this.posZ); -@@ -564,30 +489,14 @@ +@@ -572,30 +497,14 @@ double var41; @@ -320,7 +321,7 @@ - - if (var11) + updatePushForces(); -+ ++ + if(shouldDoRailFunctions()) + { + ((BlockRail)Block.blocksList[var8]).onMinecartPass(worldObj, this, var1, var2, var3); @@ -330,7 +331,7 @@ { var41 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -623,41 +532,7 @@ +@@ -631,41 +540,7 @@ } else { @@ -373,7 +374,7 @@ } this.doBlockCollisions(); -@@ -684,7 +559,18 @@ +@@ -692,7 +567,18 @@ } this.setRotation(this.rotationYaw, this.rotationPitch); @@ -393,7 +394,7 @@ if (var15 != null && !var15.isEmpty()) { -@@ -709,17 +595,8 @@ +@@ -717,17 +603,8 @@ this.riddenByEntity = null; } @@ -413,7 +414,7 @@ } } -@@ -743,12 +620,7 @@ +@@ -751,12 +628,7 @@ } else { @@ -427,7 +428,7 @@ par3 = (double)var10; -@@ -794,13 +666,8 @@ +@@ -802,13 +674,8 @@ if (BlockRail.isRailBlock(var10)) { @@ -442,7 +443,7 @@ if (var11 >= 2 && var11 <= 5) { -@@ -865,13 +732,14 @@ +@@ -873,13 +740,14 @@ { par1NBTTagCompound.setInteger("Type", this.minecartType); @@ -461,7 +462,7 @@ { NBTTagList var2 = new NBTTagList(); -@@ -897,13 +765,21 @@ +@@ -905,13 +773,21 @@ { this.minecartType = par1NBTTagCompound.getInteger("Type"); @@ -487,7 +488,7 @@ { NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.cargoItems = new ItemStack[this.getSizeInventory()]; -@@ -932,11 +808,17 @@ +@@ -940,11 +816,17 @@ */ public void applyEntityCollision(Entity par1Entity) { @@ -506,7 +507,7 @@ { par1Entity.mountEntity(this); } -@@ -982,7 +864,7 @@ +@@ -990,7 +872,7 @@ double var18 = par1Entity.motionX + this.motionX; double var20 = par1Entity.motionZ + this.motionZ; @@ -515,7 +516,7 @@ { this.motionX *= 0.20000000298023224D; this.motionZ *= 0.20000000298023224D; -@@ -990,7 +872,7 @@ +@@ -998,7 +880,7 @@ par1Entity.motionX *= 0.949999988079071D; par1Entity.motionZ *= 0.949999988079071D; } @@ -524,7 +525,7 @@ { par1Entity.motionX *= 0.20000000298023224D; par1Entity.motionZ *= 0.20000000298023224D; -@@ -1025,7 +907,7 @@ +@@ -1033,7 +915,7 @@ */ public int getSizeInventory() { @@ -533,7 +534,7 @@ } /** -@@ -1128,7 +1010,12 @@ +@@ -1136,7 +1018,12 @@ */ public boolean interact(EntityPlayer par1EntityPlayer) { @@ -547,7 +548,7 @@ { if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer) { -@@ -1140,14 +1027,14 @@ +@@ -1148,14 +1035,14 @@ par1EntityPlayer.mountEntity(this); } } @@ -564,7 +565,7 @@ { ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem(); -@@ -1271,4 +1158,375 @@ +@@ -1279,4 +1166,375 @@ { return this.dataWatcher.getWatchableObjectInt(18); } @@ -590,7 +591,7 @@ + { + List items = new ArrayList(); + items.add(new ItemStack(Item.minecartEmpty)); -+ ++ + switch(minecartType) + { + case 1: @@ -624,7 +625,7 @@ + return minecartType == 2 && getClass() == EntityMinecart.class; + } + -+ /** ++ /** + * Returns true if this cart is a storage cart + * Some carts may have inventories but not be storage carts + * and some carts without inventories may be storage carts. @@ -648,7 +649,7 @@ + return false; + } + -+ /** ++ /** + * Returns true if this cart can currently use rails. + * This function is mainly used to gracefully detach a minecart from a rail. + * @return True if the minecart can use rails. @@ -668,7 +669,7 @@ + canUseRail = use; + } + -+ /** ++ /** + * Return false if this cart should not call IRail.onMinecartPass() and should ignore Powered Rails. + * @return True if this cart should call IRail.onMinecartPass(). + */ @@ -713,7 +714,7 @@ + protected double getDrag() + { + return riddenByEntity != null ? defaultDragRidden : defaultDragEmpty; -+ } ++ } + + /** + * Moved to allow overrides. @@ -855,9 +856,9 @@ + + /** + * Moved to allow overrides, This code handle slopes affecting velocity. -+ * @param metadata The blocks position metadata ++ * @param metadata The blocks position metadata + */ -+ protected void adjustSlopeVelocities(int metadata) ++ protected void adjustSlopeVelocities(int metadata) + { + double acceleration = 0.0078125D; + if (metadata == 2) diff --git a/patches/common/net/minecraft/src/EntityOcelot.java.patch b/patches/common/net/minecraft/src/EntityOcelot.java.patch index f03e043c3..c72bc0dbb 100644 --- a/patches/common/net/minecraft/src/EntityOcelot.java.patch +++ b/patches/common/net/minecraft/src/EntityOcelot.java.patch @@ -1,6 +1,6 @@ --- ../src_base/common/net/minecraft/src/EntityOcelot.java +++ ../src_work/common/net/minecraft/src/EntityOcelot.java -@@ -326,8 +326,9 @@ +@@ -333,8 +333,9 @@ } int var4 = this.worldObj.getBlockId(var1, var2 - 1, var3); diff --git a/patches/common/net/minecraft/src/EntityPlayer.java.patch b/patches/common/net/minecraft/src/EntityPlayer.java.patch index 043e97f14..2397e349b 100644 --- a/patches/common/net/minecraft/src/EntityPlayer.java.patch +++ b/patches/common/net/minecraft/src/EntityPlayer.java.patch @@ -26,7 +26,7 @@ if (this.itemInUseCount <= 25 && this.itemInUseCount % 4 == 0) { this.updateItemUse(var1, 5); -@@ -562,6 +574,9 @@ +@@ -577,6 +589,9 @@ this.setPosition(this.posX, this.posY, this.posZ); this.motionY = 0.10000000149011612D; @@ -36,7 +36,7 @@ if (this.username.equals("Notch")) { this.dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true); -@@ -570,6 +585,20 @@ +@@ -585,6 +600,20 @@ if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { this.inventory.dropAllItems(); @@ -57,7 +57,7 @@ } if (par1DamageSource != null) -@@ -609,7 +638,16 @@ +@@ -624,7 +653,16 @@ */ public EntityItem dropOneItem() { @@ -75,7 +75,7 @@ } /** -@@ -618,7 +656,7 @@ +@@ -633,7 +671,7 @@ */ public EntityItem dropPlayerItem(ItemStack par1ItemStack) { @@ -84,7 +84,7 @@ } /** -@@ -670,18 +708,33 @@ +@@ -685,18 +723,33 @@ */ public void joinEntityItemWithWorld(EntityItem par1EntityItem) { @@ -122,7 +122,7 @@ { var2 += (float)(var3 * var3 + 1); } -@@ -706,7 +759,8 @@ +@@ -721,7 +774,8 @@ var2 /= 5.0F; } @@ -132,7 +132,7 @@ } /** -@@ -714,7 +768,7 @@ +@@ -729,7 +783,7 @@ */ public boolean canHarvestBlock(Block par1Block) { @@ -141,9 +141,9 @@ } /** -@@ -993,12 +1047,22 @@ +@@ -1014,12 +1068,22 @@ { - if (!this.field_83001_bt) + if (!this.func_85032_ar()) { + par2 = ForgeHooks.onLivingHurt(this, par1DamageSource, par2); + if (par2 <= 0) @@ -165,7 +165,7 @@ par2 = this.applyPotionDamageCalculations(par1DamageSource, par2); this.addExhaustion(par1DamageSource.getHungerDamage()); this.health -= par2; -@@ -1039,6 +1103,10 @@ +@@ -1060,6 +1124,10 @@ public boolean interactWith(Entity par1Entity) { @@ -176,7 +176,7 @@ if (par1Entity.interact(this)) { return true; -@@ -1082,7 +1150,9 @@ +@@ -1103,7 +1171,9 @@ */ public void destroyCurrentEquippedItem() { @@ -186,7 +186,7 @@ } /** -@@ -1099,6 +1169,15 @@ +@@ -1120,6 +1190,15 @@ */ public void attackTargetEntityWithCurrentItem(Entity par1Entity) { @@ -201,8 +201,8 @@ + } if (par1Entity.canAttackWithItem()) { - int var2 = this.inventory.getDamageVsEntity(par1Entity); -@@ -1242,6 +1321,12 @@ + if (!par1Entity.func_85031_j(this)) +@@ -1266,6 +1345,12 @@ */ public EnumStatus sleepInBedAt(int par1, int par2, int par3) { @@ -215,7 +215,7 @@ if (!this.worldObj.isRemote) { if (this.isPlayerSleeping() || !this.isEntityAlive()) -@@ -1281,6 +1366,11 @@ +@@ -1305,6 +1390,11 @@ { int var9 = this.worldObj.getBlockMetadata(par1, par2, par3); int var5 = BlockBed.getDirection(var9); @@ -227,7 +227,7 @@ float var10 = 0.5F; float var7 = 0.5F; -@@ -1351,10 +1441,12 @@ +@@ -1375,10 +1465,12 @@ ChunkCoordinates var4 = this.playerLocation; ChunkCoordinates var5 = this.playerLocation; @@ -244,7 +244,7 @@ if (var5 == null) { -@@ -1391,7 +1483,9 @@ +@@ -1415,7 +1507,9 @@ */ private boolean isInBed() { @@ -255,26 +255,23 @@ } /** -@@ -1406,13 +1500,16 @@ +@@ -1430,9 +1524,12 @@ var3.loadChunk(par1ChunkCoordinates.posX - 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4); var3.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4); -- if (par0World.getBlockId(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) != Block.bed.blockID) +- if (par0World.getBlockId(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) == Block.bed.blockID) +- { +- ChunkCoordinates var8 = BlockBed.getNearestEmptyChunkCoordinates(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, 0); + ChunkCoordinates c = par1ChunkCoordinates; + Block block = Block.blocksList[par0World.getBlockId(c.posX, c.posY, c.posZ)]; + + if (block == null || !block.isBed(par0World, c.posX, c.posY, c.posZ, null)) - { - return par2 && par0World.isAirBlock(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) && par0World.isAirBlock(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY + 1, par1ChunkCoordinates.posZ) ? par1ChunkCoordinates : null; ++ { ++ ChunkCoordinates var8 = block.getBedSpawnPosition(par0World, c.posX, c.posY, c.posZ, null); + return var8; } else - { -- ChunkCoordinates var4 = BlockBed.getNearestEmptyChunkCoordinates(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, 0); -+ ChunkCoordinates var4 = block.getBedSpawnPosition(par0World, c.posX, c.posY, c.posZ, null); - return var4; - } - } -@@ -1426,8 +1523,11 @@ +@@ -1454,8 +1551,11 @@ { if (this.playerLocation != null) { @@ -288,7 +285,7 @@ switch (var2) { -@@ -1747,6 +1847,7 @@ +@@ -1786,6 +1886,7 @@ return 101; } } diff --git a/patches/common/net/minecraft/src/EntityPlayerMP.java.patch b/patches/common/net/minecraft/src/EntityPlayerMP.java.patch index df02bbb78..f9ceb933c 100644 --- a/patches/common/net/minecraft/src/EntityPlayerMP.java.patch +++ b/patches/common/net/minecraft/src/EntityPlayerMP.java.patch @@ -43,7 +43,7 @@ } } -@@ -245,11 +244,29 @@ +@@ -253,11 +252,29 @@ */ public void onDeath(DamageSource par1DamageSource) { diff --git a/patches/common/net/minecraft/src/EntitySheep.java.patch b/patches/common/net/minecraft/src/EntitySheep.java.patch index edd1a76e7..30c9a83f5 100644 --- a/patches/common/net/minecraft/src/EntitySheep.java.patch +++ b/patches/common/net/minecraft/src/EntitySheep.java.patch @@ -38,7 +38,7 @@ - } - - var2.damageItem(1, par1EntityPlayer); -- this.worldObj.playSoundAtEntity(this, "mob.sheep.shear", 1.0F, 1.0F); +- this.func_85030_a("mob.sheep.shear", 1.0F, 1.0F); - } - return super.interact(par1EntityPlayer); @@ -50,13 +50,13 @@ } + + @Override -+ public boolean isShearable(ItemStack item, World world, int X, int Y, int Z) ++ public boolean isShearable(ItemStack item, World world, int X, int Y, int Z) + { + return !getSheared() && !isChild(); + } + + @Override -+ public ArrayList onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune) ++ public ArrayList onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune) + { + ArrayList ret = new ArrayList(); + setSheared(true); diff --git a/patches/common/net/minecraft/src/Item.java.patch b/patches/common/net/minecraft/src/Item.java.patch index 0b9a23762..2b0fa6d56 100644 --- a/patches/common/net/minecraft/src/Item.java.patch +++ b/patches/common/net/minecraft/src/Item.java.patch @@ -1,6 +1,6 @@ --- ../src_base/common/net/minecraft/src/Item.java +++ ../src_work/common/net/minecraft/src/Item.java -@@ -208,16 +208,24 @@ +@@ -209,16 +209,24 @@ /** full name of item from language file */ private String itemName; @@ -26,7 +26,7 @@ } /** -@@ -603,6 +611,10 @@ +@@ -604,6 +612,10 @@ float var18 = var15 * var16; float var20 = var14 * var16; double var21 = 5.0D; @@ -37,7 +37,7 @@ Vec3 var23 = var13.addVector((double)var18 * var21, (double)var17 * var21, (double)var20 * var21); return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3); } -@@ -677,4 +689,265 @@ +@@ -678,4 +690,265 @@ { StatList.initStats(); } diff --git a/patches/common/net/minecraft/src/ItemBlock.java.patch b/patches/common/net/minecraft/src/ItemBlock.java.patch index 88fe45f19..936cdcf61 100644 --- a/patches/common/net/minecraft/src/ItemBlock.java.patch +++ b/patches/common/net/minecraft/src/ItemBlock.java.patch @@ -18,24 +18,24 @@ { if (par7 == 0) { -@@ -85,14 +87,8 @@ - { - Block var12 = Block.blocksList[this.blockID]; +@@ -87,14 +89,8 @@ + int var13 = this.getMetadata(par1ItemStack.getItemDamage()); + int var14 = Block.blocksList[this.blockID].func_85104_a(par3World, par4, par5, par6, par7, par8, par9, par10, var13); -- if (par3World.setBlockAndMetadataWithNotify(par4, par5, par6, this.blockID, this.getMetadata(par1ItemStack.getItemDamage()))) +- if (par3World.setBlockAndMetadataWithNotify(par4, par5, par6, this.blockID, var14)) - { - if (par3World.getBlockId(par4, par5, par6) == this.blockID) - { -- Block.blocksList[this.blockID].updateBlockMetadata(par3World, par4, par5, par6, par7, par8, par9, par10); - Block.blocksList[this.blockID].onBlockPlacedBy(par3World, par4, par5, par6, par2EntityPlayer); +- Block.blocksList[this.blockID].func_85105_g(par3World, par4, par5, par6, var14); - } - -+ if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10)) ++ if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10, var14)) + { par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), var12.stepSound.getPlaceSound(), (var12.stepSound.getVolume() + 1.0F) / 2.0F, var12.stepSound.getPitch() * 0.8F); --par1ItemStack.stackSize; } -@@ -118,7 +114,8 @@ +@@ -120,7 +116,8 @@ { par5 = 1; } @@ -45,7 +45,7 @@ { if (par5 == 0) { -@@ -183,4 +180,28 @@ +@@ -185,4 +182,28 @@ { Block.blocksList[this.blockID].getSubBlocks(par1, par2CreativeTabs, par3List); } @@ -53,22 +53,22 @@ + /** + * Called to actually place the block, after the location is determined + * and all permission checks have been made. -+ * ++ * + * @param stack The item stack that was used to place the block. This can be changed inside the method. + * @param player The player who is placing the block. Can be null if the block is not being placed by a player. + * @param side The side the player (or machine) right-clicked on. + */ -+ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) ++ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + { -+ if (!world.setBlockAndMetadataWithNotify(x, y, z, this.blockID, this.getMetadata(stack.getItemDamage()))) ++ if (!world.setBlockAndMetadataWithNotify(x, y, z, this.blockID, metadata)) + { + return false; + } + + if (world.getBlockId(x, y, z) == this.blockID) + { -+ Block.blocksList[this.blockID].updateBlockMetadata(world, x, y, z, side, hitX, hitY, hitZ); + Block.blocksList[this.blockID].onBlockPlacedBy(world, x, y, z, player); ++ Block.blocksList[this.blockID].func_85105_g(world, x, y, z, metadata); + } + + return true; diff --git a/patches/common/net/minecraft/src/ItemDye.java.patch b/patches/common/net/minecraft/src/ItemDye.java.patch index 9df29f0cf..5224788a8 100644 --- a/patches/common/net/minecraft/src/ItemDye.java.patch +++ b/patches/common/net/minecraft/src/ItemDye.java.patch @@ -12,7 +12,7 @@ public class ItemDye extends Item { -@@ -53,6 +58,21 @@ +@@ -54,6 +59,21 @@ if (par1ItemStack.getItemDamage() == 15) { var11 = par3World.getBlockId(par4, par5, par6); @@ -34,7 +34,7 @@ if (var11 == Block.sapling.blockID) { -@@ -152,16 +172,9 @@ +@@ -153,16 +173,9 @@ par3World.setBlockAndMetadataWithNotify(var13, var14, var15, Block.tallGrass.blockID, 1); } } diff --git a/patches/common/net/minecraft/src/NetServerHandler.java.patch b/patches/common/net/minecraft/src/NetServerHandler.java.patch index 702661ba7..2b83a18cc 100644 --- a/patches/common/net/minecraft/src/NetServerHandler.java.patch +++ b/patches/common/net/minecraft/src/NetServerHandler.java.patch @@ -13,7 +13,7 @@ public class NetServerHandler extends NetHandler { -@@ -193,6 +199,11 @@ +@@ -182,6 +188,11 @@ if (this.playerEntity.ridingEntity != null) { this.playerEntity.ridingEntity.updateRiderPosition(); @@ -25,7 +25,7 @@ } this.mcServer.getConfigurationManager().serverUpdateMountedMovingPlayer(this.playerEntity); -@@ -285,6 +296,11 @@ +@@ -274,6 +285,11 @@ this.playerEntity.addExhaustion(0.2F); } @@ -37,7 +37,7 @@ this.playerEntity.moveEntity(var13, var15, var17); this.playerEntity.onGround = par1Packet10Flying.onGround; this.playerEntity.addMovementStat(var13, var15, var17); -@@ -307,10 +323,15 @@ +@@ -296,10 +312,15 @@ logger.warning(this.playerEntity.username + " moved wrongly!"); } @@ -54,7 +54,7 @@ { this.setPlayerLocation(this.lastPosX, this.lastPosY, this.lastPosZ, var11, var12); return; -@@ -318,7 +339,7 @@ +@@ -307,7 +328,7 @@ AxisAlignedBB var33 = this.playerEntity.boundingBox.copy().expand((double)var27, (double)var27, (double)var27).addCoord(0.0D, -0.55D, 0.0D); @@ -63,7 +63,7 @@ { if (var29 >= -0.03125D) { -@@ -337,6 +358,11 @@ +@@ -326,6 +347,11 @@ this.ticksForFloatKick = 0; } @@ -75,7 +75,7 @@ this.playerEntity.onGround = par1Packet10Flying.onGround; this.mcServer.getConfigurationManager().serverUpdateMountedMovingPlayer(this.playerEntity); this.playerEntity.updateFlyingState(this.playerEntity.posY - var3, par1Packet10Flying.onGround); -@@ -395,7 +421,10 @@ +@@ -384,7 +410,10 @@ double var12 = this.playerEntity.posZ - ((double)var7 + 0.5D); double var14 = var8 * var8 + var10 * var10 + var12 * var12; @@ -87,7 +87,7 @@ { return; } -@@ -419,6 +448,7 @@ +@@ -408,6 +437,7 @@ { if (var20 <= this.mcServer.getSpawnProtectionSize() && !var3) { @@ -95,7 +95,7 @@ this.playerEntity.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(var5, var6, var7, var2)); } else -@@ -477,7 +507,11 @@ +@@ -466,7 +496,11 @@ return; } @@ -108,7 +108,7 @@ } else if (par1Packet15Place.getYPosition() >= this.mcServer.getBuildLimit() - 1 && (par1Packet15Place.getDirection() == 1 || par1Packet15Place.getYPosition() >= this.mcServer.getBuildLimit())) { -@@ -495,7 +529,9 @@ +@@ -484,7 +518,9 @@ var12 = var11; } @@ -119,7 +119,7 @@ { this.playerEntity.theItemInWorldManager.activateBlockOrUseItem(this.playerEntity, var2, var3, var5, var6, var7, var8, par1Packet15Place.getXOffset(), par1Packet15Place.getYOffset(), par1Packet15Place.getZOffset()); } -@@ -662,8 +698,12 @@ +@@ -651,8 +687,12 @@ this.sendPacketToPlayer(new Packet3Chat("Cannot send chat message.")); return; } @@ -134,7 +134,7 @@ logger.info(var2); this.mcServer.getConfigurationManager().sendPacketToAllPlayers(new Packet3Chat(var2, false)); } -@@ -794,7 +834,7 @@ +@@ -783,7 +823,7 @@ return; } diff --git a/patches/common/net/minecraft/src/ServerConfigurationManager.java.patch b/patches/common/net/minecraft/src/ServerConfigurationManager.java.patch index 3ce0600c9..541aaec71 100644 --- a/patches/common/net/minecraft/src/ServerConfigurationManager.java.patch +++ b/patches/common/net/minecraft/src/ServerConfigurationManager.java.patch @@ -8,7 +8,7 @@ public abstract class ServerConfigurationManager { -@@ -304,6 +305,12 @@ +@@ -298,6 +299,12 @@ */ public EntityPlayerMP respawnPlayer(EntityPlayerMP par1EntityPlayerMP, int par2, boolean par3) { @@ -21,7 +21,7 @@ par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeAllTrackingPlayers(par1EntityPlayerMP); par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeEntityFromAllTrackingPlayers(par1EntityPlayerMP); par1EntityPlayerMP.getServerForPlayer().getPlayerManager().removePlayer(par1EntityPlayerMP); -@@ -326,6 +333,7 @@ +@@ -320,6 +327,7 @@ EntityPlayerMP var7 = new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension), par1EntityPlayerMP.username, (ItemInWorldManager)var6); var7.playerNetServerHandler = par1EntityPlayerMP.playerNetServerHandler; var7.clonePlayer(par1EntityPlayerMP, par3); @@ -29,11 +29,11 @@ var7.entityId = par1EntityPlayerMP.entityId; WorldServer var8 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension); this.func_72381_a(var7, par1EntityPlayerMP, var8); -@@ -369,6 +377,11 @@ +@@ -363,14 +371,20 @@ public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2) { -+ transferPlayerToDimension(par1EntityPlayerMP, par2, new Teleporter()); ++ transferPlayerToDimension(par1EntityPlayerMP, par2, mcServer.worldServerForDimension(par2).func_85176_s()); + } + + public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2, Teleporter teleporter) @@ -41,7 +41,8 @@ int var3 = par1EntityPlayerMP.dimension; WorldServer var4 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension); par1EntityPlayerMP.dimension = par2; -@@ -376,7 +389,7 @@ + WorldServer var5 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension); ++ par1EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, var5.getWorldInfo().getTerrainType(), var5.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType())); var4.removeEntity(par1EntityPlayerMP); par1EntityPlayerMP.isDead = false; @@ -50,14 +51,14 @@ this.func_72375_a(par1EntityPlayerMP, var4); par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(par1EntityPlayerMP.posX, par1EntityPlayerMP.posY, par1EntityPlayerMP.posZ, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch); par1EntityPlayerMP.theItemInWorldManager.setWorld(var5); -@@ -397,37 +410,22 @@ +@@ -391,38 +405,23 @@ */ public void transferEntityToWorld(Entity par1Entity, int par2, WorldServer par3WorldServer, WorldServer par4WorldServer) { - double var5 = par1Entity.posX; - double var7 = par1Entity.posZ; - double var9 = 8.0D; -+ transferEntityToWorld(par1Entity, par2, par3WorldServer, par4WorldServer, new Teleporter()); ++ transferEntityToWorld(par1Entity, par2, par3WorldServer, par4WorldServer, par4WorldServer.func_85176_s()); + } + + public void transferEntityToWorld(Entity par1Entity, int par2, WorldServer par3WorldServer, WorldServer par4WorldServer, Teleporter teleporter) @@ -71,6 +72,7 @@ double var13 = par1Entity.posY; double var15 = par1Entity.posZ; float var17 = par1Entity.rotationYaw; + par3WorldServer.theProfiler.startSection("moving"); - if (par1Entity.dimension == -1) - { @@ -99,12 +101,12 @@ { ChunkCoordinates var18; -@@ -461,7 +459,7 @@ +@@ -459,7 +458,7 @@ par4WorldServer.spawnEntityInWorld(par1Entity); par1Entity.setLocationAndAngles(var5, par1Entity.posY, var7, par1Entity.rotationYaw, par1Entity.rotationPitch); par4WorldServer.updateEntityWithOptionalForce(par1Entity, false); -- (new Teleporter()).placeInPortal(par4WorldServer, par1Entity, var11, var13, var15, var17); -+ teleporter.placeInPortal(par4WorldServer, par1Entity, var11, var13, var15, var17); +- par4WorldServer.func_85176_s().placeInPortal(par1Entity, var11, var13, var15, var17); ++ teleporter.placeInPortal(par1Entity, var11, var13, var15, var17); } - } + par3WorldServer.theProfiler.endSection(); diff --git a/patches/common/net/minecraft/src/TileEntity.java.patch b/patches/common/net/minecraft/src/TileEntity.java.patch index 839ffbaa8..8777160c2 100644 --- a/patches/common/net/minecraft/src/TileEntity.java.patch +++ b/patches/common/net/minecraft/src/TileEntity.java.patch @@ -1,6 +1,6 @@ --- ../src_base/common/net/minecraft/src/TileEntity.java +++ ../src_work/common/net/minecraft/src/TileEntity.java -@@ -276,4 +276,33 @@ +@@ -287,4 +287,33 @@ addMapping(TileEntityBeacon.class, "Beacon"); addMapping(TileEntitySkull.class, "Skull"); } diff --git a/patches/common/net/minecraft/src/World.java.patch b/patches/common/net/minecraft/src/World.java.patch index 4c4ac9d7c..e220d43d7 100644 --- a/patches/common/net/minecraft/src/World.java.patch +++ b/patches/common/net/minecraft/src/World.java.patch @@ -25,7 +25,7 @@ + * of one of there entities. + */ + public static double MAX_ENTITY_RADIUS = 2.0D; -+ ++ + public final MapStorage perWorldStorage; + /** @@ -76,7 +76,7 @@ this.worldInfo = par1ISaveHandler.loadWorldInfo(); if (par4WorldProvider != null) -@@ -231,12 +264,20 @@ +@@ -250,12 +283,20 @@ this.worldInfo.setServerInitialized(true); } @@ -99,10 +99,12 @@ } else { -@@ -248,6 +289,19 @@ - this.calculateInitialWeather(); - } +@@ -265,6 +306,19 @@ + this.calculateInitialSkylight(); + this.calculateInitialWeather(); ++ } ++ + private static MapStorage s_mapStorage; + private static ISaveHandler s_savehandler; + //Provides a solution for different worlds getting different copies of the same data, potentially rewriting the data or causing race conditions/stale data @@ -114,12 +116,10 @@ + s_savehandler = savehandler; + } + return s_mapStorage; -+ } -+ + } + /** - * Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider? - */ -@@ -302,7 +356,8 @@ +@@ -353,7 +407,8 @@ */ public boolean isAirBlock(int par1, int par2, int par3) { @@ -129,7 +129,7 @@ } /** -@@ -311,7 +366,8 @@ +@@ -362,7 +417,8 @@ public boolean blockHasTileEntity(int par1, int par2, int par3) { int var4 = this.getBlockId(par1, par2, par3); @@ -138,8 +138,8 @@ + return Block.blocksList[var4] != null && Block.blocksList[var4].hasTileEntity(meta); } - /** -@@ -1033,7 +1089,7 @@ + public int func_85175_e(int par1, int par2, int par3) +@@ -1113,7 +1169,7 @@ */ public boolean isDaytime() { @@ -148,7 +148,7 @@ } /** -@@ -1065,7 +1121,7 @@ +@@ -1145,7 +1201,7 @@ int var12 = this.getBlockMetadata(var8, var9, var10); Block var13 = Block.blocksList[var11]; @@ -157,7 +157,7 @@ { MovingObjectPosition var14 = var13.collisionRayTrace(this, var8, var9, var10, par1Vec3, par2Vec3); -@@ -1265,6 +1321,12 @@ +@@ -1345,6 +1401,12 @@ */ public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4) { @@ -170,7 +170,7 @@ if (par1Entity != null && par2Str != null) { Iterator var5 = this.worldAccesses.iterator(); -@@ -1363,6 +1425,11 @@ +@@ -1457,6 +1519,11 @@ EntityPlayer var5 = (EntityPlayer)par1Entity; this.playerEntities.add(var5); this.updateAllPlayersSleepingFlag(); @@ -182,7 +182,7 @@ } this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity); -@@ -1614,6 +1681,12 @@ +@@ -1708,6 +1775,12 @@ * Calculates the color for the skybox */ public Vec3 getSkyColor(Entity par1Entity, float par2) @@ -195,7 +195,7 @@ { float var3 = this.getCelestialAngle(par2); float var4 = MathHelper.cos(var3 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1709,6 +1782,12 @@ +@@ -1803,6 +1876,12 @@ @SideOnly(Side.CLIENT) public Vec3 drawClouds(float par1) { @@ -208,7 +208,7 @@ float var2 = this.getCelestialAngle(par1); float var3 = MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1787,7 +1866,7 @@ +@@ -1881,7 +1960,7 @@ { int var5 = var3.getBlockID(par1, var4, par2); @@ -217,7 +217,7 @@ { return var4 + 1; } -@@ -1802,6 +1881,12 @@ +@@ -1896,6 +1975,12 @@ * How bright are stars in the sky */ public float getStarBrightness(float par1) @@ -230,16 +230,16 @@ { float var2 = this.getCelestialAngle(par1); float var3 = 1.0F - (MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.25F); -@@ -1947,7 +2032,7 @@ +@@ -2099,7 +2184,7 @@ - if (var8 != null) + if (var12 != null) { -- var8.removeChunkBlockTileEntity(var6.xCoord & 15, var6.yCoord, var6.zCoord & 15); -+ var8.cleanChunkBlockTileEntity(var6.xCoord & 15, var6.yCoord, var6.zCoord & 15); +- var12.removeChunkBlockTileEntity(var10.xCoord & 15, var10.yCoord, var10.zCoord & 15); ++ var12.cleanChunkBlockTileEntity(var10.xCoord & 15, var10.yCoord, var10.zCoord & 15); } } } -@@ -1957,6 +2042,10 @@ +@@ -2109,6 +2194,10 @@ if (!this.entityRemoval.isEmpty()) { @@ -250,27 +250,27 @@ this.loadedTileEntityList.removeAll(this.entityRemoval); this.entityRemoval.clear(); } -@@ -1977,7 +2066,9 @@ +@@ -2129,7 +2218,9 @@ { - this.loadedTileEntityList.add(var9); + this.loadedTileEntityList.add(var13); } - + } + else + { - if (this.chunkExists(var9.xCoord >> 4, var9.zCoord >> 4)) + if (this.chunkExists(var13.xCoord >> 4, var13.zCoord >> 4)) { - Chunk var10 = this.getChunkFromChunkCoords(var9.xCoord >> 4, var9.zCoord >> 4); -@@ -1987,8 +2078,6 @@ - var10.setChunkBlockTileEntity(var9.xCoord & 15, var9.yCoord, var9.zCoord & 15, var9); + Chunk var15 = this.getChunkFromChunkCoords(var13.xCoord >> 4, var13.zCoord >> 4); +@@ -2139,8 +2230,6 @@ + var15.setChunkBlockTileEntity(var13.xCoord & 15, var13.yCoord, var13.zCoord & 15, var13); } } - -- this.markBlockNeedsUpdate(var9.xCoord, var9.yCoord, var9.zCoord); +- this.markBlockNeedsUpdate(var13.xCoord, var13.yCoord, var13.zCoord); } } -@@ -2001,13 +2090,13 @@ +@@ -2153,13 +2242,13 @@ public void addTileEntity(Collection par1Collection) { @@ -291,7 +291,7 @@ } } -@@ -2027,9 +2116,17 @@ +@@ -2179,9 +2268,17 @@ { int var3 = MathHelper.floor_double(par1Entity.posX); int var4 = MathHelper.floor_double(par1Entity.posZ); @@ -312,7 +312,7 @@ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; -@@ -2264,6 +2361,14 @@ +@@ -2416,6 +2513,14 @@ { return true; } @@ -327,7 +327,7 @@ } } } -@@ -2571,25 +2676,21 @@ +@@ -2723,25 +2828,21 @@ */ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { @@ -368,7 +368,7 @@ } } -@@ -2598,27 +2699,10 @@ +@@ -2750,27 +2851,10 @@ */ public void removeBlockTileEntity(int par1, int par2, int par3) { @@ -400,7 +400,7 @@ } } -@@ -2644,7 +2728,8 @@ +@@ -2796,7 +2880,8 @@ */ public boolean isBlockNormalCube(int par1, int par2, int par3) { @@ -409,8 +409,8 @@ + return block != null && block.isBlockNormalCube(this, par1, par2, par3); } - /** -@@ -2652,8 +2737,7 @@ + public boolean func_85174_u(int par1, int par2, int par3) +@@ -2819,8 +2904,7 @@ */ public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3) { @@ -420,7 +420,7 @@ } /** -@@ -2669,7 +2753,7 @@ +@@ -2836,7 +2920,7 @@ if (var5 != null && !var5.isEmpty()) { Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)]; @@ -429,7 +429,7 @@ } else { -@@ -2700,8 +2784,7 @@ +@@ -2867,8 +2951,7 @@ */ public void setAllowedSpawnTypes(boolean par1, boolean par2) { @@ -439,7 +439,7 @@ } /** -@@ -2717,6 +2800,11 @@ +@@ -2884,6 +2967,11 @@ */ private void calculateInitialWeather() { @@ -451,7 +451,7 @@ if (this.worldInfo.isRaining()) { this.rainingStrength = 1.0F; -@@ -2732,6 +2820,11 @@ +@@ -2899,6 +2987,11 @@ * Updates all weather states. */ protected void updateWeather() @@ -463,7 +463,7 @@ { if (!this.provider.hasNoSky) { -@@ -2834,12 +2927,14 @@ +@@ -3001,12 +3094,14 @@ public void toggleRain() { @@ -479,7 +479,7 @@ this.theProfiler.startSection("buildList"); int var1; EntityPlayer var2; -@@ -2946,6 +3041,11 @@ +@@ -3113,6 +3208,11 @@ */ public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4) { @@ -491,7 +491,7 @@ BiomeGenBase var5 = this.getBiomeGenForCoords(par1, par3); float var6 = var5.getFloatTemperature(); -@@ -3003,6 +3103,11 @@ +@@ -3170,6 +3270,11 @@ * Tests whether or not snow can be placed at a given location */ public boolean canSnowAt(int par1, int par2, int par3) @@ -503,7 +503,7 @@ { BiomeGenBase var4 = this.getBiomeGenForCoords(par1, par3); float var5 = var4.getFloatTemperature(); -@@ -3096,7 +3201,7 @@ +@@ -3263,7 +3368,7 @@ private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6) { @@ -512,7 +512,7 @@ int var8 = this.getSavedLightValue(EnumSkyBlock.Block, par2 - 1, par3, par4) - par6; int var9 = this.getSavedLightValue(EnumSkyBlock.Block, par2 + 1, par3, par4) - par6; int var10 = this.getSavedLightValue(EnumSkyBlock.Block, par2, par3 - 1, par4) - par6; -@@ -3231,7 +3336,7 @@ +@@ -3398,7 +3503,7 @@ int var21 = var24 + (var18 / 2 + 1) % 3 / 2 * var19; int var22 = var12 + (var18 / 2 + 2) % 3 / 2 * var19; var14 = this.getSavedLightValue(par1EnumSkyBlock, var20, var21, var22); @@ -521,7 +521,7 @@ if (var23 == 0) { -@@ -3262,7 +3367,7 @@ +@@ -3429,7 +3534,7 @@ var12 = (var9 >> 12 & 63) - 32 + par4; var13 = this.getSavedLightValue(par1EnumSkyBlock, var10, var24, var12); var14 = this.getBlockId(var10, var24, var12); @@ -530,7 +530,7 @@ if (var15 == 0) { -@@ -3364,10 +3469,10 @@ +@@ -3531,10 +3636,10 @@ public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) { this.entitiesWithinAABBExcludingEntity.clear(); @@ -545,7 +545,7 @@ for (int var7 = var3; var7 <= var4; ++var7) { -@@ -3393,10 +3498,10 @@ +@@ -3560,10 +3665,10 @@ public List func_82733_a(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector) { @@ -560,7 +560,7 @@ ArrayList var8 = new ArrayList(); for (int var9 = var4; var9 <= var5; ++var9) -@@ -3490,11 +3595,14 @@ +@@ -3657,11 +3762,14 @@ */ public void addLoadedEntities(List par1List) { @@ -578,7 +578,7 @@ } } -@@ -3528,6 +3636,11 @@ +@@ -3695,6 +3803,11 @@ else { if (var9 != null && (var9 == Block.waterMoving || var9 == Block.waterStill || var9 == Block.lavaMoving || var9 == Block.lavaStill || var9 == Block.fire || var9.blockMaterial.isGroundCover())) @@ -590,7 +590,7 @@ { var9 = null; } -@@ -3745,7 +3858,7 @@ +@@ -3912,7 +4025,7 @@ */ public long getSeed() { @@ -599,7 +599,7 @@ } public long getTotalWorldTime() -@@ -3755,7 +3868,7 @@ +@@ -3922,7 +4035,7 @@ public long getWorldTime() { @@ -608,7 +608,7 @@ } /** -@@ -3763,7 +3876,7 @@ +@@ -3930,7 +4043,7 @@ */ public void setWorldTime(long par1) { @@ -617,7 +617,7 @@ } /** -@@ -3771,13 +3884,13 @@ +@@ -3938,13 +4051,13 @@ */ public ChunkCoordinates getSpawnPoint() { @@ -633,7 +633,7 @@ } @SideOnly(Side.CLIENT) -@@ -3801,7 +3914,10 @@ +@@ -3968,7 +4081,10 @@ if (!this.loadedEntityList.contains(par1Entity)) { @@ -645,7 +645,7 @@ } } -@@ -3809,6 +3925,11 @@ +@@ -3976,6 +4092,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) @@ -657,7 +657,7 @@ { return true; } -@@ -3929,8 +4050,7 @@ +@@ -4096,8 +4217,7 @@ */ public boolean isBlockHighHumidity(int par1, int par2, int par3) { @@ -667,7 +667,7 @@ } /** -@@ -3992,7 +4112,7 @@ +@@ -4159,7 +4279,7 @@ */ public int getHeight() { @@ -676,7 +676,7 @@ } /** -@@ -4000,7 +4120,7 @@ +@@ -4167,7 +4287,7 @@ */ public int getActualHeight() { @@ -685,7 +685,7 @@ } public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart) -@@ -4043,7 +4163,7 @@ +@@ -4210,7 +4330,7 @@ */ public double getHorizon() { @@ -694,8 +694,8 @@ } /** -@@ -4088,4 +4208,75 @@ - this.theCalendar.setTimeInMillis(System.currentTimeMillis()); +@@ -4270,4 +4390,75 @@ + return this.theCalendar; } + diff --git a/patches/common/net/minecraft/src/WorldChunkManager.java.patch b/patches/common/net/minecraft/src/WorldChunkManager.java.patch index f02502c0a..429a2d5a0 100644 --- a/patches/common/net/minecraft/src/WorldChunkManager.java.patch +++ b/patches/common/net/minecraft/src/WorldChunkManager.java.patch @@ -30,12 +30,3 @@ } public WorldChunkManager(long par1, WorldType par3WorldType) -@@ -236,7 +233,7 @@ - ChunkPosition var13 = null; - int var14 = 0; - -- for (int var15 = 0; var15 < var12.length; ++var15) -+ for (int var15 = 0; var15 < var10 * var11; ++var15) //Vanilla Bug-Fix, AIOOB -1 when cant find biome - { - int var16 = var6 + var15 % var10 << 2; - int var17 = var7 + var15 / var10 << 2; diff --git a/patches/common/net/minecraft/src/WorldGenTrees.java.patch b/patches/common/net/minecraft/src/WorldGenTrees.java.patch index b5a0cdb72..bb44cbdb3 100644 --- a/patches/common/net/minecraft/src/WorldGenTrees.java.patch +++ b/patches/common/net/minecraft/src/WorldGenTrees.java.patch @@ -7,10 +7,10 @@ - if (var12 != 0 && var12 != Block.leaves.blockID && var12 != Block.grass.blockID && var12 != Block.dirt.blockID && var12 != Block.wood.blockID) + Block block = Block.blocksList[var12]; + -+ if (var12 != 0 && -+ !block.isLeaves(par1World, var10, var8, var11) && -+ var12 != Block.grass.blockID && -+ var12 != Block.dirt.blockID && ++ if (var12 != 0 && ++ !block.isLeaves(par1World, var10, var8, var11) && ++ var12 != Block.grass.blockID && ++ var12 != Block.dirt.blockID && + !block.isWood(par1World, var10, var8, var11)) { var7 = false; @@ -19,10 +19,10 @@ { int var17 = var16 - par5; -- if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var14, var11, var16)]) +- if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && par1World.isAirBlock(var14, var11, var16)) + Block block = Block.blocksList[par1World.getBlockId(var14, var11, var16)]; + -+ if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && ++ if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0) && + (block == null || block.canBeReplacedByLeaves(par1World, var14, var11, var16))) { this.setBlockAndMetadata(par1World, var14, var11, var16, Block.leaves.blockID, this.metaLeaves); diff --git a/patches/common/net/minecraft/src/WorldServer.java.patch b/patches/common/net/minecraft/src/WorldServer.java.patch index 2c0f1755b..0df59f963 100644 --- a/patches/common/net/minecraft/src/WorldServer.java.patch +++ b/patches/common/net/minecraft/src/WorldServer.java.patch @@ -21,25 +21,37 @@ public class WorldServer extends World { -@@ -44,6 +51,9 @@ +@@ -45,6 +52,10 @@ /** An IntHashMap of entity IDs (integers) to their Entity objects. */ private IntHashMap entityIdMap; + /** Stores the recently processed (lighting) chunks */ + protected Set doneChunks = new HashSet(); ++ public List customTeleporters = new ArrayList(); + public WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler) { super(par2ISaveHandler, par3Str, par5WorldSettings, WorldProvider.getProviderForDimension(par4), par6Profiler); -@@ -65,6 +75,7 @@ - { - this.pendingTickListEntries = new TreeSet(); +@@ -68,6 +79,7 @@ } + + this.field_85177_Q = new Teleporter(this); + DimensionManager.setWorld(par4, this); } /** -@@ -179,10 +190,7 @@ +@@ -131,6 +143,10 @@ + this.villageSiegeObj.tick(); + this.theProfiler.endStartSection("portalForcer"); + this.field_85177_Q.func_85189_a(this.getTotalWorldTime()); ++ for (Teleporter tele : customTeleporters) ++ { ++ tele.func_85189_a(getTotalWorldTime()); ++ } + this.theProfiler.endSection(); + this.sendAndApplyBlockEvents(); + } +@@ -184,10 +200,7 @@ private void resetRainAndThunder() { @@ -51,7 +63,7 @@ } public boolean areAllPlayersAsleep() -@@ -253,6 +261,14 @@ +@@ -258,6 +271,14 @@ int var1 = 0; int var2 = 0; Iterator var3 = this.activeChunkSet.iterator(); @@ -66,7 +78,7 @@ while (var3.hasNext()) { -@@ -263,14 +279,16 @@ +@@ -268,14 +289,16 @@ Chunk var7 = this.getChunkFromChunkCoords(var4.chunkXPos, var4.chunkZPos); this.moodSoundAndLightCheck(var5, var6, var7); this.theProfiler.endStartSection("tickChunk"); @@ -85,7 +97,7 @@ { this.updateLCG = this.updateLCG * 3 + 1013904223; var8 = this.updateLCG >> 2; -@@ -288,7 +306,7 @@ +@@ -293,7 +316,7 @@ this.theProfiler.endStartSection("iceandsnow"); int var13; @@ -94,7 +106,7 @@ { this.updateLCG = this.updateLCG * 3 + 1013904223; var8 = this.updateLCG >> 2; -@@ -367,7 +385,8 @@ +@@ -372,7 +395,8 @@ public void func_82740_a(int par1, int par2, int par3, int par4, int par5, int par6) { NextTickListEntry var7 = new NextTickListEntry(par1, par2, par3, par4); @@ -104,7 +116,7 @@ if (this.scheduledUpdatesAreImmediate && par4 > 0) { -@@ -429,7 +448,7 @@ +@@ -434,7 +458,7 @@ */ public void updateEntities() { @@ -113,7 +125,7 @@ { if (this.updateEntityTick++ >= 1200) { -@@ -478,7 +497,8 @@ +@@ -483,7 +507,8 @@ this.pendingTickListEntries.remove(var4); this.field_73064_N.remove(var4); @@ -123,7 +135,7 @@ if (this.checkChunksExist(var4.xCoord - var5, var4.yCoord - var5, var4.zCoord - var5, var4.xCoord + var5, var4.yCoord + var5, var4.zCoord + var5)) { -@@ -575,15 +595,27 @@ +@@ -601,15 +626,27 @@ public List getAllTileEntityInBox(int par1, int par2, int par3, int par4, int par5, int par6) { ArrayList var7 = new ArrayList(); @@ -160,7 +172,7 @@ } } -@@ -594,6 +626,11 @@ +@@ -620,6 +657,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) @@ -172,7 +184,7 @@ { int var5 = MathHelper.abs_int(par2 - this.worldInfo.getSpawnX()); int var6 = MathHelper.abs_int(par4 - this.worldInfo.getSpawnZ()); -@@ -603,7 +640,7 @@ +@@ -629,7 +671,7 @@ var6 = var5; } @@ -181,7 +193,7 @@ } protected void initialize(WorldSettings par1WorldSettings) -@@ -686,7 +723,7 @@ +@@ -712,7 +754,7 @@ */ protected void createBonusChest() { @@ -190,7 +202,7 @@ for (int var2 = 0; var2 < 10; ++var2) { -@@ -729,6 +766,7 @@ +@@ -755,6 +797,7 @@ } this.chunkProvider.saveChunks(par1, par2IProgressUpdate); @@ -198,7 +210,7 @@ } } -@@ -740,6 +778,7 @@ +@@ -766,6 +809,7 @@ this.checkSessionLock(); this.saveHandler.saveWorldInfoWithPlayer(this.worldInfo, this.mcServer.getConfigurationManager().getTagsFromLastWrite()); this.mapStorage.saveAllData(); @@ -206,9 +218,9 @@ } /** -@@ -965,4 +1004,9 @@ +@@ -996,4 +1040,9 @@ { - return this.thePlayerManager; + return this.field_85177_Q; } + + public File getChunkSaveLocation() diff --git a/patches/common/net/minecraft/src/WorldType.java.patch b/patches/common/net/minecraft/src/WorldType.java.patch index bf32925ce..4313bfe4d 100644 --- a/patches/common/net/minecraft/src/WorldType.java.patch +++ b/patches/common/net/minecraft/src/WorldType.java.patch @@ -1,6 +1,6 @@ --- ../src_base/common/net/minecraft/src/WorldType.java +++ ../src_work/common/net/minecraft/src/WorldType.java -@@ -219,8 +219,19 @@ +@@ -218,8 +218,19 @@ { return this == FLAT ? random.nextInt(4) != 1 : false; } diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index c50138473..050571b41 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/client/Minecraft.java +++ ../src_work/minecraft/net/minecraft/client/Minecraft.java -@@ -120,6 +120,9 @@ +@@ -121,6 +121,9 @@ import net.minecraft.src.WorldInfo; import net.minecraft.src.WorldRenderer; import net.minecraft.src.WorldSettings; @@ -10,7 +10,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.Sys; -@@ -1252,7 +1255,7 @@ +@@ -1253,7 +1256,7 @@ if (this.thePlayer.canCurrentToolHarvestBlock(var3, var4, var5)) { @@ -19,7 +19,7 @@ this.thePlayer.swingItem(); } } -@@ -1318,7 +1321,8 @@ +@@ -1319,7 +1322,8 @@ { int var8 = var3 != null ? var3.stackSize : 0; @@ -29,7 +29,7 @@ { var2 = false; this.thePlayer.swingItem(); -@@ -1344,7 +1348,8 @@ +@@ -1345,7 +1349,8 @@ { ItemStack var9 = this.thePlayer.inventory.getCurrentItem(); @@ -39,7 +39,7 @@ { this.entityRenderer.itemRenderer.func_78445_c(); } -@@ -1959,6 +1964,18 @@ +@@ -1985,6 +1990,18 @@ if (this.theIntegratedServer != null) { this.theIntegratedServer.initiateShutdown(); @@ -58,7 +58,7 @@ } this.theIntegratedServer = null; -@@ -2268,95 +2285,12 @@ +@@ -2294,95 +2311,12 @@ if (this.objectMouseOver != null) { boolean var1 = this.thePlayer.capabilities.isCreativeMode; diff --git a/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch b/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch index ae059376e..7a46dbcf7 100644 --- a/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch +++ b/patches/minecraft/net/minecraft/src/EffectRenderer.java.patch @@ -60,7 +60,7 @@ } } } -@@ -105,12 +132,34 @@ +@@ -107,6 +134,7 @@ for (int var11 = 0; var11 < this.fxLayers[var8].size(); ++var11) { EntityFX var12 = (EntityFX)this.fxLayers[var8].get(var11); @@ -68,8 +68,9 @@ var10.setBrightness(var12.getBrightnessForRender(par2)); var12.renderParticle(var10, par2, var3, var7, var4, var5, var6); } - +@@ -114,6 +142,27 @@ var10.draw(); + GL11.glDisable(GL11.GL_BLEND); } + } + @@ -82,20 +83,20 @@ + Tessellator tessallator = Tessellator.instance; + //GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderer.getTexture(key)); + tessallator.startDrawingQuads(); -+ ++ + if (entry.getFXLayer() != 3) + { + tessallator.setBrightness(entry.getBrightnessForRender(par2)); + entry.renderParticle(tessallator, par2, var3, var7, var4, var5, var6); + } -+ ++ + tessallator.draw(); + } + ForgeHooksClient.unbindTexture(); } } -@@ -130,6 +179,7 @@ +@@ -133,6 +182,7 @@ for (int var11 = 0; var11 < this.fxLayers[var9].size(); ++var11) { EntityFX var12 = (EntityFX)this.fxLayers[var9].get(var11); @@ -103,7 +104,7 @@ var10.setBrightness(var12.getBrightnessForRender(par2)); var12.renderParticle(var10, par2, var4, var8, var5, var6, var7); } -@@ -144,13 +194,15 @@ +@@ -147,13 +197,15 @@ { this.fxLayers[var2].clear(); } @@ -122,7 +123,7 @@ byte var7 = 4; for (int var8 = 0; var8 < var7; ++var8) -@@ -163,7 +215,7 @@ +@@ -166,7 +218,7 @@ double var13 = (double)par2 + ((double)var9 + 0.5D) / (double)var7; double var15 = (double)par3 + ((double)var10 + 0.5D) / (double)var7; int var17 = this.rand.nextInt(6); @@ -131,7 +132,7 @@ } } } -@@ -215,12 +267,60 @@ +@@ -218,12 +270,60 @@ var8 = (double)par1 + var6.getBlockBoundsMaxX() + (double)var7; } @@ -180,7 +181,7 @@ + else if (effect.getFXLayer() == 2) + { + texture = "/gui/items.png"; -+ } ++ } + texture = ForgeHooks.getTexture(texture, obj); + effectList.put(texture, effect); + } diff --git a/patches/minecraft/net/minecraft/src/GuiContainerCreative.java.patch b/patches/minecraft/net/minecraft/src/GuiContainerCreative.java.patch index 414817541..87fa1610b 100644 --- a/patches/minecraft/net/minecraft/src/GuiContainerCreative.java.patch +++ b/patches/minecraft/net/minecraft/src/GuiContainerCreative.java.patch @@ -24,7 +24,7 @@ } else { -@@ -322,7 +332,7 @@ +@@ -327,7 +337,7 @@ { CreativeTabs var3 = CreativeTabs.creativeTabArray[selectedTabIndex]; @@ -33,7 +33,7 @@ { this.fontRenderer.drawString(var3.getTranslatedTabLabel(), 8, 6, 4210752); } -@@ -344,7 +354,7 @@ +@@ -349,7 +359,7 @@ { CreativeTabs var9 = var6[var8]; @@ -42,7 +42,7 @@ { this.func_74227_b(var9); return; -@@ -360,11 +370,17 @@ +@@ -365,11 +375,17 @@ */ private boolean needsScrollBars() { @@ -60,7 +60,7 @@ int var2 = selectedTabIndex; selectedTabIndex = par1CreativeTabs.getTabIndex(); ContainerCreative var3 = (ContainerCreative)this.inventorySlots; -@@ -534,21 +550,42 @@ +@@ -539,21 +555,42 @@ super.drawScreen(par1, par2, par3); CreativeTabs[] var11 = CreativeTabs.creativeTabArray; @@ -108,7 +108,7 @@ } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); -@@ -569,14 +606,32 @@ +@@ -574,14 +611,32 @@ int var8 = var7.length; int var9; @@ -143,7 +143,7 @@ } } -@@ -594,6 +649,14 @@ +@@ -599,6 +654,14 @@ this.drawTexturedModalRect(var11, var8 + (int)((float)(var9 - var8 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15); } @@ -158,7 +158,7 @@ this.renderCreativeTab(var5); if (var5 == CreativeTabs.tabInventory) -@@ -604,6 +667,15 @@ +@@ -609,6 +672,15 @@ protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3) { @@ -174,7 +174,7 @@ int var4 = par1CreativeTabs.getTabColumn(); int var5 = 28 * var4; byte var6 = 0; -@@ -718,7 +790,7 @@ +@@ -723,7 +795,7 @@ var8 += 8 + (var3 ? 1 : -1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -183,7 +183,7 @@ itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8); itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8); GL11.glDisable(GL11.GL_LIGHTING); -@@ -740,6 +812,15 @@ +@@ -745,6 +817,15 @@ { this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter)); } diff --git a/patches/minecraft/net/minecraft/src/ModelBase.java.patch b/patches/minecraft/net/minecraft/src/ModelBase.java.patch index f773364d4..3e27bba29 100644 --- a/patches/minecraft/net/minecraft/src/ModelBase.java.patch +++ b/patches/minecraft/net/minecraft/src/ModelBase.java.patch @@ -1,8 +1,8 @@ --- ../src_base/minecraft/net/minecraft/src/ModelBase.java +++ ../src_work/minecraft/net/minecraft/src/ModelBase.java -@@ -7,7 +7,6 @@ - import java.util.List; +@@ -8,7 +8,6 @@ import java.util.Map; + import java.util.Random; -@SideOnly(Side.CLIENT) public abstract class ModelBase diff --git a/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch b/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch index 7e6d5c546..717c4aa17 100644 --- a/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch +++ b/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch @@ -34,7 +34,7 @@ } public void handleAnimation(Packet18Animation par1Packet18Animation) -@@ -1056,6 +1065,10 @@ +@@ -1065,6 +1074,10 @@ { var2.readFromNBT(par1Packet132TileEntityData.customParam1); } diff --git a/patches/minecraft/net/minecraft/src/PlayerControllerMP.java.patch b/patches/minecraft/net/minecraft/src/PlayerControllerMP.java.patch index e554fb974..4323c97bc 100644 --- a/patches/minecraft/net/minecraft/src/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/src/PlayerControllerMP.java.patch @@ -10,7 +10,7 @@ @SideOnly(Side.CLIENT) public class PlayerControllerMP -@@ -104,6 +107,12 @@ +@@ -105,6 +108,12 @@ */ public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4) { @@ -23,7 +23,7 @@ if (this.currentGameType.isAdventure() && !this.mc.thePlayer.canCurrentToolHarvestBlock(par1, par2, par3)) { return false; -@@ -121,7 +130,7 @@ +@@ -122,7 +131,7 @@ { var5.playAuxSFX(2001, par1, par2, par3, var6.blockID + (var5.getBlockMetadata(par1, par2, par3) << 12)); int var7 = var5.getBlockMetadata(par1, par2, par3); @@ -32,7 +32,7 @@ if (var8) { -@@ -309,6 +318,12 @@ +@@ -318,6 +327,12 @@ float var11 = (float)par8Vec3.zCoord - (float)par6; boolean var12 = false; int var13 = par2World.getBlockId(par4, par5, par6); @@ -45,7 +45,7 @@ if (var13 > 0 && Block.blocksList[var13].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, var9, var10, var11)) { -@@ -346,7 +361,15 @@ +@@ -355,7 +370,15 @@ } else { @@ -62,7 +62,7 @@ } } -@@ -368,9 +391,10 @@ +@@ -377,9 +400,10 @@ { par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5; diff --git a/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch b/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch index 8b7a30356..d1b7409fd 100644 --- a/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch +++ b/patches/minecraft/net/minecraft/src/RenderBlocks.java.patch @@ -9,7 +9,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -@@ -556,9 +558,8 @@ +@@ -558,9 +560,8 @@ public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4) { Tessellator var5 = Tessellator.instance; @@ -21,7 +21,7 @@ float var9 = 0.5F; float var10 = 1.0F; float var11 = 0.8F; -@@ -567,6 +568,7 @@ +@@ -569,6 +570,7 @@ var5.setBrightness(var25); var5.setColorOpaque_F(var9, var9, var9); int var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 0); @@ -29,7 +29,7 @@ int var28 = (var27 & 15) << 4; int var29 = var27 & 240; double var30 = (double)((float)var28 / 256.0F); -@@ -585,6 +587,7 @@ +@@ -587,6 +589,7 @@ var5.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4)); var5.setColorOpaque_F(var10, var10, var10); var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 1); @@ -37,7 +37,7 @@ var28 = (var27 & 15) << 4; var29 = var27 & 240; var30 = (double)((float)var28 / 256.0F); -@@ -2297,7 +2300,7 @@ +@@ -2310,7 +2313,7 @@ double var28; double var30; @@ -46,7 +46,7 @@ { float var36 = 0.2F; float var19 = 0.0625F; -@@ -2317,7 +2320,7 @@ +@@ -2330,7 +2333,7 @@ var9 = var20; } @@ -55,7 +55,7 @@ { var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13); var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 1), var11, var15); -@@ -2329,7 +2332,7 @@ +@@ -2342,7 +2345,7 @@ var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13); } @@ -64,7 +64,7 @@ { var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13); var5.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var9, var15); -@@ -2341,7 +2344,7 @@ +@@ -2354,7 +2357,7 @@ var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13); } @@ -73,7 +73,7 @@ { var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13); var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var11, var15); -@@ -2353,7 +2356,7 @@ +@@ -2366,7 +2369,7 @@ var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13); } @@ -82,7 +82,7 @@ { var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13); var5.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + var19), (double)(par4 + 1 - 0), var9, var15); -@@ -2365,7 +2368,7 @@ +@@ -2378,7 +2381,7 @@ var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13); } @@ -91,7 +91,7 @@ { var20 = (double)par2 + 0.5D + 0.5D; var22 = (double)par2 + 0.5D - 0.5D; -@@ -4553,7 +4556,7 @@ +@@ -4574,7 +4577,7 @@ var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var27); @@ -100,7 +100,7 @@ { this.colorRedTopLeft *= par5; this.colorRedBottomLeft *= par5; -@@ -4676,7 +4679,7 @@ +@@ -4697,7 +4700,7 @@ var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3)); @@ -109,7 +109,7 @@ { this.colorRedTopLeft *= par5; this.colorRedBottomLeft *= par5; -@@ -4799,7 +4802,7 @@ +@@ -4820,7 +4823,7 @@ var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var27); @@ -118,7 +118,7 @@ { this.colorRedTopLeft *= par5; this.colorRedBottomLeft *= par5; -@@ -4922,7 +4925,7 @@ +@@ -4943,7 +4946,7 @@ var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5); this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var27); @@ -127,7 +127,7 @@ { this.colorRedTopLeft *= par5; this.colorRedBottomLeft *= par5; -@@ -5034,7 +5037,7 @@ +@@ -5055,7 +5058,7 @@ var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var28); @@ -136,7 +136,7 @@ { var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7); this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, 38); -@@ -5050,7 +5053,7 @@ +@@ -5071,7 +5074,7 @@ var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, var28); @@ -145,7 +145,7 @@ { var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7); this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, 38); -@@ -5066,7 +5069,7 @@ +@@ -5087,7 +5090,7 @@ var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var28); @@ -154,7 +154,7 @@ { var8.setColorOpaque_F(var19 * par5, var22 * par6, var25 * par7); this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, 38); -@@ -5082,7 +5085,7 @@ +@@ -5103,7 +5106,7 @@ var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5); this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var28); diff --git a/patches/minecraft/net/minecraft/src/RenderGlobal.java.patch b/patches/minecraft/net/minecraft/src/RenderGlobal.java.patch index 1e8b2400d..8b234b897 100644 --- a/patches/minecraft/net/minecraft/src/RenderGlobal.java.patch +++ b/patches/minecraft/net/minecraft/src/RenderGlobal.java.patch @@ -36,7 +36,7 @@ double var4 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3; double var6 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3; double var8 = par2EntityPlayer.lastTickPosZ + (par2EntityPlayer.posZ - par2EntityPlayer.lastTickPosZ) * (double)par3; -@@ -1815,6 +1829,7 @@ +@@ -1828,6 +1842,7 @@ double var17 = this.mc.renderViewEntity.posY - par4; double var19 = this.mc.renderViewEntity.posZ - par6; EntityFX var21 = null; @@ -44,7 +44,7 @@ if (par1Str.equals("hugeexplosion")) { -@@ -1947,6 +1962,7 @@ +@@ -1960,6 +1975,7 @@ else if (par1Str.equals("snowballpoof")) { var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.snowball); @@ -52,7 +52,7 @@ } else if (par1Str.equals("dripWater")) { -@@ -1963,6 +1979,7 @@ +@@ -1976,6 +1992,7 @@ else if (par1Str.equals("slime")) { var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.slimeBall); @@ -60,23 +60,24 @@ } else if (par1Str.equals("heart")) { -@@ -1988,17 +2005,19 @@ - { - var25 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1)); - var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var25]); -+ effectObject = Item.itemsList[var25]; - } - else if (par1Str.startsWith("tilecrack_")) - { - var25 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1)); - var21 = new EntityDiggingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Block.blocksList[var25], 0, 0); -+ effectObject = Block.blocksList[var25]; - } +@@ -1997,6 +2014,7 @@ + { + int var27 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1)); + var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var27]); ++ effectObject = Item.itemsList[var27]; + } + else if (par1Str.startsWith("tilecrack_")) + { +@@ -2004,11 +2022,13 @@ + int var25 = Integer.parseInt(var28[1]); + int var26 = Integer.parseInt(var28[2]); + var21 = new EntityDiggingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Block.blocksList[var25], 0, var26); ++ effectObject = Block.blocksList[var25]; } if (var21 != null) { -- this.mc.effectRenderer.addEffect((EntityFX)var21); + this.mc.effectRenderer.addEffect((EntityFX)var21); + this.mc.effectRenderer.addEffect((EntityFX)var21, effectObject); } diff --git a/patches/minecraft/net/minecraft/src/RenderManager.java.patch b/patches/minecraft/net/minecraft/src/RenderManager.java.patch index 56d6b46fb..039f17d7f 100644 --- a/patches/minecraft/net/minecraft/src/RenderManager.java.patch +++ b/patches/minecraft/net/minecraft/src/RenderManager.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/src/RenderManager.java +++ ../src_work/minecraft/net/minecraft/src/RenderManager.java -@@ -132,12 +132,14 @@ +@@ -133,12 +133,14 @@ if (par4EntityLiving.isPlayerSleeping()) { diff --git a/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch b/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch index 9211cf579..55f37d42c 100644 --- a/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch +++ b/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch @@ -40,7 +40,7 @@ float var7 = 1.0F; GL11.glColor3f(var7, var7, var7); } -@@ -164,7 +172,7 @@ +@@ -156,7 +164,7 @@ float var8 = 1.6F; float var9 = 0.016666668F * var8; double var10 = par1EntityPlayer.getDistanceSqToEntity(this.renderManager.livingPlayer); @@ -49,7 +49,7 @@ if (var10 < (double)(var12 * var12)) { -@@ -230,9 +238,12 @@ +@@ -223,9 +231,12 @@ this.modelBipedMain.bipedHead.postRender(0.0625F); float var5; @@ -60,29 +60,29 @@ + { + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var4, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var4, BLOCK_3D)); -+ ++ + if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType())) { var5 = 0.625F; GL11.glTranslatef(0.0F, -0.25F, 0.0F); -@@ -349,7 +360,10 @@ +@@ -343,7 +354,10 @@ var23 = var21.getItemUseAction(); } - if (var21.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType())) + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var21, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var21, BLOCK_3D)); -+ ++ + if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType()))) { var7 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); -@@ -402,7 +416,7 @@ +@@ -400,7 +414,7 @@ if (var21.getItem().requiresMultipleRenderPasses()) { -- for (int var27 = 0; var27 <= 1; ++var27) -+ for (int var27 = 0; var27 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var27) +- for (var27 = 0; var27 <= 1; ++var27) ++ for (var27 = 0; var27 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var27) { int var26 = var21.getItem().getColorFromItemStack(var21, var27); - float var28 = (float)(var26 >> 16 & 255) / 255.0F; + var28 = (float)(var26 >> 16 & 255) / 255.0F; diff --git a/patches/minecraft/net/minecraft/src/SoundManager.java.patch b/patches/minecraft/net/minecraft/src/SoundManager.java.patch index 0a18c57e0..8f9fd9774 100644 --- a/patches/minecraft/net/minecraft/src/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/src/SoundManager.java.patch @@ -55,7 +55,7 @@ sndSystem.backgroundMusic("BgMusic", var1.soundUrl, var1.soundName, false); sndSystem.setVolume("BgMusic", this.options.musicVolume); sndSystem.play("BgMusic"); -@@ -239,6 +251,7 @@ +@@ -240,6 +252,7 @@ if (par1Str != null) { SoundPoolEntry var6 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str); @@ -63,7 +63,7 @@ if (var6 != null) { -@@ -250,6 +263,7 @@ +@@ -251,6 +264,7 @@ float var7 = 16.0F; sndSystem.newStreamingSource(true, var5, var6.soundUrl, var6.soundName, false, par2, par3, par4, 2, var7 * 4.0F); sndSystem.setVolume(var5, 0.5F * this.options.soundVolume); @@ -71,7 +71,7 @@ sndSystem.play(var5); } } -@@ -429,6 +443,7 @@ +@@ -430,6 +444,7 @@ if (loaded && this.options.soundVolume != 0.0F) { SoundPoolEntry var7 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str); @@ -79,7 +79,7 @@ if (var7 != null && par5 > 0.0F) { -@@ -450,6 +465,7 @@ +@@ -451,6 +466,7 @@ } sndSystem.setVolume(var8, par5 * this.options.soundVolume); @@ -87,7 +87,7 @@ sndSystem.play(var8); } } -@@ -464,6 +480,7 @@ +@@ -465,6 +481,7 @@ if (loaded && this.options.soundVolume != 0.0F) { SoundPoolEntry var4 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str); @@ -95,7 +95,7 @@ if (var4 != null) { -@@ -479,6 +496,7 @@ +@@ -480,6 +497,7 @@ par2 *= 0.25F; sndSystem.setPitch(var5, par3); sndSystem.setVolume(var5, par2 * this.options.soundVolume);