Everything posted by Spyro64bit
-
[1.20.1] Player capabilities wont save after death/when exiting the end.
Hi, My mod has player capabilities tracking mana value, and the values will not save after death. (To be clear it does save when I exit and reenter the world) I looked at the documentation for capabilities but it says very little about saving after death, and what it does say I've already done. I did follow a tutorial from 1.19 so I'm guessing something changed between versions and I don't know how to fix it. ////////CODE/////////////// @SubscribeEvent public static void onPlayerCloned(PlayerEvent.Clone event){ if(event.isWasDeath()) { event.getOriginal().getCapability(PlayerManaAmountProvider.PLAYER_MANAAMOUNT).ifPresent(oldStore -> { event.getOriginal().getCapability(PlayerManaAmountProvider.PLAYER_MANAAMOUNT).ifPresent(newStore -> { newStore.copyFrom(oldStore); }); }); } }
-
[1.20.1] How to change the terrain of a custom dimension.
I've added a custom dimension and I'm wondering how I can control the terrain generation of the dimension. As it is right now the generation is complete chaos with giant mountains and floating islands, and I'm wonder what I need to change to make the generation more like the overworld. Any help is very appreciated.
-
(1.20.1) Rendering text to the HUD
Hi, I'm trying to render a text overlay to the HUD but I'm not sure where to start. All the tutorials and info I can find online tell me how to render GUIs (like the health bar) but say nothing about normal text. I cant find anything in the forums or forge documentation either. The code I used back in 1.18 no longer works, so I'm lost.
-
[1.18.2] Trying to summon splash potions above the player.
I'm working on a magic mod and one of my spells involves having "rain" fall around the player and deal damage to nearby mobs. I'm trying to simulate this "rain" with splash potions, but I can't figure out how to get the splash potions to spawn. I can't spawn them in like I would other entities and everything else I've tried hasn't worked. I've looked at ThrownPotion and ThrowablePotionItem, but I don't really understand how they work, so I haven't been able to use them, and I'm not sure if they would even work for what I'm going for. Any help would be appreciated.
-
I keep getting a runtime error that I don't know how to fix.
Every time I've tried to start my mod I get this error Caused by: java.lang.RuntimeException: software.bernie.shadowed.fasterxml.jackson.core.JsonParseException: Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser) I have no idea what it means. The build always fails as the Minecraft title screen is about to open. As it's about to open I get the error and then it crashes. If anyone knows how to fix this help would be very appreciated. I'm in 1.18.2 if that is important.
-
[1.18.2] Need help summoning a splash potion above the players head.
I'm trying to summon a splash potion above the player's head when they press a key. The key bind works, but I can't figure out how to spawn a potion with the effect I want. Any Help is appreciated.
IPS spam blocked by CleanTalk.