I was trying to replicate this tutorial https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/, but for some reason is not working.
When I initiate the launcher with the version 1.0.0 , It does not show that the updated version is 1.0.1
mods.toml:https://github.com/GustavoSasaki/Ragnarok-Cards/blob/update_checker/src/main/resources/META-INF/mods.toml
json with update information: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/update_checker/update.json
I have a class of items called Ragnarok_Cards. My ideia was creating the item Loot_Box with would spawn a random already seen card.
For that I was registering in nbt of player every time he pickup a card. But when the player dies, the nbt is reset.
How I can stop the nbt from resetting?
( Or if this is not the proper way of storing extra data of the player, what is the right one?)
Ragnarok_Card: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Items/RagnarokCard.java
Pickup event: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Events/PickUp.java
Loot_Box: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Items/LootBox.java
So, Can I before hand create a custom configuration file (.toml) and everytime a new world is created, put this file in the serverconfig folder? How I do that?
I want to add extra loot for vanilla mobs.
First I made work the forge docs global loot table example, and from It I tried to extend to mob drops, but I doing something wrong, and every mob is just dropping nothing.
Could you please help me find how to resolve It?
The LootModifier Subclass: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/Items/aa.java
Register: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/java/ragnarok_cards/RegisterEventsItems.java
The global_loot_modifiers.json: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json
The serialized json: https://github.com/GustavoSasaki/Ragnarok-Cards/blob/main/src/main/resources/data/ragnarok_cards/loot_modifiers/add_to_drop.json
latest.log
Probably since if I just run It in the server, I cant play the sound, and the potions for some reason stay at 0:00 time and never disappear.
For example, in a event such as LivingEntityUseItemEvent.Finish the server side call a function which would play a sound in the client side
I was trying to make a food with a chance to play a sound then give potions effects when eaten.
I was using event.getEntity().world.rand.nextInt(2) to generate the random number, but the values from client and server are different.
How do I make them be the same?
Also, there is a way to the server side call a function in the client side?