Fixed tools not working due to a change in the onItemUse method fields in ItemStack.java
I will have to fix the dispenser logic. Manually right clicking works.
This commit is contained in:
@@ -47,7 +47,8 @@ public final class DispenserBlockTool extends BehaviorDefaultDispenseItem
|
|||||||
final World w = dispenser.getWorld();
|
final World w = dispenser.getWorld();
|
||||||
if( w instanceof WorldServer )
|
if( w instanceof WorldServer )
|
||||||
{
|
{
|
||||||
tm.onItemUse( dispensedItem, Platform.getPlayer( (WorldServer) w ), w, dispenser.getBlockPos().offset( enumfacing ), EnumHand.MAIN_HAND, enumfacing, 0.5f, 0.5f, 0.5f );
|
// TODO : Fix dispenser logic.
|
||||||
|
tm.onItemUse( Platform.getPlayer( (WorldServer) w ), w, dispenser.getBlockPos().offset( enumfacing ), EnumHand.MAIN_HAND, enumfacing, 0.5f, 0.5f, 0.5f );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dispensedItem;
|
return dispensedItem;
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ import net.minecraft.world.World;
|
|||||||
public interface IBlockTool
|
public interface IBlockTool
|
||||||
{
|
{
|
||||||
|
|
||||||
EnumActionResult onItemUse( ItemStack is, EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ );
|
EnumActionResult onItemUse( EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,8 +103,9 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumActionResult onItemUse( ItemStack is, EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
public EnumActionResult onItemUse( EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
|
final ItemStack is = p.getHeldItem(hand);
|
||||||
final Block blk = w.getBlockState( pos ).getBlock();
|
final Block blk = w.getBlockState( pos ).getBlock();
|
||||||
|
|
||||||
ItemStack paintBall = this.getColor( is );
|
ItemStack paintBall = this.getColor( is );
|
||||||
|
|||||||
@@ -236,8 +236,9 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumActionResult onItemUse( ItemStack item, EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
public EnumActionResult onItemUse( EntityPlayer p, World w, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
|
final ItemStack item = p.getHeldItem(hand);
|
||||||
if( this.getAECurrentPower( item ) > 1600 )
|
if( this.getAECurrentPower( item ) > 1600 )
|
||||||
{
|
{
|
||||||
if( !p.canPlayerEdit( pos, side, item ) )
|
if( !p.canPlayerEdit( pos, side, item ) )
|
||||||
|
|||||||
Reference in New Issue
Block a user