From 3322996885c0617c5230d24460f32a494e1f9616 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Wed, 12 Feb 2014 23:06:11 -0800 Subject: [PATCH] Fixeed a missed -1 in SpawnerAnimals patch. Thanks Blood. --- .../net/minecraft/client/Minecraft.java.patch | 18 +++++++++--------- .../minecraft/world/SpawnerAnimals.java.patch | 8 +++----- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 9e2a377a9..2f09a324f 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; -@@ -1339,7 +1353,7 @@ +@@ -1338,7 +1352,7 @@ if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k)) { @@ -81,7 +81,7 @@ this.thePlayer.swingItem(); } } -@@ -1420,11 +1434,12 @@ +@@ -1419,11 +1433,12 @@ int j = this.objectMouseOver.blockY; int k = this.objectMouseOver.blockZ; @@ -96,7 +96,7 @@ { flag = false; this.thePlayer.swingItem(); -@@ -1451,7 +1466,8 @@ +@@ -1450,7 +1465,8 @@ { ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem(); @@ -106,7 +106,7 @@ { this.entityRenderer.itemRenderer.resetEquippedProgress2(); } -@@ -1653,6 +1669,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))) -@@ -2123,6 +2141,11 @@ +@@ -2122,6 +2140,11 @@ // JAVADOC METHOD $$ func_71353_a public void loadWorld(WorldClient par1WorldClient, String par2Str) { @@ -127,7 +127,7 @@ if (par1WorldClient == null) { NetHandlerPlayClient nethandlerplayclient = this.getNetHandler(); -@@ -2135,6 +2158,18 @@ +@@ -2134,6 +2157,18 @@ if (this.theIntegratedServer != null) { this.theIntegratedServer.initiateShutdown(); @@ -146,7 +146,7 @@ } this.theIntegratedServer = null; -@@ -2290,113 +2325,10 @@ +@@ -2289,113 +2324,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; -@@ -2566,9 +2498,16 @@ +@@ -2565,9 +2497,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); -@@ -2576,6 +2515,7 @@ +@@ -2575,6 +2514,7 @@ if (j != 0) { diff --git a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch index 11beb03df..c478c7ff2 100644 --- a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch +++ b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch @@ -32,13 +32,11 @@ label110: while (iterator.hasNext()) -@@ -159,14 +167,18 @@ - } +@@ -160,13 +168,17 @@ entityliving.setLocationAndAngles((double)f, (double)f1, (double)f2, par1WorldServer.rand.nextFloat() * 360.0F, 0.0F); -- + - if (entityliving.getCanSpawnHere()) -+ + Result canSpawn = ForgeEventFactory.canEntitySpawn(entityliving, par1WorldServer, f, f1, f2); + if (canSpawn == Result.ALLOW || (canSpawn == Result.DEFAULT && entityliving.getCanSpawnHere())) { @@ -60,7 +58,7 @@ { Block block = par1World.getBlock(par2, par3 - 1, par4); - return block != Blocks.bedrock && !par1World.getBlock(par2, par3, par4).isNormalCube() && !par1World.getBlock(par2, par3, par4).getMaterial().isLiquid() && !par1World.getBlock(par2, par3 + 1, par4).isNormalCube(); -+ boolean spawnBlock = block.canCreatureSpawn(par0EnumCreatureType, par1World, par2, par3, par4); ++ boolean spawnBlock = block.canCreatureSpawn(par0EnumCreatureType, par1World, par2, par3 - 1, par4); + return spawnBlock && block != Blocks.bedrock && !par1World.getBlock(par2, par3, par4).isNormalCube() && !par1World.getBlock(par2, par3, par4).getMaterial().isLiquid() && !par1World.getBlock(par2, par3 + 1, par4).isNormalCube(); } }