Changed previous fix by Adubbz for slabs.
Now it's done using ItemBlocks.
This commit is contained in:
parent
63f4f7abf6
commit
d54ad4acd6
15 changed files with 630 additions and 585 deletions
|
@ -85,49 +85,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.acaciaDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.acaciaDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.acaciaDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.acaciaDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.cherryDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.cherryDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.cherryDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.cherryDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.darkDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.darkDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.darkDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.darkDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
*/
|
||||
|
|
|
@ -85,49 +85,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.firDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.firDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.firDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.firDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.holyDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.holyDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.holyDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.holyDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -82,49 +82,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.magicDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.magicDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.magicDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.magicDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.mangroveDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.mangroveDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.mangroveDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.mangroveDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -82,49 +82,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.mudBrickDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.mudBrickDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.mudBrickDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.mudBrickDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.palmDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.palmDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.palmDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.palmDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -82,49 +82,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redRockBrickDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redRockBrickDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redRockBrickDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redRockBrickDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -82,49 +82,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redRockCobbleDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redRockCobbleDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redRockCobbleDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redRockCobbleDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -83,49 +83,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redwoodDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.redwoodDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redwoodDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.redwoodDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -84,49 +84,49 @@ 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)
|
||||
{
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
{
|
||||
if (par6 == 1 /*1 = top of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.willowDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
{
|
||||
if (par6 == 0 /*0 = bottom of the block*/)
|
||||
{
|
||||
if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
--par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
|
||||
world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
world.setBlock(par2, par3, par4, BOPBlocks.willowDoubleSlab.blockID);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
// {
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 0 /*0 = Slab at bottom half*/ )
|
||||
// {
|
||||
// if (par6 == 1 /*1 = top of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.willowDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (world.getBlockMetadata(par2, par3, par4) == 8 /*8 = Slab at top half*/ )
|
||||
// {
|
||||
// if (par6 == 0 /*0 = bottom of the block*/)
|
||||
// {
|
||||
// if (!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
// {
|
||||
// --par5EntityPlayer.getCurrentEquippedItem().stackSize;
|
||||
// }
|
||||
//
|
||||
// world.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), this.stepSound.getPlaceSound(), (this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
|
||||
// world.setBlock(par2, par3, par4, BOPBlocks.willowDoubleSlab.blockID);
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the slab block name with step type.
|
||||
|
|
|
@ -3,10 +3,12 @@ package tdwp_ftw.biomesop.declarations;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import tdwp_ftw.biomesop.blocks.*;
|
||||
import tdwp_ftw.biomesop.items.ItemBOPSlab;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
|
@ -395,8 +397,9 @@ public class BOPBlocks {
|
|||
GameRegistry.registerBlock(bamboo, "bamboo");
|
||||
GameRegistry.registerBlock(bambooLeaves, "bambooLeaves");
|
||||
GameRegistry.registerBlock(mudBrickBlock, "mudBrickBlock");
|
||||
GameRegistry.registerBlock(mudBrickDoubleSlab, "mudBrickDoubleSlab");
|
||||
GameRegistry.registerBlock(mudBrickSingleSlab, "mudBrickSingleSlab");
|
||||
ItemBOPSlab.setSlabs(mudBrickSingleSlab, mudBrickDoubleSlab);
|
||||
GameRegistry.registerBlock(mudBrickDoubleSlab, ItemBOPSlab.class, "mudBrickDoubleSlab");
|
||||
GameRegistry.registerBlock(mudBrickSingleSlab, ItemBOPSlab.class, "mudBrickSingleSlab");
|
||||
GameRegistry.registerBlock(mudBrickStairs, "mudBrickStairs");
|
||||
GameRegistry.registerBlock(originGrass, "originGrass");
|
||||
GameRegistry.registerBlock(originLeaves, "originLeaves");
|
||||
|
@ -425,12 +428,14 @@ public class BOPBlocks {
|
|||
GameRegistry.registerBlock(magicSapling, "magicSapling");
|
||||
GameRegistry.registerBlock(deathbloom, "deathbloom");
|
||||
GameRegistry.registerBlock(redRockCobble, "redRockCobble");
|
||||
GameRegistry.registerBlock(redRockCobbleDoubleSlab, "redRockCobbleDoubleSlab");
|
||||
GameRegistry.registerBlock(redRockCobbleSingleSlab, "redRockCobbleSingleSlab");
|
||||
ItemBOPSlab.setSlabs(redRockCobbleSingleSlab, redRockCobbleDoubleSlab);
|
||||
GameRegistry.registerBlock(redRockCobbleDoubleSlab, ItemBOPSlab.class, "redRockCobbleDoubleSlab");
|
||||
GameRegistry.registerBlock(redRockCobbleSingleSlab, ItemBOPSlab.class, "redRockCobbleSingleSlab");
|
||||
GameRegistry.registerBlock(redRockCobbleStairs, "redRockCobbleStairs");
|
||||
GameRegistry.registerBlock(redRockBrick, "redRockBrick");
|
||||
GameRegistry.registerBlock(redRockBrickDoubleSlab, "redRockBrickDoubleSlab");
|
||||
GameRegistry.registerBlock(redRockBrickSingleSlab, "redRockBrickSingleSlab");
|
||||
ItemBOPSlab.setSlabs(redRockBrickSingleSlab, redRockBrickDoubleSlab);
|
||||
GameRegistry.registerBlock(redRockBrickDoubleSlab, ItemBOPSlab.class, "redRockBrickDoubleSlab");
|
||||
GameRegistry.registerBlock(redRockBrickSingleSlab, ItemBOPSlab.class, "redRockBrickSingleSlab");
|
||||
GameRegistry.registerBlock(redRockBrickStairs, "redRockBrickStairs");
|
||||
GameRegistry.registerBlock(hydrangea, "hydrangea");
|
||||
GameRegistry.registerBlock(violet, "violet");
|
||||
|
@ -458,69 +463,79 @@ public class BOPBlocks {
|
|||
GameRegistry.registerBlock(redwoodPlank, "redwoodPlank");
|
||||
GameRegistry.registerBlock(redwoodWood, "redwoodWood");
|
||||
GameRegistry.registerBlock(redwoodLeaves, "redwoodLeaves");
|
||||
GameRegistry.registerBlock(redwoodDoubleSlab, "redwoodDoubleSlab");
|
||||
GameRegistry.registerBlock(redwoodSingleSlab, "redwoodSingleSlab");
|
||||
ItemBOPSlab.setSlabs(redwoodSingleSlab, redwoodDoubleSlab);
|
||||
GameRegistry.registerBlock(redwoodDoubleSlab, ItemBOPSlab.class, "redwoodDoubleSlab");
|
||||
GameRegistry.registerBlock(redwoodSingleSlab, ItemBOPSlab.class, "redwoodSingleSlab");
|
||||
GameRegistry.registerBlock(redwoodStairs, "redwoodStairs");
|
||||
|
||||
GameRegistry.registerBlock(willowPlank, "willowPlank");
|
||||
GameRegistry.registerBlock(willowWood, "willowWood");
|
||||
GameRegistry.registerBlock(willowLeaves, "willowLeaves");
|
||||
GameRegistry.registerBlock(willowDoubleSlab, "willowDoubleSlab");
|
||||
GameRegistry.registerBlock(willowSingleSlab, "willowSingleSlab");
|
||||
ItemBOPSlab.setSlabs(willowSingleSlab, willowDoubleSlab);
|
||||
GameRegistry.registerBlock(willowDoubleSlab, ItemBOPSlab.class, "willowDoubleSlab");
|
||||
GameRegistry.registerBlock(willowSingleSlab, ItemBOPSlab.class, "willowSingleSlab");
|
||||
GameRegistry.registerBlock(willowStairs, "willowStairs");
|
||||
|
||||
GameRegistry.registerBlock(firPlank, "firPlank");
|
||||
GameRegistry.registerBlock(firWood, "firWood");
|
||||
GameRegistry.registerBlock(firLeaves, "firLeaves");
|
||||
GameRegistry.registerBlock(firDoubleSlab, "firDoubleSlab");
|
||||
GameRegistry.registerBlock(firSingleSlab, "firSingleSlab");
|
||||
ItemBOPSlab.setSlabs(firSingleSlab, firDoubleSlab);
|
||||
GameRegistry.registerBlock(firDoubleSlab, ItemBOPSlab.class, "firDoubleSlab");
|
||||
GameRegistry.registerBlock(firSingleSlab, ItemBOPSlab.class, "firSingleSlab");
|
||||
GameRegistry.registerBlock(firStairs, "firStairs");
|
||||
|
||||
GameRegistry.registerBlock(acaciaPlank, "acaciaPlank");
|
||||
GameRegistry.registerBlock(acaciaWood, "acaciaWood");
|
||||
GameRegistry.registerBlock(acaciaLeaves, "acaciaLeaves");
|
||||
GameRegistry.registerBlock(acaciaDoubleSlab, "acaciaDoubleSlab");
|
||||
GameRegistry.registerBlock(acaciaSingleSlab, "acaciaSingleSlab");
|
||||
ItemBOPSlab.setSlabs(acaciaSingleSlab, acaciaDoubleSlab);
|
||||
GameRegistry.registerBlock(acaciaDoubleSlab, ItemBOPSlab.class, "acaciaDoubleSlab");
|
||||
GameRegistry.registerBlock(acaciaSingleSlab, ItemBOPSlab.class, "acaciaSingleSlab");
|
||||
GameRegistry.registerBlock(acaciaStairs, "acaciaStairs");
|
||||
|
||||
GameRegistry.registerBlock(cherryPlank, "cherryPlank");
|
||||
GameRegistry.registerBlock(cherryWood, "cherryWood");
|
||||
GameRegistry.registerBlock(cherryDoubleSlab, "cherryDoubleSlab");
|
||||
GameRegistry.registerBlock(cherrySingleSlab, "cherrySingleSlab");
|
||||
ItemBOPSlab.setSlabs(cherrySingleSlab, cherryDoubleSlab);
|
||||
GameRegistry.registerBlock(cherryDoubleSlab, ItemBOPSlab.class, "cherryDoubleSlab");
|
||||
GameRegistry.registerBlock(cherrySingleSlab, ItemBOPSlab.class, "cherrySingleSlab");
|
||||
GameRegistry.registerBlock(cherryStairs, "cherryStairs");
|
||||
|
||||
GameRegistry.registerBlock(darkPlank, "darkPlank");
|
||||
GameRegistry.registerBlock(darkWood, "darkWood");
|
||||
GameRegistry.registerBlock(darkLeaves, "darkLeaves");
|
||||
GameRegistry.registerBlock(darkDoubleSlab, "darkDoubleSlab");
|
||||
GameRegistry.registerBlock(darkSingleSlab, "darkSingleSlab");
|
||||
ItemBOPSlab.setSlabs(darkSingleSlab, darkDoubleSlab);
|
||||
GameRegistry.registerBlock(darkDoubleSlab, ItemBOPSlab.class, "darkDoubleSlab");
|
||||
GameRegistry.registerBlock(darkSingleSlab, ItemBOPSlab.class, "darkSingleSlab");
|
||||
GameRegistry.registerBlock(darkStairs, "darkStairs");
|
||||
|
||||
GameRegistry.registerBlock(magicPlank, "magicPlank");
|
||||
GameRegistry.registerBlock(magicWood, "magicWood");
|
||||
GameRegistry.registerBlock(magicDoubleSlab, "magicDoubleSlab");
|
||||
GameRegistry.registerBlock(magicSingleSlab, "magicSingleSlab");
|
||||
ItemBOPSlab.setSlabs(magicSingleSlab, magicDoubleSlab);
|
||||
GameRegistry.registerBlock(magicDoubleSlab, ItemBOPSlab.class, "magicDoubleSlab");
|
||||
GameRegistry.registerBlock(magicSingleSlab, ItemBOPSlab.class, "magicSingleSlab");
|
||||
GameRegistry.registerBlock(magicStairs, "magicStairs");
|
||||
|
||||
GameRegistry.registerBlock(palmPlank, "palmPlank");
|
||||
GameRegistry.registerBlock(palmWood, "palmWood");
|
||||
GameRegistry.registerBlock(palmLeaves, "palmLeaves");
|
||||
GameRegistry.registerBlock(palmDoubleSlab, "palmDoubleSlab");
|
||||
GameRegistry.registerBlock(palmSingleSlab, "palmSingleSlab");
|
||||
ItemBOPSlab.setSlabs(palmSingleSlab, palmDoubleSlab);
|
||||
GameRegistry.registerBlock(palmDoubleSlab, ItemBOPSlab.class, "palmDoubleSlab");
|
||||
GameRegistry.registerBlock(palmSingleSlab, ItemBOPSlab.class, "palmSingleSlab");
|
||||
GameRegistry.registerBlock(palmStairs, "palmStairs");
|
||||
|
||||
GameRegistry.registerBlock(mangrovePlank, "mangrovePlank");
|
||||
GameRegistry.registerBlock(mangroveWood, "mangroveWood");
|
||||
GameRegistry.registerBlock(mangroveLeaves, "mangroveLeaves");
|
||||
GameRegistry.registerBlock(mangroveDoubleSlab, "mangroveDoubleSlab");
|
||||
GameRegistry.registerBlock(mangroveSingleSlab, "mangroveSingleSlab");
|
||||
ItemBOPSlab.setSlabs(mangroveSingleSlab, mangroveDoubleSlab);
|
||||
GameRegistry.registerBlock(mangroveDoubleSlab, ItemBOPSlab.class, "mangroveDoubleSlab");
|
||||
GameRegistry.registerBlock(mangroveSingleSlab, ItemBOPSlab.class, "mangroveSingleSlab");
|
||||
GameRegistry.registerBlock(mangroveStairs, "mangroveStairs");
|
||||
|
||||
GameRegistry.registerBlock(holyPlank, "holyPlank");
|
||||
GameRegistry.registerBlock(holyWood, "holyWood");
|
||||
GameRegistry.registerBlock(holyLeaves, "holyLeaves");
|
||||
GameRegistry.registerBlock(holyDoubleSlab, "holyDoubleSlab");
|
||||
GameRegistry.registerBlock(holySingleSlab, "holySingleSlab");
|
||||
ItemBOPSlab.setSlabs(holySingleSlab, holyDoubleSlab);
|
||||
GameRegistry.registerBlock(holyDoubleSlab, ItemBOPSlab.class, "holyDoubleSlab");
|
||||
GameRegistry.registerBlock(holySingleSlab, ItemBOPSlab.class, "holySingleSlab");
|
||||
GameRegistry.registerBlock(holyStairs, "holyStairs");
|
||||
|
||||
// Add crafting recipes.
|
||||
|
@ -723,6 +738,8 @@ public class BOPBlocks {
|
|||
MinecraftForge.setBlockHarvestLevel(amethystOre, "pickaxe", 3);
|
||||
MinecraftForge.setBlockHarvestLevel(amethystBlock, "pickaxe", 3);
|
||||
|
||||
MinecraftForge.setBlockHarvestLevel(acaciaLeaves, "shears", 0);
|
||||
|
||||
// Add block names
|
||||
LanguageRegistry.addName(mud, "Mud");
|
||||
LanguageRegistry.addName(driedDirt, "Dried Dirt");
|
||||
|
|
28
src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSlab.java
Normal file
28
src/minecraft/tdwp_ftw/biomesop/items/ItemBOPSlab.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package tdwp_ftw.biomesop.items;
|
||||
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class ItemBOPSlab extends ItemSlab
|
||||
{
|
||||
private static Optional<BlockHalfSlab> singleSlab = Optional.absent();
|
||||
private static Optional<BlockHalfSlab> doubleSlab = Optional.absent();
|
||||
|
||||
static public void setSlabs(BlockHalfSlab singleSlab, BlockHalfSlab doubleSlab)
|
||||
{
|
||||
ItemBOPSlab.singleSlab = Optional.of(singleSlab);
|
||||
ItemBOPSlab.doubleSlab = Optional.of(doubleSlab);
|
||||
}
|
||||
|
||||
public ItemBOPSlab(int id) {
|
||||
super(id, singleSlab.get(), doubleSlab.get(), id == doubleSlab.get().blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
return itemStack.getItem().getUnlocalizedName();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue