diff --git a/common/net/minecraftforge/common/ChestGenHooks.java b/common/net/minecraftforge/common/ChestGenHooks.java index 4be51af14..b48ca33d2 100644 --- a/common/net/minecraftforge/common/ChestGenHooks.java +++ b/common/net/minecraftforge/common/ChestGenHooks.java @@ -25,7 +25,7 @@ public class ChestGenHooks private static final HashMap chestInfo = new HashMap(); private static boolean hasInit = false; - static + static { init(); } @@ -49,10 +49,10 @@ public class ChestGenHooks addInfo(VILLAGE_BLACKSMITH, ComponentVillageHouse2.villageBlacksmithChestContents, 3, 9); addInfo(BONUS_CHEST, WorldServer.bonusChestContent, 10, 10); - ItemStack book = new ItemStack(Item.field_92053_bW, 1, 0); + ItemStack book = new ItemStack(Item.enchantedBook, 1, 0); WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1); getInfo(MINESHAFT_CORRIDOR ).addItem(tmp); - getInfo(PYRAMID_DESERT_CHEST).addItem(tmp); + getInfo(PYRAMID_DESERT_CHEST).addItem(tmp); getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp); getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp); getInfo(STRONGHOLD_LIBRARY ).addItem(new WeightedRandomChestContent(book, 1, 5, 2)); @@ -77,7 +77,7 @@ public class ChestGenHooks addDungeonLoot(d, new ItemStack(Item.dyePowder, 1, 3), 100, 1, 1); addDungeonLoot(d, book, 100, 1, 1); } - + static void addDungeonLoot(ChestGenHooks dungeon, ItemStack item, int weight, int min, int max) { dungeon.addItem(new WeightedRandomChestContent(item, min, max, weight)); @@ -90,7 +90,7 @@ public class ChestGenHooks /** * Retrieves, or creates the info class for the specified category. - * + * * @param category The category name * @return A instance of ChestGenHooks for the specified category. */ @@ -105,14 +105,14 @@ public class ChestGenHooks /** * Generates an array of items based on the input min/max count. - * If the stack can not hold the total amount, it will be split into + * If the stack can not hold the total amount, it will be split into * stacks of size 1. - * + * * @param rand A random number generator * @param source Source item stack * @param min Minimum number of items * @param max Maximum number of items - * @return An array containing the generated item stacks + * @return An array containing the generated item stacks */ public static ItemStack[] generateStacks(Random rand, ItemStack source, int min, int max) { @@ -158,7 +158,7 @@ public class ChestGenHooks { this.category = category; } - + public ChestGenHooks(String category, WeightedRandomChestContent[] items, int min, int max) { this(category); @@ -169,21 +169,21 @@ public class ChestGenHooks countMin = min; countMax = max; } - + /** * Adds a new entry into the possible items to generate. - * + * * @param item The item to add. */ public void addItem(WeightedRandomChestContent item) { contents.add(item); } - + /** * Removes all items that match the input item stack, Only metadata and item ID are checked. * If the input item has a metadata of -1, all metadatas will match. - * + * * @param item The item to check */ public void removeItem(ItemStack item) @@ -201,13 +201,13 @@ public class ChestGenHooks /** * Gets an array of all random objects that are associated with this category. - * + * * @return The random objects */ public WeightedRandomChestContent[] getItems(Random rnd) { ArrayList ret = new ArrayList(); - + for (WeightedRandomChestContent orig : contents) { Item item = orig.theItemId.getItem(); @@ -227,7 +227,7 @@ public class ChestGenHooks /** * Gets a random number between countMin and countMax. - * + * * @param rand A RNG * @return A random number where countMin <= num <= countMax */ @@ -235,11 +235,11 @@ public class ChestGenHooks { return countMin < countMax ? countMin + rand.nextInt(countMax - countMin) : countMin; } - + /** * Returns a single ItemStack from the possible items in this registry, * Useful if you just want a quick and dirty random Item. - * + * * @param rand A Random Number gen * @return A single ItemStack, or null if it could not get one. */ diff --git a/fml-src-1.4.7-4.7.10.524-master.zip b/fml-src-1.4.7-4.7.13.533-master.zip similarity index 91% rename from fml-src-1.4.7-4.7.10.524-master.zip rename to fml-src-1.4.7-4.7.13.533-master.zip index b787c41bf..4ec8ced1e 100644 Binary files a/fml-src-1.4.7-4.7.10.524-master.zip and b/fml-src-1.4.7-4.7.13.533-master.zip differ diff --git a/install/MinecraftForge-Credits.txt b/install/MinecraftForge-Credits.txt index b7ed9933a..d0de5a521 100644 --- a/install/MinecraftForge-Credits.txt +++ b/install/MinecraftForge-Credits.txt @@ -18,3 +18,9 @@ ScotTools Background: ScotTools was an API that enabled modders to add blocks to * LexManos * +* cpw * + +* Minecraft Coder Pack (MCP) * +Forge Mod Loader and Minecraft Forge have permission to distribute and automatically download components of MCP and distribute MCP data files. +This permission is not transitive and others wishing to redistribute the Minecraft Forge source independently should seek permission of MCP or +remove the MCP data files and request their users to download MCP separately. diff --git a/install/MinecraftForge-License.txt b/install/MinecraftForge-License.txt index f84d1e567..3f20310bb 100644 --- a/install/MinecraftForge-License.txt +++ b/install/MinecraftForge-License.txt @@ -63,3 +63,8 @@ minecraft original sources. Modification of Minecraft Forge as well as dependencies, including patches to minecraft original sources, has to remain under the terms of the present license. + +The right to distribute Minecraft Forge does not extend to the right to distribute +MCP data files included within Minecraft Forge. These are the property of the MCP +project and should be removed from any customized distribution of Minecraft Forge +or permission sought separately from the MCP team. diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 9c8cf54b1..101c28dc0 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -38,7 +38,7 @@ + boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1).isCanceled(); + if (result && var9 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, var9)) { - this.entityRenderer.itemRenderer.func_78445_c(); + this.entityRenderer.itemRenderer.resetEquippedProgress2(); } @@ -2041,6 +2047,18 @@ if (this.theIntegratedServer != null) diff --git a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch index 75af4a62b..44a83b758 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch @@ -23,7 +23,7 @@ } /** -@@ -290,6 +296,12 @@ +@@ -289,6 +295,12 @@ */ protected void updateWeather() { diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch index dd7ba3fe8..51ea510e2 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch @@ -24,22 +24,22 @@ float var12 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI); - byte var13 = 1; - -- if (par1EntityItem.func_92014_d().stackSize > 1) +- if (par1EntityItem.getEntityItem().stackSize > 1) - { - var13 = 2; - } - -- if (par1EntityItem.func_92014_d().stackSize > 5) +- if (par1EntityItem.getEntityItem().stackSize > 5) - { - var13 = 3; - } - -- if (par1EntityItem.func_92014_d().stackSize > 20) +- if (par1EntityItem.getEntityItem().stackSize > 20) - { - var13 = 4; - } - -- if (par1EntityItem.func_92014_d().stackSize > 40) +- if (par1EntityItem.getEntityItem().stackSize > 40) - { - var13 = 5; - } @@ -119,7 +119,7 @@ { @@ -232,39 +211,27 @@ var17 = 0.021875F; - ItemStack var18 = par1EntityItem.func_92014_d(); + ItemStack var18 = par1EntityItem.getEntityItem(); int var19 = var18.stackSize; - byte var24; - diff --git a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch index 0c7d0d3fc..0d145fc26 100644 --- a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch @@ -32,7 +32,7 @@ + */ + public static void addToBookList(Enchantment enchantment) + { -+ ObjectArrays.concat(field_92038_c, enchantment); ++ ObjectArrays.concat(field_92090_c, enchantment); + } + static diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index a9c60a15c..745c1cac4 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch @@ -12,22 +12,22 @@ import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; -@@ -29,6 +34,11 @@ - +@@ -30,6 +35,11 @@ /** The EntityItem's random initial float height. */ public float hoverStart; -+ + + /** + * The maximum age of this EntityItem. The item is expired once this is reached. + */ + public int lifespan = 6000; - ++ public EntityItem(World par1World, double par2, double par4, double par6) { + super(par1World); @@ -49,6 +59,7 @@ { this(par1World, par2, par4, par6); - this.func_92013_a(par8ItemStack); + this.func_92058_a(par8ItemStack); + this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World)); } @@ -42,7 +42,7 @@ + if (!this.worldObj.isRemote && this.age >= lifespan) + { + if (item != null) -+ { ++ { + ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj))); + if (MinecraftForge.EVENT_BUS.post(event)) + { @@ -69,13 +69,13 @@ par1NBTTagCompound.setShort("Age", (short)this.age); + par1NBTTagCompound.setInteger("Lifespan", lifespan); - if (this.func_92014_d() != null) + if (this.getEntityItem() != null) { @@ -280,10 +314,17 @@ NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item"); - this.func_92013_a(ItemStack.loadItemStackFromNBT(var2)); + this.func_92058_a(ItemStack.loadItemStackFromNBT(var2)); -- if (this.func_92014_d() == null) +- if (this.getEntityItem() == null) + ItemStack item = getDataWatcher().getWatchableObjectItemStack(10); + + if (item == null || item.stackSize <= 0) @@ -106,7 +106,7 @@ + return; + } + - ItemStack var2 = this.func_92014_d(); + ItemStack var2 = this.getEntityItem(); int var3 = var2.stackSize; - if (this.delayBeforeCanPickup == 0 && par1EntityPlayer.inventory.addItemStackToInventory(var2)) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index f38096f22..a59863f88 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -570,7 +570,7 @@ { ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem(); -@@ -1354,4 +1240,375 @@ +@@ -1366,4 +1252,375 @@ { return this.dataWatcher.getWatchableObjectInt(18); } diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch index c14bceeef..d97de5425 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -69,7 +69,7 @@ + return; + } + - this.mcServer.getConfigurationManager().func_92027_k(par1DamageSource.getDeathMessage(this)); + this.mcServer.getConfigurationManager().sendChatMsg(par1DamageSource.getDeathMessage(this)); if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) { diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 115243730..4061dc3b8 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -340,7 +340,7 @@ + { + if (this instanceof ItemEnchantedBook) + { -+ return ((ItemEnchantedBook)this).func_92058_a(rnd, ++ return ((ItemEnchantedBook)this).func_92112_a(rnd, + original.theMinimumChanceToGenerateItem, + original.theMaximumChanceToGenerateItem, original.itemWeight); + } diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch index 6103ebd14..b608efcce 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch @@ -2,7 +2,7 @@ +++ ../src_work/minecraft/net/minecraft/item/crafting/RecipeFireworks.java @@ -91,9 +91,9 @@ { - this.field_92050_a = new ItemStack(Item.field_92052_bU); + this.field_92102_a = new ItemStack(Item.firework); + var15 = new NBTTagCompound(); if (var6 > 0) @@ -15,12 +15,12 @@ var18.setTag("Explosions", var25); var18.setByte("Flight", (byte)var4); var15.setTag("Fireworks", var18); -- this.field_92050_a.setTagCompound(var15); +- this.field_92102_a.setTagCompound(var15); - } - + } + -+ this.field_92050_a.setTagCompound(var15); ++ this.field_92102_a.setTagCompound(var15); return true; } else if (var4 == 1 && var3 == 0 && var6 == 0 && var5 > 0 && var8 <= 1) diff --git a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch index 69508c0ca..d98b19dda 100644 --- a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch +++ b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch @@ -10,7 +10,7 @@ import java.util.zip.Inflater; @@ -26,6 +27,9 @@ private int dataLength; - private boolean field_92024_h; + private boolean field_92076_h; private static byte[] chunkDataNotCompressed = new byte[0]; + private int maxLen = 0; + @@ -83,4 +83,4 @@ + par1DataOutputStream.writeShort(this.chunkPostX.length); par1DataOutputStream.writeInt(this.dataLength); - par1DataOutputStream.writeBoolean(this.field_92024_h); + par1DataOutputStream.writeBoolean(this.field_92076_h); diff --git a/patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch b/patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch index 00dd3afd5..7c977f1ec 100644 --- a/patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch +++ b/patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch @@ -25,8 +25,8 @@ + int var3 = 0; + for (Integer id : DimensionManager.getIDs()) { -- this.displayStrings[5 + var3] = "Lvl " + var3 + " tick: " + field_79020_a.format(this.func_79015_a(this.field_79017_e.timeOfLastDimensionTick[var3]) * 1.0E-6D) + " ms"; -+ this.displayStrings[5 + var3] = "Lvl " + id + " tick: " + field_79020_a.format(this.func_79015_a(this.field_79017_e.worldTickTimes.get(id)) * 1.0E-6D) + " ms"; +- this.displayStrings[5 + var3] = "Lvl " + var3 + " tick: " + field_79020_a.format(this.calcArrayAverage(this.field_79017_e.timeOfLastDimensionTick[var3]) * 1.0E-6D) + " ms"; ++ this.displayStrings[5 + var3] = "Lvl " + id + " tick: " + field_79020_a.format(this.calcArrayAverage(this.field_79017_e.worldTickTimes.get(id)) * 1.0E-6D) + " ms"; - if (this.field_79017_e.worldServers[var3] != null && this.field_79017_e.worldServers[var3].theChunkProviderServer != null) + WorldServer world = DimensionManager.getWorld(id); diff --git a/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch b/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch index 310506e8f..b39166afc 100644 --- a/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch @@ -55,7 +55,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); + var4.removePlayerEntityDangerously(par1EntityPlayerMP); par1EntityPlayerMP.isDead = false; - this.transferEntityToWorld(par1EntityPlayerMP, var3, var4, var5); + this.transferEntityToWorld(par1EntityPlayerMP, var3, var4, var5, teleporter); diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index dd03fcce6..0df056356 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -138,8 +138,8 @@ + return Block.blocksList[var4] != null && Block.blocksList[var4].hasTileEntity(meta); } - public int func_85175_e(int par1, int par2, int par3) -@@ -1127,7 +1183,7 @@ + /** +@@ -1130,7 +1186,7 @@ */ public boolean isDaytime() { @@ -148,7 +148,7 @@ } /** -@@ -1159,7 +1215,7 @@ +@@ -1162,7 +1218,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); -@@ -1359,6 +1415,12 @@ +@@ -1362,6 +1418,12 @@ */ public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4) { @@ -170,7 +170,7 @@ if (par1Entity != null && par2Str != null) { for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5) -@@ -1373,6 +1435,12 @@ +@@ -1376,6 +1438,12 @@ */ public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4) { @@ -183,7 +183,7 @@ if (par1EntityPlayer != null && par2Str != null) { for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5) -@@ -1459,6 +1527,11 @@ +@@ -1462,6 +1530,11 @@ EntityPlayer var5 = (EntityPlayer)par1Entity; this.playerEntities.add(var5); this.updateAllPlayersSleepingFlag(); @@ -195,7 +195,7 @@ } this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity); -@@ -1706,6 +1779,12 @@ +@@ -1708,6 +1781,12 @@ * Calculates the color for the skybox */ public Vec3 getSkyColor(Entity par1Entity, float par2) @@ -208,7 +208,7 @@ { float var3 = this.getCelestialAngle(par2); float var4 = MathHelper.cos(var3 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1801,6 +1880,12 @@ +@@ -1803,6 +1882,12 @@ @SideOnly(Side.CLIENT) public Vec3 drawClouds(float par1) { @@ -221,7 +221,7 @@ float var2 = this.getCelestialAngle(par1); float var3 = MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.5F; -@@ -1879,7 +1964,7 @@ +@@ -1881,7 +1966,7 @@ { int var5 = var3.getBlockID(par1, var4, par2); @@ -230,7 +230,7 @@ { return var4 + 1; } -@@ -1894,6 +1979,12 @@ +@@ -1896,6 +1981,12 @@ * How bright are stars in the sky */ public float getStarBrightness(float par1) @@ -243,7 +243,7 @@ { float var2 = this.getCelestialAngle(par1); float var3 = 1.0F - (MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.25F); -@@ -2038,16 +2129,8 @@ +@@ -2040,16 +2131,8 @@ if (var2.isDead) { @@ -262,7 +262,7 @@ } this.theProfiler.endSection(); -@@ -2095,7 +2178,7 @@ +@@ -2097,7 +2180,7 @@ if (var11 != null) { @@ -271,7 +271,7 @@ } } } -@@ -2104,6 +2187,10 @@ +@@ -2106,6 +2189,10 @@ if (!this.entityRemoval.isEmpty()) { @@ -282,7 +282,7 @@ this.loadedTileEntityList.removeAll(this.entityRemoval); this.entityRemoval.clear(); } -@@ -2124,18 +2211,18 @@ +@@ -2126,18 +2213,18 @@ { this.loadedTileEntityList.add(var12); } @@ -305,7 +305,7 @@ } } -@@ -2148,13 +2235,13 @@ +@@ -2150,13 +2237,13 @@ public void addTileEntity(Collection par1Collection) { @@ -326,7 +326,7 @@ } } -@@ -2174,9 +2261,17 @@ +@@ -2176,9 +2263,17 @@ { int var3 = MathHelper.floor_double(par1Entity.posX); int var4 = MathHelper.floor_double(par1Entity.posZ); @@ -347,7 +347,7 @@ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; -@@ -2409,6 +2504,14 @@ +@@ -2411,6 +2506,14 @@ { return true; } @@ -362,7 +362,7 @@ } } } -@@ -2714,25 +2817,21 @@ +@@ -2716,25 +2819,21 @@ */ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { @@ -403,7 +403,7 @@ } } -@@ -2741,27 +2840,10 @@ +@@ -2743,27 +2842,10 @@ */ public void removeBlockTileEntity(int par1, int par2, int par3) { @@ -435,7 +435,7 @@ } } -@@ -2787,7 +2869,8 @@ +@@ -2789,7 +2871,8 @@ */ public boolean isBlockNormalCube(int par1, int par2, int par3) { @@ -445,7 +445,7 @@ } public boolean func_85174_u(int par1, int par2, int par3) -@@ -2810,8 +2893,7 @@ +@@ -2812,8 +2895,7 @@ */ public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3) { @@ -455,7 +455,7 @@ } /** -@@ -2827,7 +2909,7 @@ +@@ -2829,7 +2911,7 @@ if (var5 != null && !var5.isEmpty()) { Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)]; @@ -464,7 +464,7 @@ } else { -@@ -2858,8 +2940,7 @@ +@@ -2860,8 +2942,7 @@ */ public void setAllowedSpawnTypes(boolean par1, boolean par2) { @@ -474,7 +474,7 @@ } /** -@@ -2875,6 +2956,11 @@ +@@ -2877,6 +2958,11 @@ */ private void calculateInitialWeather() { @@ -486,7 +486,7 @@ if (this.worldInfo.isRaining()) { this.rainingStrength = 1.0F; -@@ -2890,6 +2976,11 @@ +@@ -2892,6 +2978,11 @@ * Updates all weather states. */ protected void updateWeather() @@ -498,7 +498,7 @@ { if (!this.provider.hasNoSky) { -@@ -2987,12 +3078,14 @@ +@@ -2989,12 +3080,14 @@ public void toggleRain() { @@ -514,7 +514,7 @@ this.theProfiler.startSection("buildList"); int var1; EntityPlayer var2; -@@ -3099,6 +3192,11 @@ +@@ -3101,6 +3194,11 @@ */ public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4) { @@ -526,7 +526,7 @@ BiomeGenBase var5 = this.getBiomeGenForCoords(par1, par3); float var6 = var5.getFloatTemperature(); -@@ -3156,6 +3254,11 @@ +@@ -3158,6 +3256,11 @@ * Tests whether or not snow can be placed at a given location */ public boolean canSnowAt(int par1, int par2, int par3) @@ -538,7 +538,7 @@ { BiomeGenBase var4 = this.getBiomeGenForCoords(par1, par3); float var5 = var4.getFloatTemperature(); -@@ -3249,7 +3352,7 @@ +@@ -3251,7 +3354,7 @@ private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6) { @@ -547,7 +547,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; -@@ -3384,7 +3487,7 @@ +@@ -3386,7 +3489,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); @@ -556,7 +556,7 @@ if (var23 == 0) { -@@ -3415,7 +3518,7 @@ +@@ -3417,7 +3520,7 @@ var12 = (var9 >> 12 & 63) - 32 + par4; var13 = this.getSavedLightValue(par1EnumSkyBlock, var10, var24, var12); var14 = this.getBlockId(var10, var24, var12); @@ -565,7 +565,7 @@ if (var15 == 0) { -@@ -3517,10 +3620,10 @@ +@@ -3519,10 +3622,10 @@ public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) { this.entitiesWithinAABBExcludingEntity.clear(); @@ -580,7 +580,7 @@ for (int var7 = var3; var7 <= var4; ++var7) { -@@ -3546,10 +3649,10 @@ +@@ -3548,10 +3651,10 @@ public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector) { @@ -595,7 +595,7 @@ ArrayList var8 = new ArrayList(); for (int var9 = var4; var9 <= var5; ++var9) -@@ -3642,11 +3745,14 @@ +@@ -3644,11 +3747,14 @@ */ public void addLoadedEntities(List par1List) { @@ -613,7 +613,7 @@ } } -@@ -3680,6 +3786,11 @@ +@@ -3682,6 +3788,11 @@ else { if (var9 != null && (var9 == Block.waterMoving || var9 == Block.waterStill || var9 == Block.lavaMoving || var9 == Block.lavaStill || var9 == Block.fire || var9.blockMaterial.isReplaceable())) @@ -625,7 +625,7 @@ { var9 = null; } -@@ -3897,7 +4008,7 @@ +@@ -3899,7 +4010,7 @@ */ public long getSeed() { @@ -634,7 +634,7 @@ } public long getTotalWorldTime() -@@ -3907,7 +4018,7 @@ +@@ -3909,7 +4020,7 @@ public long getWorldTime() { @@ -643,7 +643,7 @@ } /** -@@ -3915,7 +4026,7 @@ +@@ -3917,7 +4028,7 @@ */ public void setWorldTime(long par1) { @@ -652,7 +652,7 @@ } /** -@@ -3923,13 +4034,13 @@ +@@ -3925,13 +4036,13 @@ */ public ChunkCoordinates getSpawnPoint() { @@ -668,7 +668,7 @@ } @SideOnly(Side.CLIENT) -@@ -3953,7 +4064,10 @@ +@@ -3955,7 +4066,10 @@ if (!this.loadedEntityList.contains(par1Entity)) { @@ -680,7 +680,7 @@ } } -@@ -3961,6 +4075,11 @@ +@@ -3963,6 +4077,11 @@ * Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here. */ public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) @@ -692,7 +692,7 @@ { return true; } -@@ -4081,8 +4200,7 @@ +@@ -4083,8 +4202,7 @@ */ public boolean isBlockHighHumidity(int par1, int par2, int par3) { @@ -702,7 +702,7 @@ } /** -@@ -4157,7 +4275,7 @@ +@@ -4159,7 +4277,7 @@ */ public int getHeight() { @@ -711,7 +711,7 @@ } /** -@@ -4165,7 +4283,7 @@ +@@ -4167,7 +4285,7 @@ */ public int getActualHeight() { @@ -720,7 +720,7 @@ } public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart) -@@ -4208,7 +4326,7 @@ +@@ -4210,7 +4328,7 @@ */ public double getHorizon() { @@ -729,7 +729,7 @@ } /** -@@ -4269,4 +4387,75 @@ +@@ -4271,4 +4389,75 @@ @SideOnly(Side.CLIENT) public void func_92088_a(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound) {} diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch index a4fa56fc0..933f45575 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch @@ -37,7 +37,7 @@ private ItemStack pickCheckLootItem(Random par1Random) { - int var2 = par1Random.nextInt(12); -- return var2 == 0 ? new ItemStack(Item.saddle) : (var2 == 1 ? new ItemStack(Item.ingotIron, par1Random.nextInt(4) + 1) : (var2 == 2 ? new ItemStack(Item.bread) : (var2 == 3 ? new ItemStack(Item.wheat, par1Random.nextInt(4) + 1) : (var2 == 4 ? new ItemStack(Item.gunpowder, par1Random.nextInt(4) + 1) : (var2 == 5 ? new ItemStack(Item.silk, par1Random.nextInt(4) + 1) : (var2 == 6 ? new ItemStack(Item.bucketEmpty) : (var2 == 7 && par1Random.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (var2 == 8 && par1Random.nextInt(2) == 0 ? new ItemStack(Item.redstone, par1Random.nextInt(4) + 1) : (var2 == 9 && par1Random.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.itemID + par1Random.nextInt(2)]) : (var2 == 10 ? new ItemStack(Item.dyePowder, 1, 3) : (var2 == 11 ? Item.field_92053_bW.func_92055_a(par1Random) : null))))))))))); +- return var2 == 0 ? new ItemStack(Item.saddle) : (var2 == 1 ? new ItemStack(Item.ingotIron, par1Random.nextInt(4) + 1) : (var2 == 2 ? new ItemStack(Item.bread) : (var2 == 3 ? new ItemStack(Item.wheat, par1Random.nextInt(4) + 1) : (var2 == 4 ? new ItemStack(Item.gunpowder, par1Random.nextInt(4) + 1) : (var2 == 5 ? new ItemStack(Item.silk, par1Random.nextInt(4) + 1) : (var2 == 6 ? new ItemStack(Item.bucketEmpty) : (var2 == 7 && par1Random.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (var2 == 8 && par1Random.nextInt(2) == 0 ? new ItemStack(Item.redstone, par1Random.nextInt(4) + 1) : (var2 == 9 && par1Random.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.itemID + par1Random.nextInt(2)]) : (var2 == 10 ? new ItemStack(Item.dyePowder, 1, 3) : (var2 == 11 ? Item.enchantedBook.func_92109_a(par1Random) : null))))))))))); + return ChestGenHooks.getOneItem(ChestGenHooks.DUNGEON_CHEST, par1Random); } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch index ad62b539f..b91101d60 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch @@ -18,13 +18,13 @@ + if (par2Random.nextInt(100) == 0) { -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, WeightedRandomChestContent.func_92080_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 3 + par2Random.nextInt(4)); + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, info.getItems(par2Random), info.getCount(par2Random)); } if (par2Random.nextInt(100) == 0) { -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, WeightedRandomChestContent.func_92080_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 3 + par2Random.nextInt(4)); + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, info.getItems(par2Random), info.getCount(par2Random)); } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch index 82e6112c4..05a169bf9 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch @@ -21,7 +21,7 @@ { int var11 = Direction.offsetX[var10] * 2; int var12 = Direction.offsetZ[var10] * 2; -- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, WeightedRandomChestContent.func_92029_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5)); +- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, WeightedRandomChestContent.func_92080_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5)); + this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, info.getItems(par2Random), info.getCount(par2Random)); } } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch index a8f4771ce..dd7b736cc 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch @@ -37,7 +37,7 @@ if (!this.field_74947_h) { -- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5)); +- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, WeightedRandomChestContent.func_92080_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5)); + this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, chest.getItems(par2Random), chest.getCount(par2Random)); } @@ -46,7 +46,7 @@ if (!this.field_74948_i) { -- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5)); +- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, WeightedRandomChestContent.func_92080_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5)); + this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, chest.getItems(par2Random), chest.getCount(par2Random)); } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch index 0092768ce..f2c68343e 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch @@ -14,7 +14,7 @@ if (par3StructureBoundingBox.isVecInside(var5, var4, var6)) { this.hasMadeChest = true; -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, WeightedRandomChestContent.func_92029_a(strongholdChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(2)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, WeightedRandomChestContent.func_92080_a(strongholdChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(2)); + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, ChestGenHooks.getItems(STRONGHOLD_CORRIDOR, par2Random), ChestGenHooks.getCount(STRONGHOLD_CORRIDOR, par2Random)); } } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch index f7337c559..961138671 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch @@ -14,7 +14,7 @@ this.placeBlockAtCurrentPosition(par1World, Block.torchWood.blockID, 0, var8, 8, var9 + 1, par3StructureBoundingBox); } -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92080_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92112_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4)); + ChestGenHooks info = ChestGenHooks.getInfo(STRONGHOLD_LIBRARY); + + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(par2Random), info.getCount(par2Random)); @@ -22,7 +22,7 @@ if (this.isLargeRoom) { this.placeBlockAtCurrentPosition(par1World, 0, 0, 12, 9, 1, par3StructureBoundingBox); -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, WeightedRandomChestContent.func_92080_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92112_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4)); + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, info.getItems(par2Random), info.getCount(par2Random)); } diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch index b08fe125a..c1060b6e1 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch @@ -14,7 +14,7 @@ this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 1, 3, par3StructureBoundingBox); this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 2, 3, par3StructureBoundingBox); this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 3, 3, par3StructureBoundingBox); -- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, WeightedRandomChestContent.func_92029_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 1 + par2Random.nextInt(4)); +- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, WeightedRandomChestContent.func_92080_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 1 + par2Random.nextInt(4)); + this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, ChestGenHooks.getItems(STRONGHOLD_CROSSING, par2Random), ChestGenHooks.getCount(STRONGHOLD_CROSSING, par2Random)); }