Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/16/19 in all areas

  1. Sadly that isn't enough. Any reference to Minecraft.getMinecraft() will crash the dedicated server with that exception as soon as the class is loaded. The offending code must be isolated in a separate class and stripped from the server's .jar file using @SideOnly. Careful though, because then the code won't exist at all on the server, so you can still enjoy a crash by referencing a method stripped by @SideOnly. This is why proxies are useful. Like Differentiation said, it crashes a dedicated server. (take a look at this) Not exactly sure why this is, since you're not modifying x/z motion, but my guess would be all the reaching across logical sides that you're doing, which can cause some seemingly weird bugs.
    1 point
  2. No, that would be wrong. context.getFace() is the face you're placing against (so the North face). Getting the opposite of that would give you South, facing the block into the block you clicked on, not facing the player. To use the player's facing you use (gasp) context.getPlacementHorizontalFacing() (Its almost like you looked at your own code and went "this is what I use to do the thing you want, so don't do that, do this other thing")
    1 point
  3. It would be easier to just store a boolean called hasSpawned.
    1 point
  4. I haven't tried it, but you should try taking a look at EntityJoinWorldEvent. You can listen for this event, then add what you want as the player spawns. Be aware that this event is called for every entity whenever it joins the world (including on respawn). There are also a number of PlayerEvents you might want to look at.
    1 point
  5. Yes you can override vanilla recipe jsons. Mods function as datapacks. You just need to make sure you direct the recipe to your IRecipeSerializer by specifying the type as yours.
    1 point
×
×
  • Create New...

Important Information

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