Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/26/17 in all areas

  1. @SideOnly restricts classes, methods and fields to a specific physical side. The integrated server runs on the physical client, so it has access to things annotated with @SideOnly(Side.CLIENT) (though it should never actually use these). The dedicated server runs on the physical server, which doesn't have access to things annotated with @SideOnly(Side.CLIENT). Use InventoryPlayer#hasItemStack to check if an ItemStack is anywhere in a player's inventory, matching the Item and metadata but not the NBT or capabilities.
    1 point
  2. The reason you missed it when you were testing is because you probably tested in single player mode. You MUST test your mods by running a separate server and client. Within Eclipse you can simply run both the client and server configurations at same time and connect to the local host 127.0.0.1. This happens because when running in single player there is only one Java VM running both sides to it actually sees the classes that are loaded on the other sides. But if you run a dedicated server run configuration you will have two separate Java VMs each loading only their own classes. The isRemote is for an entirely different thing. This problem is related to classes and how they are loaded, not just how they are executed.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.