Jump to content

Novârch

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Novârch

  1. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  2. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  3. Twitch launcher is prone to bugs, I recommend you switch to the normal launcher.
  4. You're right, that name was horrible, I changed it to StandCapability. Figured that one out, code looks like this: I've run into a problem here , as you can see above I'm sending the update packet using this method: INSTANCE.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), new SyncStandCapability(props)) , but I run into some trouble using that in the class you're referring to as I can't get the player, using Minecraft#player would give me the client player, which I can't use, what PacketTarget would be most suitable for use in this class?
  5. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  6. Thanks! I've switched to this: I've created two packets, an update packet and an update request packet, this is their code: I've tried sending them before and after declaring the value of props(the capability), but it does nothing. What am I doing wrong?
  7. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  8. Problem seems to be in how I'm getting the capability, tried printing out the same value as I should be displaying and it was just 0. Can someone explain to me why with this code the capability doesn't update?
  9. I'm trying to make a simple GUI that I'm eventually going to turn into a countdown timer, but the text in it doesn't update when it should, I suspect it isn't synced. Here's the code for the GUI's class: I call the render method in RenderGameOverlayEvent.Post in my main class. For more context here's the mod's git repo.
  10. Just tested a mock up of a system like that, works perfectly, thank you!
  11. Don't think that'll work for what I'm trying to do, I want to change it's animation from common code.
  12. I'd like to animate my custom entity in another class separate from it's model's class. Can I do this with .java models or should I use .json or .obj models? How would I go about doing this? Here's the model's class on GitHub if it's needed.
  13. SOLVED by changing dimension in PlayerEvent.PlayerChangedDimensionEvent.
  14. Yes, you must. The event should go in an event handler. All of the code you want to run on sending the packet should be called after ctx.enqueWork in handle, the content of the packet is whatever you want!
  15. In my mod I've made some customs dimensions, these dimensions mirror the default dimension so, naturally I want a Nether portal from my custom Overworld to go to my custom Nether. How would I go about doing this?
  16. You've given literally no context at all, post code, preferably as a Git repository.
  17. Have you even looked at InputEvent in your IDE? Use isKeyDown from it for your purposes. What do you mean by "stuff about the package"?
  18. Use the keybinds using events, specifically InputEvent, packets are pretty well documented on the forge docs, but basically you want to use SimpleChannel#sendToServer with your custom packet.
  19. No, it's mandatory to send a client to server packet.
  20. I use PlayerEntity#changeDImension to change my player's dimension, I call this from a client to server packet, this works fine, but it always creates a Nether portal when I call the method, even though I've created a custom Teleporter class and overriden all of the methods from the default Teleporter. The custom Teleporter class looks like this: In theory the above code should do absolutely nothing, but that isn't what it does. For more context see the Git repo of the mod.
  21. SOLVED by calling the method through a client to server packet.
×
×
  • Create New...

Important Information

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