Jump to content

ChampionAsh5357

Members
  • Posts

    3284
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by ChampionAsh5357

  1. You can override any JSON, so loot tables and recipes can just be modified to handle that. You can even add a custom condition for loot tables that take in the player context such that you can check your player's progress before dropping that loot.
  2. You cannot remove xp from the client player; it will not sync to the server. You should instead send a packet to the server and remove the experience from the player there. You can set experience points using either `Player#giveExperiencePoints` or `Player#giveExperienceLevels` or directly through `Player#setExperiencePoints` or `Player#setExperienceLevels`. Additionally, that is not how you listen to an event. I would suggest reading how to do so on the docs.
  3. You wouldn't be modifying the game assets though? Additionally, if you want to make a mod that's backwards compatible with vanilla, I would suggest a datapack. Sure, but I would not explain how to do it since nearly any instance of registry replacement will break the game because of all the static storages of vanilla registry objects which in most instances would cause the game to crash in some capacity. Hence, I suggested the solution above as an alternative. It would also allow you to have more compatibility with other mods if you provide an open API or create an addon that supports the mod even if you do not wish to support it.
  4. You would normally need to make a custom `Recipe` to handle this case; however, you don't have access to the player in those instances. As such, it would probably be better to make a separate block for this which can check the player context along with the normal recipe information.
  5. Replace the recipe JSONs by supplying ones with a similar name. If you want to make it such that recipes can't be crafted until a certain point, it is much simpler to create a new block that functions the same as a crafting workbench but checks the progress. You can then disable any vanilla items by making an uncraftable recipe. If you need to change how non-JSONable recipes work, there are events for those (`PotionBrewEvent$Pre`, `AnvilUpdateEvent`, etc.). You should always avoid touching and reregistering registry objects or modifying vanilla methods as you would most likely break compatibility with any other mod. The best way is just to modify the JSONs when applicable.
  6. There is no need for this. Use `PlayerEvent$BreakSpeed`. Reflection is not needed here.
  7. Please show your entire buildscript. Forge has changed in 1.19 now using the plugin DSL, hence there is a new method of adding the necessary libraries: https://github.com/ParchmentMC/Librarian/blob/dev/docs/FORGEGRADLE.md.
  8. How are you defining hardness? Are you referring to how long it takes to destroy the block? Or are you talking about the explosion resistance of the block? I would avoid performing vanilla manipulation except through the Forge API and to suggest and PR new API instead of using reflection.
  9. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  10. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  11. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  12. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  13. If you are going to use the annotation to register event listeners, all event listeners in the class need to be public static methods.
  14. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  15. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  16. Locking for necroposting. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  17. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  18. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  19. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  20. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  21. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  22. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  23. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  24. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
  25. The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
×
×
  • Create New...

Important Information

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