use of net.mcft.copy.betterstorage.attachment.Attachments in project BetterStorage by copygirl.
the class TileLockableDoor method onBlockClicked.
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
if (world.getBlockMetadata(x, y, z) > 0)
y -= 1;
Attachments attachments = WorldUtils.get(world, x, y, z, IHasAttachments.class).getAttachments();
boolean abort = attachments.interact(WorldUtils.rayTrace(player, 1.0F), player, EnumAttachmentInteraction.attack);
}
use of net.mcft.copy.betterstorage.attachment.Attachments in project BetterStorage by copygirl.
the class ClientProxy method getAttachmentPointsHighlightBox.
private AxisAlignedBB getAttachmentPointsHighlightBox(EntityPlayer player, TileEntity tileEntity, MovingObjectPosition target) {
Attachments attachments = ((IHasAttachments) tileEntity).getAttachments();
Attachment attachment = attachments.get(target.subHit);
if (attachment == null)
return null;
return attachment.getHighlightBox();
}
use of net.mcft.copy.betterstorage.attachment.Attachments in project BetterStorage by copygirl.
the class TileLockable method onBlockClicked.
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
// TODO: See if we can make a pull request to Forge to get PlayerInteractEvent to fire for left click on client.
Attachments attachments = WorldUtils.get(world, x, y, z, IHasAttachments.class).getAttachments();
boolean abort = attachments.interact(WorldUtils.rayTrace(player, 1.0F), player, EnumAttachmentInteraction.attack);
// TODO: Abort block breaking? playerController.resetBlockBreaking doesn't seem to do the job.
}
Aggregations