diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 456b77a160..b8c1a67148 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -72,7 +72,7 @@ if (p_147108_1_ instanceof GuiMainMenu) { this.gameSettings.showDebugInfo = false; -@@ -1337,7 +1351,7 @@ +@@ -1338,7 +1352,7 @@ if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k)) { @@ -81,7 +81,7 @@ this.thePlayer.swingItem(); } } -@@ -1418,11 +1432,12 @@ +@@ -1419,11 +1433,12 @@ int j = this.objectMouseOver.blockY; int k = this.objectMouseOver.blockZ; @@ -91,12 +91,12 @@ int l = itemstack != null ? itemstack.stackSize : 0; - if (this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, i, j, k, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) -+ boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_BLOCK, j, k, l, this.objectMouseOver.sideHit).isCanceled(); -+ if (result && this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, j, k, l, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) ++ boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_BLOCK, i, j, k, this.objectMouseOver.sideHit).isCanceled(); ++ if (result && this.playerController.onPlayerRightClick(this.thePlayer, this.theWorld, itemstack, i, j, k, this.objectMouseOver.sideHit, this.objectMouseOver.hitVec)) { flag = false; this.thePlayer.swingItem(); -@@ -1449,7 +1464,8 @@ +@@ -1450,7 +1465,8 @@ { ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem(); @@ -106,7 +106,7 @@ { this.entityRenderer.itemRenderer.resetEquippedProgress2(); } -@@ -1651,6 +1667,8 @@ +@@ -1652,6 +1668,8 @@ while (Mouse.next()) { @@ -115,7 +115,7 @@ i = Mouse.getEventButton(); if (isRunningOnMac && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157))) -@@ -2120,6 +2138,11 @@ +@@ -2121,6 +2139,11 @@ // JAVADOC METHOD $$ func_71353_a public void loadWorld(WorldClient par1WorldClient, String par2Str) { @@ -127,7 +127,7 @@ if (par1WorldClient == null) { NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); -@@ -2132,6 +2155,18 @@ +@@ -2133,6 +2156,18 @@ if (this.theIntegratedServer != null) { this.theIntegratedServer.initiateShutdown(); @@ -146,7 +146,7 @@ } this.theIntegratedServer = null; -@@ -2286,113 +2321,10 @@ +@@ -2287,113 +2322,10 @@ if (this.objectMouseOver != null) { boolean flag = this.thePlayer.capabilities.isCreativeMode; @@ -262,7 +262,7 @@ if (flag) { j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem; -@@ -2562,9 +2494,16 @@ +@@ -2563,9 +2495,16 @@ par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize())); } @@ -279,7 +279,7 @@ for (int i = 16384; i > 0; i >>= 1) { GL11.glTexImage2D(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)null); -@@ -2572,6 +2511,7 @@ +@@ -2573,6 +2512,7 @@ if (j != 0) { diff --git a/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch b/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch index 1e92aa99fc..85a042c264 100644 --- a/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch @@ -89,7 +89,7 @@ + if (rawBufferSize > 0x20000 && field_147569_p < (rawBufferSize << 3)) + { -+ field_147569_p = 0; ++ rawBufferSize = 0; + rawBuffer = null; + } + diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index 3a86b80378..02bb0781bf 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -145,7 +145,7 @@ public EntityItem func_146097_a(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_) @@ -765,13 +817,25 @@ // JAVADOC METHOD $$ func_71012_a - protected void joinEntityItemWithWorld(EntityItem par1EntityItem) + public void joinEntityItemWithWorld(EntityItem par1EntityItem) { + if (captureDrops) + { diff --git a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch index 85eb899224..2a41779aa7 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch @@ -5,7 +5,7 @@ par7 = 1; } - else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush) -+ else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush && block.isReplaceable(par3World, par4, par5, par6)) ++ else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush && !block.isReplaceable(par3World, par4, par5, par6)) { if (par7 == 0) { @@ -30,7 +30,7 @@ p_150936_5_ = 1; } - else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush) -+ else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush && block.isReplaceable(p_150936_1_, p_150936_2_, p_150936_3_, p_150936_4_)) ++ else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush && !block.isReplaceable(p_150936_1_, p_150936_2_, p_150936_3_, p_150936_4_)) { if (p_150936_5_ == 0) { diff --git a/patches/minecraft/net/minecraft/server/management/ItemInWorldManager.java.patch b/patches/minecraft/net/minecraft/server/management/ItemInWorldManager.java.patch index 67c1e20577..c6302da7de 100644 --- a/patches/minecraft/net/minecraft/server/management/ItemInWorldManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/ItemInWorldManager.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/server/management/ItemInWorldManager.java +++ ../src-work/minecraft/net/minecraft/server/management/ItemInWorldManager.java -@@ -7,12 +7,24 @@ +@@ -7,12 +7,23 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.network.play.server.S23PacketBlockChange; @@ -8,7 +8,6 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraft.world.WorldSettings; - +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.eventhandler.Event; @@ -17,7 +16,7 @@ +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; +import net.minecraftforge.event.world.BlockEvent; -+ + public class ItemInWorldManager { + /** Forge reach distance */ @@ -25,7 +24,7 @@ // JAVADOC FIELD $$ field_73092_a public World theWorld; // JAVADOC FIELD $$ field_73090_b -@@ -133,6 +145,13 @@ +@@ -133,6 +144,13 @@ { if (!this.gameType.isAdventure() || this.thisPlayerMP.isCurrentToolAdventureModeExempt(par1, par2, par3)) { @@ -39,7 +38,7 @@ if (this.isCreative()) { if (!this.theWorld.extinguishFire((EntityPlayer)null, par1, par2, par3, par4)) -@@ -142,19 +161,36 @@ +@@ -142,19 +160,36 @@ } else { @@ -81,7 +80,7 @@ this.tryHarvestBlock(par1, par2, par3); } else -@@ -178,7 +214,7 @@ +@@ -178,7 +213,7 @@ int l = this.curblockDamage - this.initialDamage; Block block = this.theWorld.func_147439_a(par1, par2, par3); @@ -90,7 +89,7 @@ { float f = block.func_149737_a(this.thisPlayerMP, this.thisPlayerMP.worldObj, par1, par2, par3) * (float)(l + 1); -@@ -214,7 +250,7 @@ +@@ -214,7 +249,7 @@ Block block = this.theWorld.func_147439_a(par1, par2, par3); int l = this.theWorld.getBlockMetadata(par1, par2, par3); block.func_149681_a(this.theWorld, par1, par2, par3, l, this.thisPlayerMP); @@ -99,7 +98,7 @@ if (flag) { -@@ -227,29 +263,32 @@ +@@ -227,29 +262,32 @@ // JAVADOC METHOD $$ func_73084_b public boolean tryHarvestBlock(int par1, int par2, int par3) { @@ -139,7 +138,7 @@ if (itemstack != null) { -@@ -261,12 +300,18 @@ +@@ -261,12 +299,18 @@ } } @@ -158,7 +157,7 @@ return flag; } } -@@ -299,6 +344,7 @@ +@@ -299,6 +343,7 @@ if (itemstack1.stackSize == 0) { par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null; @@ -166,7 +165,7 @@ } if (!par1EntityPlayer.isUsingItem()) -@@ -313,27 +359,56 @@ +@@ -313,27 +358,57 @@ // JAVADOC METHOD $$ func_73078_a public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { @@ -187,6 +186,7 @@ + return true; } - else if (this.isCreative()) ++ + Block block = par2World.func_147439_a(par4, par5, par6); + boolean isAir = block.isAir(par2World, par4, par5, par6); + boolean useBlock = !par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null; diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 24d3214773..3bf4dcebe1 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -640,6 +640,15 @@ } } +@@ -3212,7 +3354,7 @@ + { + Block block1 = this.func_147439_a(p_147472_2_, p_147472_3_, p_147472_4_); + AxisAlignedBB axisalignedbb = p_147472_5_ ? null : p_147472_1_.func_149668_a(this, p_147472_2_, p_147472_3_, p_147472_4_); +- return axisalignedbb != null && !this.checkNoEntityCollision(axisalignedbb, p_147472_7_) ? false : (block1.func_149688_o() == Material.field_151594_q && p_147472_1_ == Blocks.anvil ? true : block1.func_149688_o().isReplaceable() && p_147472_1_.func_149705_a(this, p_147472_2_, p_147472_3_, p_147472_4_, p_147472_6_, p_147472_8_)); ++ return axisalignedbb != null && !this.checkNoEntityCollision(axisalignedbb, p_147472_7_) ? false : (block1.func_149688_o() == Material.field_151594_q && p_147472_1_ == Blocks.anvil ? true : block1.isReplaceable(this, p_147472_2_, p_147472_3_, p_147472_4_) && p_147472_1_.func_149705_a(this, p_147472_2_, p_147472_3_, p_147472_4_, p_147472_6_, p_147472_8_)); + } + + public PathEntity getPathEntityToEntity(Entity par1Entity, Entity par2Entity, float par3, boolean par4, boolean par5, boolean par6, boolean par7) @@ -3321,7 +3463,8 @@ // JAVADOC METHOD $$ func_72878_l public int getIndirectPowerLevelTo(int par1, int par2, int par3, int par4) diff --git a/src/main/java/net/minecraftforge/common/ForgeHooks.java b/src/main/java/net/minecraftforge/common/ForgeHooks.java index b809c06a3b..2faf4da372 100644 --- a/src/main/java/net/minecraftforge/common/ForgeHooks.java +++ b/src/main/java/net/minecraftforge/common/ForgeHooks.java @@ -208,9 +208,9 @@ public class ForgeHooks Blocks.iron_block.setHarvestLevel("pickaxe", 1); Blocks.lapis_ore.setHarvestLevel("pickaxe", 1); Blocks.lapis_block.setHarvestLevel("pickaxe", 1); - MinecraftForge.removeBlockEffectiveness(Blocks.redstone_ore, "pickaxe"); - MinecraftForge.removeBlockEffectiveness(Blocks.obsidian, "pickaxe"); - MinecraftForge.removeBlockEffectiveness(Blocks.lit_redstone_ore, "pickaxe"); + //MinecraftForge.removeBlockEffectiveness(Blocks.redstone_ore, "pickaxe"); + //MinecraftForge.removeBlockEffectiveness(Blocks.obsidian, "pickaxe"); + //MinecraftForge.removeBlockEffectiveness(Blocks.lit_redstone_ore, "pickaxe"); } public static int getTotalArmorValue(EntityPlayer player) diff --git a/src/main/java/net/minecraftforge/common/MinecraftForge.java b/src/main/java/net/minecraftforge/common/MinecraftForge.java index 1dd808e1e1..cba8adaea3 100644 --- a/src/main/java/net/minecraftforge/common/MinecraftForge.java +++ b/src/main/java/net/minecraftforge/common/MinecraftForge.java @@ -67,7 +67,6 @@ public class MinecraftForge */ public static void initialize() { - System.out.printf("MinecraftForge v%s Initialized\n", ForgeVersion.getVersion()); FMLLog.info("MinecraftForge v%s Initialized", ForgeVersion.getVersion()); EVENT_BUS.register(INTERNAL_HANDLER); diff --git a/src/main/java/net/minecraftforge/oredict/OreDictionary.java b/src/main/java/net/minecraftforge/oredict/OreDictionary.java index c1d498d1d2..aaf3a4f6f6 100644 --- a/src/main/java/net/minecraftforge/oredict/OreDictionary.java +++ b/src/main/java/net/minecraftforge/oredict/OreDictionary.java @@ -7,8 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.eventhandler.Event; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -184,7 +184,7 @@ public class OreDictionary recipes.addAll(recipesToAdd); if (recipesToRemove.size() > 0) { - System.out.println("Replaced " + recipesToRemove.size() + " ore recipies"); + FMLLog.info("Replaced %d ore recipies", recipesToRemove.size()); } } diff --git a/src/main/resources/forge_at.cfg b/src/main/resources/forge_at.cfg index 0b04e01cec..1f7e29a614 100644 --- a/src/main/resources/forge_at.cfg +++ b/src/main/resources/forge_at.cfg @@ -63,8 +63,6 @@ public net.minecraft.entity.player.EntityPlayer func_71012_a(Lnet/minecraft/enti public net.minecraft.client.entity.EntityClientPlayerMP func_71012_a(Lnet/minecraft/entity/item/EntityItem;)V #joinEntityItemWithWorld #public uf.i()V #MD:EntityPlayer/func_71053_j #closeScreen #public uf.b #FD:EntityPlayer/field_71076_b #sleepTimer -# EntityPlayerMP -public net.minecraft.client.entity.EntityClientPlayerMP (Lnet/minecraft/entity/item/EntityItem;)V func_71012_a #joinEntityItemWithWorld # World Gen Chests Related public net.minecraft.util.WeightedRandomChestContent * public net.minecraft.world.WorldServer field_73069_S