Fixeed a missed -1 in SpawnerAnimals patch. Thanks Blood.

This commit is contained in:
Lex Manos 2014-02-12 23:06:11 -08:00
parent b43d63a7ad
commit 3322996885
2 changed files with 12 additions and 14 deletions

View File

@ -72,7 +72,7 @@
if (p_147108_1_ instanceof GuiMainMenu) if (p_147108_1_ instanceof GuiMainMenu)
{ {
this.gameSettings.showDebugInfo = false; this.gameSettings.showDebugInfo = false;
@@ -1339,7 +1353,7 @@ @@ -1338,7 +1352,7 @@
if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k)) if (this.thePlayer.isCurrentToolAdventureModeExempt(i, j, k))
{ {
@ -81,7 +81,7 @@
this.thePlayer.swingItem(); this.thePlayer.swingItem();
} }
} }
@@ -1420,11 +1434,12 @@ @@ -1419,11 +1433,12 @@
int j = this.objectMouseOver.blockY; int j = this.objectMouseOver.blockY;
int k = this.objectMouseOver.blockZ; int k = this.objectMouseOver.blockZ;
@ -96,7 +96,7 @@
{ {
flag = false; flag = false;
this.thePlayer.swingItem(); this.thePlayer.swingItem();
@@ -1451,7 +1466,8 @@ @@ -1450,7 +1465,8 @@
{ {
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem(); ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
@ -106,7 +106,7 @@
{ {
this.entityRenderer.itemRenderer.resetEquippedProgress2(); this.entityRenderer.itemRenderer.resetEquippedProgress2();
} }
@@ -1653,6 +1669,8 @@ @@ -1652,6 +1668,8 @@
while (Mouse.next()) while (Mouse.next())
{ {
@ -115,7 +115,7 @@
i = Mouse.getEventButton(); i = Mouse.getEventButton();
if (isRunningOnMac && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157))) if (isRunningOnMac && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
@@ -2123,6 +2141,11 @@ @@ -2122,6 +2140,11 @@
// JAVADOC METHOD $$ func_71353_a // JAVADOC METHOD $$ func_71353_a
public void loadWorld(WorldClient par1WorldClient, String par2Str) public void loadWorld(WorldClient par1WorldClient, String par2Str)
{ {
@ -127,7 +127,7 @@
if (par1WorldClient == null) if (par1WorldClient == null)
{ {
NetHandlerPlayClient nethandlerplayclient = this.getNetHandler(); NetHandlerPlayClient nethandlerplayclient = this.getNetHandler();
@@ -2135,6 +2158,18 @@ @@ -2134,6 +2157,18 @@
if (this.theIntegratedServer != null) if (this.theIntegratedServer != null)
{ {
this.theIntegratedServer.initiateShutdown(); this.theIntegratedServer.initiateShutdown();
@ -146,7 +146,7 @@
} }
this.theIntegratedServer = null; this.theIntegratedServer = null;
@@ -2290,113 +2325,10 @@ @@ -2289,113 +2324,10 @@
if (this.objectMouseOver != null) if (this.objectMouseOver != null)
{ {
boolean flag = this.thePlayer.capabilities.isCreativeMode; boolean flag = this.thePlayer.capabilities.isCreativeMode;
@ -262,7 +262,7 @@
if (flag) if (flag)
{ {
j = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem; 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())); par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
} }
@ -279,7 +279,7 @@
for (int i = 16384; i > 0; i >>= 1) 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); 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) if (j != 0)
{ {

View File

@ -32,13 +32,11 @@
label110: label110:
while (iterator.hasNext()) 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); entityliving.setLocationAndAngles((double)f, (double)f1, (double)f2, par1WorldServer.rand.nextFloat() * 360.0F, 0.0F);
-
- if (entityliving.getCanSpawnHere()) - if (entityliving.getCanSpawnHere())
+
+ Result canSpawn = ForgeEventFactory.canEntitySpawn(entityliving, par1WorldServer, f, f1, f2); + Result canSpawn = ForgeEventFactory.canEntitySpawn(entityliving, par1WorldServer, f, f1, f2);
+ if (canSpawn == Result.ALLOW || (canSpawn == Result.DEFAULT && entityliving.getCanSpawnHere())) + if (canSpawn == Result.ALLOW || (canSpawn == Result.DEFAULT && entityliving.getCanSpawnHere()))
{ {
@ -60,7 +58,7 @@
{ {
Block block = par1World.getBlock(par2, par3 - 1, par4); 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(); - 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(); + 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();
} }
} }