public void requestInventoryOpen(Location loc, Locomotion move) { // System.out.println("Opening chest"); move.lookAt(loc); try { out.write(8); out.writeInt((int) (loc.getX())); out.write((int) (loc.getY())); out.writeInt((int) (loc.getZ())); out.write(1); out.write(255); out.write(255); out.write(1); out.write(1); out.write(1); out.closePacket(); // System.out.println("OPEN CHEST REQUEST SENT"); } catch (Exception e) { System.err.println("Error while using entity."); } // System.out.println("CHEST opened"); }