From 7c6468a9ea956e743e2e8c7314808525a65e6ebc Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 10 Apr 2013 16:37:25 -0400 Subject: [PATCH] Update MCP names to recent published names Updated FML: MinecraftForge/FML@1774e2bf3073c3449d1f289399971ad93a5b6479 MCP names update --- common/forge_at.cfg-new | 150 ++++++++++++++++++ .../common/DimensionManager.java | 12 +- .../net/minecraftforge/common/ForgeHooks.java | 10 +- .../common/WorldSpecificSaveHandler.java | 4 +- fml | 2 +- .../net/minecraft/block/Block.java.patch | 4 +- .../block/BlockBaseRailLogic.java.patch | 38 ++--- .../minecraft/block/BlockCactus.java.patch | 6 +- .../net/minecraft/block/BlockChest.java.patch | 4 +- .../net/minecraft/block/BlockCocoa.java.patch | 2 +- .../net/minecraft/block/BlockDoor.java.patch | 2 +- .../net/minecraft/client/Minecraft.java.patch | 8 +- .../gui/inventory/GuiContainer.java.patch | 12 +- .../particle/EntityDiggingFX.java.patch | 4 +- .../renderer/texture/TextureMap.java.patch | 12 +- .../entity/item/EntityMinecart.java.patch | 56 +++---- .../item/EntityMinecartContainer.java.patch | 2 +- .../item/EntityMinecartHopper.java.patch | 2 +- .../net/minecraft/item/Item.java.patch | 2 +- .../network/NetServerHandler.java.patch | 13 +- .../packet/Packet56MapChunks.java.patch | 14 +- .../minecraft/potion/PotionEffect.java.patch | 12 +- .../management/PlayerInstance.java.patch | 4 +- .../tileentity/TileEntityBeacon.java.patch | 7 +- .../net/minecraft/world/World.java.patch | 130 ++++++++------- .../minecraft/world/WorldServer.java.patch | 10 +- .../chunk/storage/AnvilSaveHandler.java.patch | 2 +- 27 files changed, 336 insertions(+), 188 deletions(-) create mode 100644 common/forge_at.cfg-new diff --git a/common/forge_at.cfg-new b/common/forge_at.cfg-new new file mode 100644 index 000000000..4ed142dc0 --- /dev/null +++ b/common/forge_at.cfg-new @@ -0,0 +1,150 @@ +#Main Forge Access Transformer configuration file +# Tessellator +public-f bge.a #FD:Tessellator/field_78398_a #instance +public bge.u #FD:Tessellator/field_78409_u #drawMode +public bge.v #FD:Tessellator/field_78408_v #xOffset +public bge.w #FD:Tessellator/field_78407_w #yOffset +public bge.x #FD:Tessellator/field_78417_x #zOffset +public bge.z #FD:Tessellator/field_78415_z #isDrawing +# ItemPickaxe +public wu.(ILwl;)V #MD:ItemPickaxe/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f wu.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst +# ItemAxe +public wi.(ILwl;)V #MD:ItemAxe/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f wi.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst +# ItemSpade +public xf.(ILwl;)V #MD:ItemSpade/(ILnet/minecraft/src/EnumToolMaterial;) #constructor +public+f xf.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst +# ItemTool +public vr.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial +public vr.d #FD:ItemTool/field_77865_bY #damageVsEntity +# EntityEnderman +public rv.d #FD:EntityEnderman/field_70827_d #carriableBlocks +# RenderEngine +public bgf.f(Ljava/lang/String;)I #MD:RenderEngine/func_78341_b #getTexture +public bgf.i #FD:RenderEngine/field_94154_l #terrainTextureMap +public bgf.j #FD:RenderEngine/field_94155_m #itemTextureMap +# RenderGlobal +public bfz.h #FD:RenderGlobal/field_72769_h #theWorld +public bfz.i #FD:RenderGlobal/field_72770_i #renderEngine +public bfz.q #FD:RenderGlobal/field_72777_q #mc +public bfz.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks +public bfz.E #FD:RenderGlobal/field_72738_E #damagedBlocks +# SoundManager +public bkd.a #FD:SoundManager/field_77381_a #sndSystem +public bkd.b #FD:SoundManager/field_77379_b #soundPoolSounds +public bkd.c #FD:SoundManager/field_77380_c #soundPoolStreaming +public bkd.d #FD:SoundManager/field_77377_d #soundPoolMusic +# EntityMinecart +protected ri.* #FD:EntityMinecart/* # All private -> protected +# -- MISSING MAPPING public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered +# Block +public apa.(ILaif;)V #MD:Block/(ILnet/minecraft/src/Material;) #Constructor +public apa.(IILaif;)V #MD:Block/(IILnet/minecraft/src/Material;) #Constructor +public apa.cB #FD:Block/field_72029_cc #blockResistance +public apa.cA #FD:Block/field_71989_cb #blockHardness +# -- MISSING MAPPING public amq.r()Lamq; #MD:Block/func_71912_p #setRequiresSelfNotify +public apa.a(Lape;)Lapa; #MD:Block/func_71884_a #setStepSound +public apa.b(F)Lapa; #MD:Block/func_71894_b #setResistance +public apa.c(F)Lapa; #MD:Block/func_71848_c #setHardness +public apa.k(I)Lapa; #MD:Block/func_71868_h #setLightOpacity +public apa.a(F)Lapa; #MD:Block/func_71900_a #setLightValue +public apa.r()Lapa; #MD:Block/func_71875_q #setBlockUnbreakable +public apa.b(Z)Lapa; #MD:Block/func_71907_b #setTickRandomly +public apa.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds +# NetServerHandler +public jh.f #FD:NetServerHandler/field_72572_g #playerInAirTime +# TileEntity +public aqp.k #FD:TileEntity/field_70331_k #worldObj +# BlockLeavesBase +public api.d #FD:BlockLeavesBase/field_72131_c #graphicsLevel +# Item +public wk.(I)V #MD:Item/(I) #Constructor +public wk.e(I)Lwk; #MD:Item/func_77656_e #setMaxDamage +public-f wk.h(Lwm;)Llx; #MD:Item/func_77650_f #getIconIndex +public wk.c(Ljava/lang/String;)Lwk; #MD:Item/func_77631_c #setPotionEffect +# RailLogic +public alc #CL:BlockBaseRailLogic +public alc.a()I #MD:BlockBaseRailLogic/func_94505_a #getNAdjacentTiles +# EntityPlayer +public sq.a(Lrh;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld +public sq.h()V #MD:EntityPlayer/func_71053_j #closeScreen +public sq.b #FD:EntityPlayer/field_71076_b #sleepTimer +# EntityPlayerMP +public bdw.a(Lrh;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld +# World Gen Chests Related +public lp.* #FD:WeightedRandomChestContent/* #all +public iz.S #FD:WorldServer/field_73069_S #bonusChestContent +public aem.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents +public afq.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple +public afr.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents +public afr.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents +public agb.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents +public agf.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents +public agk.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents +public ahl.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents +# AnvilChunkLoader.chunkSaveLocation +public acj.d #FD:AnvilChunkLoader/field_75825_d +# ChunkProviderServer.currentChunkLoader +public iy.e #FD:ChunkProviderServer/field_73247_e +# PlayerManager +public iw.a(IIZ)Lix; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher +# PlayerInstance +public ix #CL:PlayerInstance +# World +public-f aab.A #FD:World/field_72982_D #villageCollectionObj +public aab.G #FD:World/field_72993_I #activeChunkSet +# EntityLiving +public ng.be #FD:EntityLiving/field_70728_aV #experienceValue +public ng.bp #FD:EntityLiving/field_70715_bh #targetTasks +# GuiFlatPresets +public axm.a(Ljava/lang/String;ILaav;Ljava/util/List;[Laei;)V #MD:GuiFlatPresets/func_82294_a +public axm.a(Ljava/lang/String;ILaav;[Laei;)V #MD:GuiFlatPresets/func_82297_a +# BiomeGenBase +public aav.*() #MD:BiomeGenBase/* #Everything protected->public +# MapGenVillage +public-f agz.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes +# ShapedRecipes +public+f yn.d #FD:ShapedRecipes/field_77574_d #recipeItems +public+f yn.b #FD:ShapedRecipes/field_77576_b #recipeWidth +public+f yn.c #FD:ShapedRecipes/field_77577_c #recipeHeight +# ShapelessRecipes +public yo.b #FD:ShapelessRecipes/field_77579_b #recipeItems +# GuiContainer +protected ayl.a(Lul;)V #MD:GuiContainer/func_74192_a #drawSlotInventory +# BlockButton +protected ali.n(Laab;III)V #MD:BlockButton/func_82535_o #checkActivation +protected-f ali.a #FD:BlockButton/field_82537_a #sensible +# BiomeDecorator +public aaz.* #FD:BiomeDecorator/* # All private -> protected +# CreativeTabs +public-f ve.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final +# Packet +public ei.a(IZZLjava/lang/Class;)V #MD:Packet/func_73285_a #addIdClassMapping +# SaveHandler +public ajt.b()Ljava/io/File; #MD:SaveHandler/func_75765_b +# World stuff +public aab.b(Lmp;)V #MD:World/func_72847_b #releaseEntitySkin +public aab.m #FD:World/field_73003_n #prevRainingStrength +public aab.n #FD:World/field_73004_o #rainingStrength +public aab.p #FD:World/field_73017_q #thunderingStrength +public aab.o #FD:World/field_73018_p #prevThunderingStrength +#WorldClient +public bdt.b(Lmp;)V #MD:WorldClient/func_72847_b #releaseEntitySkin +#WorldServer +public iz.b(Lmp;)V #MD:WorldServer/func_72847_b #releaseEntitySkin +public iz.N #FD:WorldServer/field_73068_P #allPlayersSleeping +#TextureMap +public bis.a #FD:TextureMap/field_94255_a +public bis.b #FD:TextureMap/field_94253_b +public bis.c #FD:TextureMap/field_94254_c +public bis.d #FD:TextureMap/field_94251_d +#Potion +public mk.b(II)Lmk; #MD:Potion/func_76399_b #setIconIndex +#PotionHelper +public xu.m #FD:PotionHelper/field_77927_l #potionRequirements +public xu.n #FD:PotionHelper/field_77928_m #potionAmplifiers +#PotionEffect +public ml.b #FD:PotionEffect/field_76460_b #duration +#BlockFluid +protected ane.a #FD:BlockFluid/field_94425_a #theIcon \ No newline at end of file diff --git a/common/net/minecraftforge/common/DimensionManager.java b/common/net/minecraftforge/common/DimensionManager.java index 000413e6e..4035453cd 100644 --- a/common/net/minecraftforge/common/DimensionManager.java +++ b/common/net/minecraftforge/common/DimensionManager.java @@ -66,12 +66,12 @@ public class DimensionManager } /** - * Unregisters a Provider type, and returns a array of all dimensions that are + * Unregisters a Provider type, and returns a array of all dimensions that are * registered to this provider type. - * If the return size is greater then 0, it is required that the caller either - * change those dimensions's registered type, or replace this type before the + * If the return size is greater then 0, it is required that the caller either + * change those dimensions's registered type, or replace this type before the * world is attempted to load, else the loader will throw an exception. - * + * * @param id The provider type ID to unreigster * @return An array containing all dimension IDs still registered to this provider type. */ @@ -409,13 +409,13 @@ public class DimensionManager { if (DimensionManager.getWorld(0) != null) { - return ((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).getSaveDirectory(); + return ((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).getWorldDirectory(); } else if (MinecraftServer.getServer() != null) { MinecraftServer srv = MinecraftServer.getServer(); SaveHandler saveHandler = (SaveHandler) srv.getActiveAnvilConverter().getSaveLoader(srv.getFolderName(), false); - return saveHandler.getSaveDirectory(); + return saveHandler.getWorldDirectory(); } else { diff --git a/common/net/minecraftforge/common/ForgeHooks.java b/common/net/minecraftforge/common/ForgeHooks.java index 5f0d23dc2..430ef35cb 100644 --- a/common/net/minecraftforge/common/ForgeHooks.java +++ b/common/net/minecraftforge/common/ForgeHooks.java @@ -116,7 +116,7 @@ public class ForgeHooks } return true; } - + public static boolean canToolHarvestBlock(Block block, int metadata, ItemStack stack) { if (stack == null) return false; @@ -167,19 +167,19 @@ public class ForgeHooks MinecraftForge.setToolClass(Item.pickaxeWood, "pickaxe", 0); MinecraftForge.setToolClass(Item.pickaxeStone, "pickaxe", 1); - MinecraftForge.setToolClass(Item.pickaxeSteel, "pickaxe", 2); + MinecraftForge.setToolClass(Item.pickaxeIron, "pickaxe", 2); MinecraftForge.setToolClass(Item.pickaxeGold, "pickaxe", 0); MinecraftForge.setToolClass(Item.pickaxeDiamond, "pickaxe", 3); MinecraftForge.setToolClass(Item.axeWood, "axe", 0); MinecraftForge.setToolClass(Item.axeStone, "axe", 1); - MinecraftForge.setToolClass(Item.axeSteel, "axe", 2); + MinecraftForge.setToolClass(Item.axeIron, "axe", 2); MinecraftForge.setToolClass(Item.axeGold, "axe", 0); MinecraftForge.setToolClass(Item.axeDiamond, "axe", 3); MinecraftForge.setToolClass(Item.shovelWood, "shovel", 0); MinecraftForge.setToolClass(Item.shovelStone, "shovel", 1); - MinecraftForge.setToolClass(Item.shovelSteel, "shovel", 2); + MinecraftForge.setToolClass(Item.shovelIron, "shovel", 2); MinecraftForge.setToolClass(Item.shovelGold, "shovel", 0); MinecraftForge.setToolClass(Item.shovelDiamond, "shovel", 3); @@ -205,7 +205,7 @@ public class ForgeHooks MinecraftForge.setBlockHarvestLevel(Block.oreGold, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Block.blockGold, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(Block.oreIron, "pickaxe", 1); - MinecraftForge.setBlockHarvestLevel(Block.blockSteel, "pickaxe", 1); + MinecraftForge.setBlockHarvestLevel(Block.blockIron, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(Block.oreLapis, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(Block.blockLapis, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(Block.oreRedstone, "pickaxe", 2); diff --git a/common/net/minecraftforge/common/WorldSpecificSaveHandler.java b/common/net/minecraftforge/common/WorldSpecificSaveHandler.java index 2f3f2edd2..91ce74c20 100644 --- a/common/net/minecraftforge/common/WorldSpecificSaveHandler.java +++ b/common/net/minecraftforge/common/WorldSpecificSaveHandler.java @@ -11,7 +11,7 @@ import net.minecraft.world.storage.WorldInfo; import net.minecraft.world.WorldProvider; import net.minecraft.world.WorldServer; -//Class used internally to provide the world specific data directories. +//Class used internally to provide the world specific data directories. public class WorldSpecificSaveHandler implements ISaveHandler { @@ -34,7 +34,7 @@ public class WorldSpecificSaveHandler implements ISaveHandler @Override public void saveWorldInfo(WorldInfo var1){ parent.saveWorldInfo(var1); } @Override public IPlayerFileData getSaveHandler() { return parent.getSaveHandler(); } @Override public void flush() { parent.flush(); } - @Override public String getSaveDirectoryName() { return parent.getSaveDirectoryName(); } + @Override public String getWorldDirectoryName() { return parent.getWorldDirectoryName(); } @Override public File getMapFileFromName(String name) diff --git a/fml b/fml index 4836b3272..1774e2bf3 160000 --- a/fml +++ b/fml @@ -1 +1 @@ -Subproject commit 4836b3272a9b292c62816c1d1f9e845486753839 +Subproject commit 1774e2bf3073c3449d1f289399971ad93a5b6479 diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index a0fba038f..0f401ac6e 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -155,7 +155,7 @@ } /** -@@ -1435,4 +1455,898 @@ +@@ -1439,4 +1459,898 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); } @@ -1023,7 +1023,7 @@ + */ + public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) + { -+ return (blockID == blockEmerald.blockID || blockID == blockGold.blockID || blockID == blockDiamond.blockID || blockID == blockSteel.blockID); ++ return (blockID == blockEmerald.blockID || blockID == blockGold.blockID || blockID == blockDiamond.blockID || blockID == blockIron.blockID); + } + + /** diff --git a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch index 62413eb6e..1d35f6eb3 100644 --- a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch @@ -1,70 +1,70 @@ --- ../src_base/minecraft/net/minecraft/block/BlockBaseRailLogic.java +++ ../src_work/minecraft/net/minecraft/block/BlockBaseRailLogic.java -@@ -14,6 +14,8 @@ - private final boolean field_94512_f; - private List field_94513_g; +@@ -16,6 +16,8 @@ + /** The chunk position the rail is at. */ + private List railChunkPosition; + private final boolean canMakeSlopes; + - final BlockRailBase field_94518_a; + final BlockRailBase theRail; public BlockBaseRailLogic(BlockRailBase par1, World par2, int par3, int par4, int par5) -@@ -25,17 +27,11 @@ - this.field_94514_d = par4; - this.field_94515_e = par5; +@@ -27,17 +29,11 @@ + this.railY = par4; + this.railZ = par5; int l = par2.getBlockId(par3, par4, par5); - int i1 = par2.getBlockMetadata(par3, par4, par5); - - if (((BlockRailBase)Block.blocksList[l]).isPowered) - { -- this.field_94512_f = true; +- this.isStraightRail = true; - i1 &= -9; - } - else - { -- this.field_94512_f = false; +- this.isStraightRail = false; - } + + BlockRailBase target = (BlockRailBase)Block.blocksList[l]; + int i1 = target.getBasicRailMetadata(par2, null, par3, par4, par5); -+ field_94512_f = !target.isFlexibleRail(par2, par3, par4, par5); ++ isStraightRail = !target.isFlexibleRail(par2, par3, par4, par5); + canMakeSlopes = target.canMakeSlopes(par2, par3, par4, par5); - this.func_94504_a(i1); + this.setBasicRail(i1); } -@@ -227,7 +223,7 @@ +@@ -232,7 +228,7 @@ } } - if (b0 == 0) + if (b0 == 0 && canMakeSlopes) { - if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) + if (BlockRailBase.isRailBlockAt(this.logicWorld, this.railX, this.railY + 1, this.railZ - 1)) { -@@ -240,7 +236,7 @@ +@@ -245,7 +241,7 @@ } } - if (b0 == 1) + if (b0 == 1 && canMakeSlopes) { - if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) + if (BlockRailBase.isRailBlockAt(this.logicWorld, this.railX + 1, this.railY + 1, this.railZ)) { -@@ -385,7 +381,7 @@ +@@ -390,7 +386,7 @@ } } - if (b0 == 0) + if (b0 == 0 && canMakeSlopes) { - if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c, this.field_94514_d + 1, this.field_94515_e - 1)) + if (BlockRailBase.isRailBlockAt(this.logicWorld, this.railX, this.railY + 1, this.railZ - 1)) { -@@ -398,7 +394,7 @@ +@@ -403,7 +399,7 @@ } } - if (b0 == 1) + if (b0 == 1 && canMakeSlopes) { - if (BlockRailBase.isRailBlockAt(this.field_94516_b, this.field_94517_c + 1, this.field_94514_d + 1, this.field_94515_e)) + if (BlockRailBase.isRailBlockAt(this.logicWorld, this.railX + 1, this.railY + 1, this.railZ)) { diff --git a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch index 15c9f842e..796e19d2a 100644 --- a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch @@ -12,7 +12,7 @@ +public class BlockCactus extends Block implements IPlantable { @SideOnly(Side.CLIENT) - private Icon field_94380_a; + private Icon cactusTopIcon; @@ -158,7 +162,7 @@ else { @@ -23,8 +23,8 @@ } @@ -182,4 +186,22 @@ - this.field_94380_a = par1IconRegister.registerIcon("cactus_top"); - this.field_94379_b = par1IconRegister.registerIcon("cactus_bottom"); + this.cactusTopIcon = par1IconRegister.registerIcon("cactus_top"); + this.cactusBottomIcon = par1IconRegister.registerIcon("cactus_bottom"); } + + @Override diff --git a/patches/minecraft/net/minecraft/block/BlockChest.java.patch b/patches/minecraft/net/minecraft/block/BlockChest.java.patch index 33228a5a3..66b7b1c12 100644 --- a/patches/minecraft/net/minecraft/block/BlockChest.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChest.java.patch @@ -9,7 +9,7 @@ public class BlockChest extends BlockContainer { private final Random random = new Random(); -@@ -438,7 +440,7 @@ +@@ -442,7 +444,7 @@ { return null; } @@ -18,7 +18,7 @@ { return null; } -@@ -446,19 +448,19 @@ +@@ -450,19 +452,19 @@ { return null; } diff --git a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch index b2854b952..17513fe7d 100644 --- a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch @@ -38,7 +38,7 @@ @SideOnly(Side.CLIENT) @@ -249,4 +259,10 @@ - this.iconArray[i] = par1IconRegister.registerIcon(field_94470_a[i]); + this.iconArray[i] = par1IconRegister.registerIcon(cocoaIcons[i]); } } + diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 7eff5cbbb..6e354d3c4 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/block/BlockDoor.java +++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java -@@ -301,7 +301,7 @@ +@@ -303,7 +303,7 @@ { if (this.blockMaterial == Material.iron) { diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 18e39477e..53b6ce0ec 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -121,19 +121,19 @@ - { - EntityMinecart entityminecart = (EntityMinecart)this.objectMouseOver.entityHit; - -- if (entityminecart.func_94087_l() == 2) +- if (entityminecart.getMinecartType() == 2) - { - j = Item.minecartPowered.itemID; - } -- else if (entityminecart.func_94087_l() == 1) +- else if (entityminecart.getMinecartType() == 1) - { - j = Item.minecartCrate.itemID; - } -- else if (entityminecart.func_94087_l() == 3) +- else if (entityminecart.getMinecartType() == 3) - { - j = Item.tntMinecart.itemID; - } -- else if (entityminecart.func_94087_l() == 5) +- else if (entityminecart.getMinecartType() == 5) - { - j = Item.hopperMinecart.itemID; - } diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch index d0bf3fd46..b79db905d 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -13,11 +13,11 @@ this.zLevel = 200.0F; itemRenderer.zLevel = 200.0F; - itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3); -- itemRenderer.renderItemStack(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str); +- itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str); + FontRenderer font = par1ItemStack.getItem().getFontRenderer(par1ItemStack); + if (font == null) font = fontRenderer; + itemRenderer.renderItemAndEffectIntoGUI(font, this.mc.renderEngine, par1ItemStack, par2, par3); -+ itemRenderer.renderItemStack(font, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str); ++ itemRenderer.renderItemOverlayIntoGUI(font, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str); this.zLevel = 0.0F; itemRenderer.zLevel = 0.0F; } @@ -43,13 +43,7 @@ { if (!par1List.isEmpty()) { -@@ -246,12 +255,12 @@ - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - int k = 0; -- Iterator iterator = par1List.iterator(); -+ Iterator iterator = par1List.iterator(); - +@@ -251,7 +260,7 @@ while (iterator.hasNext()) { String s = (String)iterator.next(); diff --git a/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch b/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch index ba17cfd40..55fbd0320 100644 --- a/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch @@ -10,8 +10,8 @@ { super(par1World, par2, par4, par6, par8, par10, par12); this.blockInstance = par14Block; -- this.func_94052_a(par17RenderEngine, par14Block.getBlockTextureFromSideAndMetadata(0, par16)); -+ this.func_94052_a(par17RenderEngine, par14Block.getBlockTextureFromSideAndMetadata(par15, par16)); +- this.setParticleIcon(par17RenderEngine, par14Block.getIcon(0, par16)); ++ this.setParticleIcon(par17RenderEngine, par14Block.getIcon(par15, par16)); this.particleGravity = par14Block.blockParticleGravity; this.particleRed = this.particleGreen = this.particleBlue = 0.6F; this.particleScale /= 2.0F; diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 6739ce600..f48eacd90 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -86,14 +86,14 @@ + this.atlasTexture.writeImage("debug.stitched_" + this.textureName + ".png"); + } + ForgeHooksClient.onTextureStitchedPost(this); - this.atlasTexture.createTexture(); + this.atlasTexture.uploadTexture(); } @@ -202,6 +227,7 @@ if (par1Str == null) { (new RuntimeException("Don\'t register null!")).printStackTrace(); -+ par1Str = "null"; //Don't allow things to actually register null.. ++ par1Str = "null"; //Don't allow things to actually register null.. } TextureStitched texturestitched = (TextureStitched)this.textureStichedMap.get(par1Str); @@ -106,9 +106,9 @@ + // Forge Start + //=================================================================================================== + /** -+ * Grabs the registered entry for the specified name, returning null if there was not a entry. ++ * Grabs the registered entry for the specified name, returning null if there was not a entry. + * Opposed to func_94245_a, this will not instantiate the entry, useful to test if a maping exists. -+ * ++ * + * @param name The name of the entry to find + * @return The registered entry, null if nothing was registered. + */ @@ -119,8 +119,8 @@ + + /** + * Adds a texture registry entry to this map for the specified name if one does not already exist. -+ * Returns false if the map already contains a entry for the specified name. -+ * ++ * Returns false if the map already contains a entry for the specified name. ++ * + * @param name Entry name + * @param entry Entry instance + * @return True if the entry was added to the map, false otherwise. diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index 7fe331fd7..e76f90a02 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -32,7 +32,7 @@ public EntityMinecart(World par1World) { super(par1World); -@@ -99,6 +117,10 @@ +@@ -105,6 +123,10 @@ */ public AxisAlignedBB getCollisionBox(Entity par1Entity) { @@ -43,7 +43,7 @@ return par1Entity.canBePushed() ? par1Entity.boundingBox : null; } -@@ -107,6 +129,10 @@ +@@ -113,6 +135,10 @@ */ public AxisAlignedBB getBoundingBox() { @@ -54,7 +54,7 @@ return null; } -@@ -115,7 +141,7 @@ +@@ -121,7 +147,7 @@ */ public boolean canBePushed() { @@ -63,26 +63,26 @@ } public EntityMinecart(World par1World, double par2, double par4, double par6) -@@ -347,19 +373,22 @@ +@@ -353,19 +379,21 @@ double d5 = 0.0078125D; int l = this.worldObj.getBlockId(j, i, k); - if (BlockRailBase.isRailBlock(l)) - { - int i1 = this.worldObj.getBlockMetadata(j, i, k); -- this.func_94091_a(j, i, k, d4, d5, l, i1); +- this.updateOnTrack(j, i, k, d4, d5, l, i1); +- + if (canUseRail() && BlockRailBase.isRailBlock(l)) + { + BlockRailBase rail = (BlockRailBase)Block.blocksList[l]; + float railMaxSpeed = rail.getRailMaxSpeed(worldObj, this, j, i, k); + double maxSpeed = Math.min(railMaxSpeed, getCurrentCartSpeedCapOnRail()); + int i1 = rail.getBasicRailMetadata(worldObj, this, j, i, k); -+ this.func_94091_a(j, i, k, maxSpeed, getSlopeAdjustment(), l, i1); - ++ this.updateOnTrack(j, i, k, maxSpeed, getSlopeAdjustment(), l, i1); if (l == Block.railActivator.blockID) { -- this.func_96095_a(j, i, k, (i1 & 8) != 0); -+ this.func_96095_a(j, i, k, (worldObj.getBlockMetadata(j, i, k) & 8) != 0); +- this.onActivatorRailPass(j, i, k, (i1 & 8) != 0); ++ this.onActivatorRailPass(j, i, k, (worldObj.getBlockMetadata(j, i, k) & 8) != 0); } } else @@ -92,7 +92,7 @@ } this.doBlockCollisions(); -@@ -386,7 +415,18 @@ +@@ -392,7 +420,18 @@ } this.setRotation(this.rotationYaw, this.rotationPitch); @@ -112,7 +112,7 @@ if (list != null && !list.isEmpty()) { -@@ -410,6 +450,8 @@ +@@ -416,6 +455,8 @@ this.riddenByEntity = null; } @@ -121,7 +121,7 @@ } } -@@ -435,6 +477,17 @@ +@@ -444,6 +485,17 @@ if (this.motionZ > par1) { this.motionZ = par1; @@ -139,7 +139,7 @@ } if (this.onGround) -@@ -444,13 +497,13 @@ +@@ -453,13 +505,13 @@ this.motionZ *= 0.5D; } @@ -157,7 +157,7 @@ } } -@@ -464,7 +517,7 @@ +@@ -473,7 +525,7 @@ if (par8 == Block.railPowered.blockID) { @@ -166,7 +166,7 @@ flag1 = !flag; } -@@ -535,7 +588,7 @@ +@@ -544,7 +596,7 @@ } } @@ -175,7 +175,7 @@ { d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -583,36 +636,8 @@ +@@ -592,36 +644,8 @@ this.posX = d8 + d2 * d7; this.posZ = d9 + d3 * d7; this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ); @@ -214,7 +214,7 @@ if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2]) { -@@ -650,7 +675,12 @@ +@@ -659,7 +683,12 @@ this.motionZ = d6 * (double)(k1 - par3); } @@ -228,7 +228,7 @@ { double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -721,12 +751,7 @@ +@@ -730,12 +759,7 @@ } else { @@ -242,7 +242,7 @@ par3 = (double)j; -@@ -772,13 +797,8 @@ +@@ -781,13 +805,8 @@ if (BlockRailBase.isRailBlock(l)) { @@ -257,7 +257,7 @@ if (i1 >= 2 && i1 <= 5) { -@@ -884,11 +904,17 @@ +@@ -893,11 +912,17 @@ */ public void applyEntityCollision(Entity par1Entity) { @@ -271,32 +271,32 @@ { if (par1Entity != this.riddenByEntity) { -- if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && this.func_94087_l() == 0 && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null) +- if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && this.getMinecartType() == 0 && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null) + if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && canBeRidden() && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null) { par1Entity.mountEntity(this); } -@@ -934,7 +960,7 @@ +@@ -943,7 +968,7 @@ double d7 = par1Entity.motionX + this.motionX; double d8 = par1Entity.motionZ + this.motionZ; -- if (((EntityMinecart)par1Entity).func_94087_l() == 2 && this.func_94087_l() != 2) +- if (((EntityMinecart)par1Entity).getMinecartType() == 2 && this.getMinecartType() != 2) + if (((EntityMinecart)par1Entity).isPoweredCart() && !isPoweredCart()) { this.motionX *= 0.20000000298023224D; this.motionZ *= 0.20000000298023224D; -@@ -942,7 +968,7 @@ +@@ -951,7 +976,7 @@ par1Entity.motionX *= 0.949999988079071D; par1Entity.motionZ *= 0.949999988079071D; } -- else if (((EntityMinecart)par1Entity).func_94087_l() != 2 && this.func_94087_l() == 2) +- else if (((EntityMinecart)par1Entity).getMinecartType() != 2 && this.getMinecartType() == 2) + else if (!((EntityMinecart)par1Entity).isPoweredCart() && isPoweredCart()) { par1Entity.motionX *= 0.20000000298023224D; par1Entity.motionZ *= 0.20000000298023224D; -@@ -1149,4 +1175,211 @@ +@@ -1158,4 +1183,211 @@ { - return this.field_94102_c; + return this.entityName; } + + /** @@ -418,7 +418,7 @@ + */ + public boolean isPoweredCart() + { -+ return func_94087_l() == 2; ++ return getMinecartType()== 2; + } + + /** diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch index a8805e06b..e90ecb610 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch @@ -9,7 +9,7 @@ public abstract class EntityMinecartContainer extends EntityMinecart implements IInventory { -@@ -278,6 +280,10 @@ +@@ -283,6 +285,10 @@ */ public boolean interact(EntityPlayer par1EntityPlayer) { diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch index f4cb5cdc1..33a2fe685 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch @@ -9,7 +9,7 @@ public class EntityMinecartHopper extends EntityMinecartContainer implements Hopper { -@@ -53,6 +55,10 @@ +@@ -54,6 +56,10 @@ */ public boolean interact(EntityPlayer par1EntityPlayer) { diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 8fe8fcbd7..2cd6c8159 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -30,7 +30,7 @@ { @@ -238,13 +244,16 @@ /** Icon index in the icons table. */ - protected Icon iconIndex; + protected Icon itemIcon; + /** FORGE: To disable repair recipes. */ + protected boolean canRepair = true; diff --git a/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch b/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch index 7ee90aa14..99ebe6f50 100644 --- a/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch +++ b/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch @@ -72,8 +72,8 @@ AxisAlignedBB axisalignedbb = this.playerEntity.boundingBox.copy().expand((double)f4, (double)f4, (double)f4).addCoord(0.0D, -0.55D, 0.0D); -- if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !worldserver.isAABBNonEmpty(axisalignedbb)) -+ if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !worldserver.isAABBNonEmpty(axisalignedbb) && !this.playerEntity.capabilities.allowFlying) +- if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !worldserver.checkBlockCollision(axisalignedbb)) ++ if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !worldserver.checkBlockCollision(axisalignedbb) && !this.playerEntity.capabilities.allowFlying) { if (d12 >= -0.03125D) { @@ -149,3 +149,12 @@ } } } +@@ -1220,7 +1263,7 @@ + } + } + } +- ++ + + @Override + diff --git a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch index ab0a2d9b8..f89f2651b 100644 --- a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch +++ b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch @@ -8,9 +8,9 @@ import java.util.zip.DataFormatException; import java.util.zip.Deflater; import java.util.zip.Inflater; -@@ -26,6 +27,9 @@ - private int dataLength; - private boolean field_92076_h; +@@ -31,6 +32,9 @@ + */ + private boolean skyLightSent; private static byte[] chunkDataNotCompressed = new byte[0]; + private int maxLen = 0; + @@ -18,7 +18,7 @@ public Packet56MapChunks() {} -@@ -44,15 +48,6 @@ +@@ -49,15 +53,6 @@ { Chunk chunk = (Chunk)par1List.get(k); Packet51MapChunkData packet51mapchunkdata = Packet51MapChunk.getMapChunkData(chunk, true, 65535); @@ -34,7 +34,7 @@ j += packet51mapchunkdata.compressedData.length; this.chunkPostX[k] = chunk.xPosition; this.chunkPosZ[k] = chunk.zPosition; -@@ -60,15 +55,29 @@ +@@ -65,15 +60,29 @@ this.field_73588_b[k] = packet51mapchunkdata.chunkHasAddSectionFlag; this.field_73584_f[k] = packet51mapchunkdata.compressedData; } @@ -67,7 +67,7 @@ } finally { -@@ -150,6 +159,16 @@ +@@ -155,6 +164,16 @@ */ public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException { @@ -83,4 +83,4 @@ + par1DataOutputStream.writeShort(this.chunkPostX.length); par1DataOutputStream.writeInt(this.dataLength); - par1DataOutputStream.writeBoolean(this.field_92076_h); + par1DataOutputStream.writeBoolean(this.skyLightSent); diff --git a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch index b7d12191d..aaef318d0 100644 --- a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch @@ -14,9 +14,9 @@ import net.minecraft.nbt.NBTTagCompound; public class PotionEffect -@@ -24,6 +29,9 @@ - @SideOnly(Side.CLIENT) - private boolean field_100013_f; +@@ -26,6 +31,9 @@ + /** True if potion effect duration is at maximum, false otherwise. */ + private boolean isPotionDurationMax; + /** List of ItemStack that can cure the potion effect **/ + private List curativeItems; @@ -24,7 +24,7 @@ public PotionEffect(int par1, int par2) { this(par1, par2, 0); -@@ -40,6 +48,8 @@ +@@ -42,6 +50,8 @@ this.duration = par2; this.amplifier = par3; this.isAmbient = par4; @@ -33,7 +33,7 @@ } public PotionEffect(PotionEffect par1PotionEffect) -@@ -47,6 +57,7 @@ +@@ -49,6 +59,7 @@ this.potionID = par1PotionEffect.potionID; this.duration = par1PotionEffect.duration; this.amplifier = par1PotionEffect.amplifier; @@ -41,7 +41,7 @@ } /** -@@ -91,6 +102,63 @@ +@@ -93,6 +104,63 @@ public int getAmplifier() { return this.amplifier; diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch index 8aeddfc58..eb3679c79 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch @@ -56,7 +56,7 @@ { i = this.chunkLocation.chunkXPos * 16; j = this.chunkLocation.chunkZPos * 16; - this.sendToAllPlayersWatchingChunk(new Packet51MapChunk(PlayerManager.getWorldServer(this.myManager).getChunkFromChunkCoords(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos), false, this.field_73260_f)); + this.sendToAllPlayersWatchingChunk(new Packet51MapChunk(PlayerManager.getWorldServer(this.thePlayerManager).getChunkFromChunkCoords(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos), false, this.field_73260_f)); + /* Forge: Grabs ALL tile entities is costly on a modded server, only send needed ones for (k = 0; k < 16; ++k) @@ -70,7 +70,7 @@ } else { - this.sendToAllPlayersWatchingChunk(new Packet52MultiBlockChange(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos, this.locationOfBlockChange, this.numberOfTilesToUpdate, PlayerManager.getWorldServer(this.myManager))); + this.sendToAllPlayersWatchingChunk(new Packet52MultiBlockChange(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos, this.locationOfBlockChange, this.numberOfTilesToUpdate, PlayerManager.getWorldServer(this.thePlayerManager))); - + } + diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch index 994b6f0c3..772b4845d 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch @@ -1,11 +1,10 @@ --- ../src_base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java +++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java -@@ -120,8 +120,9 @@ - for (int l = this.zCoord - i; l <= this.zCoord + i; ++l) +@@ -121,7 +121,9 @@ { int i1 = this.worldObj.getBlockId(k, j, l); -- -- if (i1 != Block.blockEmerald.blockID && i1 != Block.blockGold.blockID && i1 != Block.blockDiamond.blockID && i1 != Block.blockSteel.blockID) + +- if (i1 != Block.blockEmerald.blockID && i1 != Block.blockGold.blockID && i1 != Block.blockDiamond.blockID && i1 != Block.blockIron.blockID) + Block block = Block.blocksList[i1]; + + if (block == null || !block.isBeaconBase(worldObj, k, j, l, xCoord, yCoord, zCoord)) diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 136d6f421..8e12d5b93 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -40,25 +40,25 @@ /** * boolean; if true updates scheduled by scheduleBlockUpdate happen immediately */ -@@ -163,6 +188,11 @@ +@@ -164,6 +189,11 @@ + * Gets the biome for a given set of x/z coordinates */ public BiomeGenBase getBiomeGenForCoords(int par1, int par2) - { ++ { + return provider.getBiomeGenForCoords(par1, par2); + } + + public BiomeGenBase getBiomeGenForCoordsBody(int par1, int par2) -+ { + { if (this.blockExists(par1, 0, par2)) { - Chunk chunk = this.getChunkFromBlockCoords(par1, par2); -@@ -191,8 +221,14 @@ +@@ -193,8 +223,14 @@ this.theProfiler = par5Profiler; this.worldInfo = new WorldInfo(par4WorldSettings, par2Str); this.provider = par3WorldProvider; - this.mapStorage = new MapStorage(par1ISaveHandler); + perWorldStorage = new MapStorage((ISaveHandler)null); - this.field_98181_L = par6ILogAgent; + this.worldLogAgent = par6ILogAgent; + } + + // Broken up so that the WorldClient gets the chance to set the mapstorage object before the dimension initializes @@ -68,7 +68,7 @@ VillageCollection villagecollection = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages"); if (villagecollection == null) -@@ -206,7 +242,7 @@ +@@ -208,7 +244,7 @@ this.villageCollectionObj.func_82566_a(this); } @@ -77,16 +77,16 @@ this.chunkProvider = this.createChunkProvider(); this.calculateInitialSkylight(); this.calculateInitialWeather(); -@@ -219,7 +255,7 @@ +@@ -221,7 +257,7 @@ this.isRemote = false; this.saveHandler = par1ISaveHandler; this.theProfiler = par5Profiler; - this.mapStorage = new MapStorage(par1ISaveHandler); + this.mapStorage = getMapStorage(par1ISaveHandler); - this.field_98181_L = par6ILogAgent; + this.worldLogAgent = par6ILogAgent; this.worldInfo = par1ISaveHandler.loadWorldInfo(); -@@ -273,12 +309,20 @@ +@@ -275,12 +311,20 @@ this.worldInfo.setServerInitialized(true); } @@ -109,7 +109,7 @@ } else { -@@ -288,6 +332,19 @@ +@@ -290,6 +334,19 @@ this.calculateInitialSkylight(); this.calculateInitialWeather(); @@ -129,7 +129,7 @@ } /** -@@ -371,7 +428,8 @@ +@@ -373,7 +430,8 @@ */ public boolean isAirBlock(int par1, int par2, int par3) { @@ -139,7 +139,7 @@ } /** -@@ -380,7 +438,8 @@ +@@ -382,7 +440,8 @@ public boolean blockHasTileEntity(int par1, int par2, int par3) { int l = this.getBlockId(par1, par2, par3); @@ -149,7 +149,7 @@ } /** -@@ -1156,7 +1215,7 @@ +@@ -1157,7 +1216,7 @@ */ public boolean isDaytime() { @@ -158,7 +158,7 @@ } /** -@@ -1188,7 +1247,7 @@ +@@ -1189,7 +1248,7 @@ int l1 = this.getBlockMetadata(l, i1, j1); Block block = Block.blocksList[k1]; @@ -167,7 +167,7 @@ { MovingObjectPosition movingobjectposition = block.collisionRayTrace(this, l, i1, j1, par1Vec3, par2Vec3); -@@ -1388,6 +1447,12 @@ +@@ -1389,6 +1448,12 @@ */ public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4) { @@ -180,7 +180,7 @@ if (par1Entity != null && par2Str != null) { for (int i = 0; i < this.worldAccesses.size(); ++i) -@@ -1402,6 +1467,12 @@ +@@ -1403,6 +1468,12 @@ */ public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4) { @@ -193,7 +193,7 @@ if (par1EntityPlayer != null && par2Str != null) { for (int i = 0; i < this.worldAccesses.size(); ++i) -@@ -1488,6 +1559,11 @@ +@@ -1489,6 +1560,11 @@ EntityPlayer entityplayer = (EntityPlayer)par1Entity; this.playerEntities.add(entityplayer); this.updateAllPlayersSleepingFlag(); @@ -205,7 +205,7 @@ } this.getChunkFromChunkCoords(i, j).addEntity(par1Entity); -@@ -1734,6 +1810,12 @@ +@@ -1735,6 +1811,12 @@ * Calculates the color for the skybox */ public Vec3 getSkyColor(Entity par1Entity, float par2) @@ -218,7 +218,7 @@ { float f1 = this.getCelestialAngle(par2); float f2 = MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1826,6 +1908,12 @@ +@@ -1827,6 +1909,12 @@ @SideOnly(Side.CLIENT) public Vec3 getCloudColour(float par1) { @@ -231,7 +231,7 @@ float f1 = this.getCelestialAngle(par1); float f2 = MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1904,7 +1992,7 @@ +@@ -1905,7 +1993,7 @@ { int l = chunk.getBlockID(par1, k, par2); @@ -240,7 +240,7 @@ { return k + 1; } -@@ -1919,6 +2007,12 @@ +@@ -1920,6 +2008,12 @@ * How bright are stars in the sky */ public float getStarBrightness(float par1) @@ -253,7 +253,7 @@ { float f1 = this.getCelestialAngle(par1); float f2 = 1.0F - (MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.25F); -@@ -1983,7 +2077,15 @@ +@@ -1984,7 +2078,15 @@ entity.func_85029_a(crashreportcategory); } @@ -270,7 +270,7 @@ } if (entity.isDead) -@@ -2045,7 +2147,16 @@ +@@ -2046,7 +2148,16 @@ crashreport = CrashReport.makeCrashReport(throwable1, "Ticking entity"); crashreportcategory = crashreport.makeCategory("Entity being ticked"); entity.func_85029_a(crashreportcategory); @@ -288,7 +288,7 @@ } } -@@ -2088,7 +2199,16 @@ +@@ -2089,7 +2200,16 @@ crashreport = CrashReport.makeCrashReport(throwable2, "Ticking tile entity"); crashreportcategory = crashreport.makeCategory("Tile entity being ticked"); tileentity.func_85027_a(crashreportcategory); @@ -306,7 +306,7 @@ } } -@@ -2102,7 +2222,7 @@ +@@ -2103,7 +2223,7 @@ if (chunk != null) { @@ -315,7 +315,7 @@ } } } -@@ -2111,6 +2231,10 @@ +@@ -2112,6 +2232,10 @@ if (!this.entityRemoval.isEmpty()) { @@ -326,7 +326,7 @@ this.loadedTileEntityList.removeAll(this.entityRemoval); this.entityRemoval.clear(); } -@@ -2131,18 +2255,18 @@ +@@ -2132,18 +2256,18 @@ { this.loadedTileEntityList.add(tileentity1); } @@ -349,7 +349,7 @@ } } -@@ -2155,13 +2279,13 @@ +@@ -2156,13 +2280,13 @@ public void addTileEntity(Collection par1Collection) { @@ -370,7 +370,7 @@ } } -@@ -2181,9 +2305,17 @@ +@@ -2182,9 +2306,17 @@ { int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posZ); @@ -391,7 +391,7 @@ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; -@@ -2416,6 +2548,14 @@ +@@ -2417,6 +2549,14 @@ { return true; } @@ -406,7 +406,7 @@ } } } -@@ -2738,38 +2878,38 @@ +@@ -2739,15 +2879,16 @@ */ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { @@ -432,11 +432,7 @@ while (iterator.hasNext()) { TileEntity tileentity1 = (TileEntity)iterator.next(); -- -+ - if (tileentity1.xCoord == par1 && tileentity1.yCoord == par2 && tileentity1.zCoord == par3) - { - tileentity1.invalidate(); +@@ -2758,19 +2899,18 @@ iterator.remove(); } } @@ -465,7 +461,7 @@ } } -@@ -2778,27 +2918,10 @@ +@@ -2779,27 +2919,10 @@ */ public void removeBlockTileEntity(int par1, int par2, int par3) { @@ -497,7 +493,7 @@ } } -@@ -2824,7 +2947,8 @@ +@@ -2825,7 +2948,8 @@ */ public boolean isBlockNormalCube(int par1, int par2, int par3) { @@ -507,7 +503,7 @@ } public boolean func_85174_u(int par1, int par2, int par3) -@@ -2847,12 +2971,13 @@ +@@ -2848,12 +2972,13 @@ */ public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3) { @@ -525,7 +521,7 @@ return par1Block == null ? false : (par1Block.blockMaterial.isOpaque() && par1Block.renderAsNormalBlock() ? true : (par1Block instanceof BlockStairs ? (par2 & 4) == 4 : (par1Block instanceof BlockHalfSlab ? (par2 & 8) == 8 : (par1Block instanceof BlockHopper ? true : (par1Block instanceof BlockSnow ? (par2 & 7) == 7 : false))))); } -@@ -2869,7 +2994,7 @@ +@@ -2870,7 +2995,7 @@ if (chunk != null && !chunk.isEmpty()) { Block block = Block.blocksList[this.getBlockId(par1, par2, par3)]; @@ -534,7 +530,7 @@ } else { -@@ -2900,8 +3025,7 @@ +@@ -2901,8 +3026,7 @@ */ public void setAllowedSpawnTypes(boolean par1, boolean par2) { @@ -544,7 +540,7 @@ } /** -@@ -2917,6 +3041,11 @@ +@@ -2918,6 +3042,11 @@ */ private void calculateInitialWeather() { @@ -556,7 +552,7 @@ if (this.worldInfo.isRaining()) { this.rainingStrength = 1.0F; -@@ -2932,6 +3061,11 @@ +@@ -2933,6 +3062,11 @@ * Updates all weather states. */ protected void updateWeather() @@ -568,7 +564,7 @@ { if (!this.provider.hasNoSky) { -@@ -3029,12 +3163,14 @@ +@@ -3030,12 +3164,14 @@ public void toggleRain() { @@ -584,7 +580,7 @@ this.theProfiler.startSection("buildList"); int i; EntityPlayer entityplayer; -@@ -3141,6 +3277,11 @@ +@@ -3142,6 +3278,11 @@ */ public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4) { @@ -596,7 +592,7 @@ BiomeGenBase biomegenbase = this.getBiomeGenForCoords(par1, par3); float f = biomegenbase.getFloatTemperature(); -@@ -3199,6 +3340,11 @@ +@@ -3200,6 +3341,11 @@ */ public boolean canSnowAt(int par1, int par2, int par3) { @@ -608,7 +604,7 @@ BiomeGenBase biomegenbase = this.getBiomeGenForCoords(par1, par3); float f = biomegenbase.getFloatTemperature(); -@@ -3242,10 +3388,12 @@ +@@ -3243,10 +3389,12 @@ else { int l = this.getBlockId(par1, par2, par3); @@ -625,7 +621,7 @@ { j1 = 1; } -@@ -3341,7 +3489,9 @@ +@@ -3342,7 +3490,9 @@ int j4 = i2 + Facing.offsetsXForSide[i4]; int k4 = j2 + Facing.offsetsYForSide[i4]; int l4 = k2 + Facing.offsetsZForSide[i4]; @@ -636,8 +632,8 @@ i3 = this.getSavedLightValue(par1EnumSkyBlock, j4, k4, l4); if (i3 == l2 - i5 && i1 < this.lightUpdateBlockList.length) -@@ -3444,10 +3594,10 @@ - public List func_94576_a(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector) +@@ -3445,10 +3595,10 @@ + public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector) { ArrayList arraylist = new ArrayList(); - int i = MathHelper.floor_double((par2AxisAlignedBB.minX - 2.0D) / 16.0D); @@ -651,7 +647,7 @@ for (int i1 = i; i1 <= j; ++i1) { -@@ -3473,10 +3623,10 @@ +@@ -3474,10 +3624,10 @@ public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector) { @@ -666,7 +662,7 @@ ArrayList arraylist = new ArrayList(); for (int i1 = i; i1 <= j; ++i1) -@@ -3569,11 +3719,14 @@ +@@ -3570,11 +3720,14 @@ */ public void addLoadedEntities(List par1List) { @@ -684,7 +680,7 @@ } } -@@ -3607,6 +3760,11 @@ +@@ -3608,6 +3761,11 @@ else { if (block != null && (block == Block.waterMoving || block == Block.waterStill || block == Block.lavaMoving || block == Block.lavaStill || block == Block.fire || block.blockMaterial.isReplaceable())) @@ -696,7 +692,7 @@ { block = null; } -@@ -3901,7 +4059,7 @@ +@@ -3902,7 +4060,7 @@ */ public long getSeed() { @@ -705,7 +701,7 @@ } public long getTotalWorldTime() -@@ -3911,7 +4069,7 @@ +@@ -3912,7 +4070,7 @@ public long getWorldTime() { @@ -714,7 +710,7 @@ } /** -@@ -3919,7 +4077,7 @@ +@@ -3920,7 +4078,7 @@ */ public void setWorldTime(long par1) { @@ -723,7 +719,7 @@ } /** -@@ -3927,13 +4085,13 @@ +@@ -3928,13 +4086,13 @@ */ public ChunkCoordinates getSpawnPoint() { @@ -739,7 +735,7 @@ } @SideOnly(Side.CLIENT) -@@ -3957,7 +4115,10 @@ +@@ -3958,7 +4116,10 @@ if (!this.loadedEntityList.contains(par1Entity)) { @@ -751,7 +747,7 @@ } } -@@ -3965,6 +4126,11 @@ +@@ -3966,6 +4127,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) @@ -763,7 +759,7 @@ { return true; } -@@ -4085,8 +4251,7 @@ +@@ -4086,8 +4252,7 @@ */ public boolean isBlockHighHumidity(int par1, int par2, int par3) { @@ -773,7 +769,7 @@ } /** -@@ -4161,7 +4326,7 @@ +@@ -4162,7 +4327,7 @@ */ public int getHeight() { @@ -782,7 +778,7 @@ } /** -@@ -4169,7 +4334,7 @@ +@@ -4170,7 +4335,7 @@ */ public int getActualHeight() { @@ -791,7 +787,7 @@ } public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart) -@@ -4212,7 +4377,7 @@ +@@ -4213,7 +4378,7 @@ */ public double getHorizon() { @@ -800,9 +796,9 @@ } /** -@@ -4315,4 +4480,114 @@ +@@ -4316,4 +4481,114 @@ { - return this.field_98181_L; + return this.worldLogAgent; } + + /** @@ -878,7 +874,7 @@ + + /** + * Readded as it was removed, very useful helper function -+ * ++ * + * @param x X position + * @param y Y Position + * @param z Z Position diff --git a/patches/minecraft/net/minecraft/world/WorldServer.java.patch b/patches/minecraft/net/minecraft/world/WorldServer.java.patch index 305c3abcf..f7ef79490 100644 --- a/patches/minecraft/net/minecraft/world/WorldServer.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServer.java.patch @@ -45,7 +45,7 @@ } - scoreboardsavedata.func_96499_a(this.worldScoreboard); -+ if (!(this instanceof WorldServerMulti)) //Forge: We fix the global mapStorage, which causes us to share scoreboards early. So don't associate the save data with the temporary scoreboard ++ if (!(this instanceof WorldServerMulti)) //Forge: We fix the global mapStorage, which causes us to share scoreboards early. So don't associate the save data with the temporary scoreboard + { + scoreboardsavedata.func_96499_a(this.worldScoreboard); + } @@ -57,10 +57,10 @@ @@ -184,6 +202,10 @@ this.villageSiegeObj.tick(); this.theProfiler.endStartSection("portalForcer"); - this.field_85177_Q.func_85189_a(this.getTotalWorldTime()); + this.field_85177_Q.removeStalePortalLocations(this.getTotalWorldTime()); + for (Teleporter tele : customTeleporters) + { -+ tele.func_85189_a(getTotalWorldTime()); ++ tele.removeStalePortalLocations(getTotalWorldTime()); + } this.theProfiler.endSection(); this.sendAndApplyBlockEvents(); @@ -106,8 +106,8 @@ this.theProfiler.endStartSection("tickChunk"); - chunk.updateSkylight(); + //Limits and evenly distributes the lighting update time -+ if (System.nanoTime() - startTime <= 4000000 && doneChunks.add(chunkcoordintpair)) -+ { ++ if (System.nanoTime() - startTime <= 4000000 && doneChunks.add(chunkcoordintpair)) ++ { + chunk.updateSkylight(); + } this.theProfiler.endStartSection("thunder"); diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch index 27f2b335e..ee653cbad 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch @@ -1,7 +1,7 @@ --- ../src_base/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java +++ ../src_work/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java @@ -24,15 +24,9 @@ - File file1 = this.getSaveDirectory(); + File file1 = this.getWorldDirectory(); File file2; - if (par1WorldProvider instanceof WorldProviderHell)