removed shift-clicking from the staves that place blocks or effect blocks. works perfect without it.
This commit is contained in:
parent
7bd52ee29c
commit
62e439d66e
4 changed files with 195 additions and 210 deletions
|
|
@ -56,57 +56,53 @@ public class ItemStaffFire extends Item {
|
|||
}
|
||||
|
||||
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10){
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
|
||||
{
|
||||
if (par7 == 0)
|
||||
{
|
||||
--par5;
|
||||
}
|
||||
if (par7 == 0)
|
||||
{
|
||||
--par5;
|
||||
}
|
||||
|
||||
if (par7 == 1)
|
||||
{
|
||||
++par5;
|
||||
}
|
||||
if (par7 == 1)
|
||||
{
|
||||
++par5;
|
||||
}
|
||||
|
||||
if (par7 == 2)
|
||||
{
|
||||
--par6;
|
||||
}
|
||||
if (par7 == 2)
|
||||
{
|
||||
--par6;
|
||||
}
|
||||
|
||||
if (par7 == 3)
|
||||
{
|
||||
++par6;
|
||||
}
|
||||
if (par7 == 3)
|
||||
{
|
||||
++par6;
|
||||
}
|
||||
|
||||
if (par7 == 4)
|
||||
{
|
||||
--par4;
|
||||
}
|
||||
if (par7 == 4)
|
||||
{
|
||||
--par4;
|
||||
}
|
||||
|
||||
if (par7 == 5)
|
||||
{
|
||||
++par4;
|
||||
}
|
||||
if (par7 == 5)
|
||||
{
|
||||
++par4;
|
||||
}
|
||||
|
||||
if (!entityPlayer.canPlayerEdit(par4, par5, par6, par7, itemStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i1 = world.getBlockId(par4, par5, par6);
|
||||
if (!entityPlayer.canPlayerEdit(par4, par5, par6, par7, itemStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i1 = world.getBlockId(par4, par5, par6);
|
||||
|
||||
if (i1 == 0)
|
||||
{
|
||||
world.playSoundEffect((double)par4 + 0.5D, (double)par5 + 0.5D, (double)par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(par4, par5, par6, Block.fire.blockID);
|
||||
}
|
||||
if (i1 == 0)
|
||||
{
|
||||
world.playSoundEffect((double)par4 + 0.5D, (double)par5 + 0.5D, (double)par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(par4, par5, par6, Block.fire.blockID);
|
||||
}
|
||||
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
|
||||
|
|
|
|||
Loading…
Reference in a new issue