use of net.minecraft.block.LecternBlock in project AstralSorcery by HellFirePvP.
the class ItemTome method onItemUse.
@Override
public ActionResultType onItemUse(ItemUseContext context) {
World world = context.getWorld();
BlockState blockstate = world.getBlockState(context.getPos());
if (blockstate.getBlock() instanceof LecternBlock) {
return LecternBlock.tryPlaceBook(world, context.getPos(), blockstate, context.getItem()) ? ActionResultType.SUCCESS : ActionResultType.PASS;
} else {
return ActionResultType.PASS;
}
}
Aggregations