Fixed crash on right clicking on slabs with nothing in your hand
This commit is contained in:
parent
9b2eb5f2c5
commit
63f4f7abf6
|
@ -86,6 +86,8 @@ public class BlockAcaciaSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -124,6 +126,8 @@ public class BlockAcaciaSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockCherrySlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,6 +124,8 @@ public class BlockCherrySlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockDarkSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,7 +124,8 @@ public class BlockDarkSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
*/
|
||||
|
|
|
@ -86,6 +86,8 @@ public class BlockFirSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -124,6 +126,8 @@ public class BlockFirSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockHolySlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,6 +124,8 @@ public class BlockHolySlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,6 +83,8 @@ public class BlockMagicSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -121,6 +123,8 @@ public class BlockMagicSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockMangroveSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,6 +124,8 @@ public class BlockMangroveSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,6 +83,8 @@ public class BlockMudBrickSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -121,6 +123,8 @@ public class BlockMudBrickSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockPalmSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,6 +124,8 @@ public class BlockPalmSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,6 +83,8 @@ public class BlockRedRockBrickSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -121,6 +123,8 @@ public class BlockRedRockBrickSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,6 +83,8 @@ public class BlockRedRockCobbleSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -121,6 +123,8 @@ public class BlockRedRockCobbleSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,6 +84,8 @@ public class BlockRedwoodSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -122,6 +124,8 @@ public class BlockRedwoodSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -85,6 +85,8 @@ public class BlockWillowSlab extends BlockHalfSlab
|
|||
* Called upon block activation (right click on the block.)
|
||||
*/
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem().itemID == this.blockID)
|
||||
{
|
||||
|
@ -123,6 +125,8 @@ public class BlockWillowSlab extends BlockHalfSlab
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
Loading…
Reference in New Issue