33import com .lukasabbe .bookshelfinspector .BookshelfInspectorClient ;
44import com .lukasabbe .bookshelfinspector .data .BookData ;
55import com .lukasabbe .bookshelfinspector .data .Tags ;
6- import com .lukasabbe .bookshelfinspector .mixin .BookshelfInvoker ;
76import com .lukasabbe .bookshelfinspector .network .packets .BookShelfInventoryRequestPayload ;
87import com .lukasabbe .bookshelfinspector .network .packets .LecternInventoryRequestPayload ;
98import com .lukasabbe .bookshelfinspector .platform .Services ;
109import net .minecraft .client .Minecraft ;
1110import net .minecraft .core .BlockPos ;
12- import net .minecraft .world .level .block .Blocks ;
1311import net .minecraft .world .level .block .ChiseledBookShelfBlock ;
1412import net .minecraft .world .level .block .state .BlockState ;
1513import net .minecraft .world .phys .BlockHitResult ;
@@ -23,9 +21,9 @@ public class Inspector {
2321 public void inspect (Minecraft client ){
2422 if (!modAvailable ) return ;
2523
26- if (client .cameraEntity == null || client .player == null ) return ;
24+ if (client .getCameraEntity () == null || client .player == null ) return ;
2725
28- HitResult hit = client .cameraEntity .pick (5f ,0f ,false );
26+ HitResult hit = client .getCameraEntity () .pick (5f ,0f ,false );
2927
3028 //find block hit, if not found block returns
3129 final HitResult .Type type = hit .getType ();
@@ -81,7 +79,7 @@ private void bookShelfInspect(BlockPos pos, BlockHitResult blockHitResult, Minec
8179
8280 //Gets index position for a book in the bookshelf
8381 ChiseledBookShelfBlock bookshelfBlock = (ChiseledBookShelfBlock ) blockState .getBlock ();
84- OptionalInt optionalInt = (( BookshelfInvoker ) bookshelfBlock ). invokerGetSlotForHitPos (blockHitResult ,blockState );
82+ OptionalInt optionalInt = bookshelfBlock . getHitSlot (blockHitResult , blockState . getValue ( ChiseledBookShelfBlock . FACING ) );
8583
8684 //if the position is empty, return
8785 if (optionalInt .isEmpty ()) {
0 commit comments