Couple of things I missed client side

This commit is contained in:
LexManos 2012-03-04 20:43:30 -08:00
parent 5257986d76
commit 9d626d9e5e
3 changed files with 17 additions and 4 deletions

View file

@ -96,7 +96,20 @@
if (par1Entity.func_48080_j()) if (par1Entity.func_48080_j())
{ {
int var2 = this.inventory.getDamageVsEntity(par1Entity); int var2 = this.inventory.getDamageVsEntity(par1Entity);
@@ -1674,6 +1706,7 @@ @@ -1192,6 +1224,12 @@
*/
public EnumStatus sleepInBedAt(int par1, int par2, int par3)
{
+ EnumStatus customSleep = ForgeHooks.sleepInBedAt(this, par1, par2, par3);
+ if (customSleep != null)
+ {
+ return customSleep;
+ }
+
if (!this.worldObj.isRemote)
{
if (this.isPlayerSleeping() || !this.isEntityAlive())
@@ -1674,6 +1712,7 @@
return 101; return 101;
} }
} }
@ -104,7 +117,7 @@
} }
return var3; return var3;
@@ -1841,4 +1874,30 @@ @@ -1841,4 +1880,30 @@
{ {
return !this.capabilities.isFlying; return !this.capabilities.isFlying;
} }

View file

@ -14,7 +14,7 @@
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving) public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{ {
- if (par2 != Block.leaves.blockID && par2 != Block.web.blockID && par2 != Block.tallGrass.blockID && par2 != Block.vine.blockID) - if (par2 != Block.leaves.blockID && par2 != Block.web.blockID && par2 != Block.tallGrass.blockID && par2 != Block.vine.blockID)
+ if (par2 != Block.leaves.blockID && par2 != Block.web.blockID && par2 != Block.tallGrass.blockID && par2 != Block.vine.blockID && Block.blocksList[par2] instanceof IShearable) + if (par2 != Block.leaves.blockID && par2 != Block.web.blockID && par2 != Block.tallGrass.blockID && par2 != Block.vine.blockID && !(Block.blocksList[par2] instanceof IShearable))
{ {
return super.onBlockDestroyed(par1ItemStack, par2, par3, par4, par5, par6EntityLiving); return super.onBlockDestroyed(par1ItemStack, par2, par3, par4, par5, par6EntityLiving);
} }

View file

@ -6,7 +6,7 @@
int var5 = par1World.getBlockId(par2, par3 - 1, par4); int var5 = par1World.getBlockId(par2, par3 - 1, par4);
- return Block.func_48206_g(var5) && var5 != Block.bedrock.blockID && !par1World.isBlockNormalCube(par2, par3, par4) && !par1World.getBlockMaterial(par2, par3, par4).isLiquid() && !par1World.isBlockNormalCube(par2, par3 + 1, par4); - return Block.func_48206_g(var5) && var5 != Block.bedrock.blockID && !par1World.isBlockNormalCube(par2, par3, par4) && !par1World.getBlockMaterial(par2, par3, par4).isLiquid() && !par1World.isBlockNormalCube(par2, par3 + 1, par4);
+ //Fix for 1.2.3 change.. Why guys.. why? + //Fix for 1.2.3 change.. Why guys.. why?
+ return par1World.isBlockNormalCube(par2, par3, par4) && var5 != Block.bedrock.blockID && !par1World.isBlockNormalCube(par2, par3, par4) && !par1World.getBlockMaterial(par2, par3, par4).isLiquid() && !par1World.isBlockNormalCube(par2, par3 + 1, par4); + return par1World.isBlockSolidOnSide(par2, par3 - 1, par4, 1) && var5 != Block.bedrock.blockID && !par1World.isBlockNormalCube(par2, par3, par4) && !par1World.getBlockMaterial(par2, par3, par4).isLiquid() && !par1World.isBlockNormalCube(par2, par3 + 1, par4);
} }
} }