warjort
Members-
Posts
5420 -
Joined
-
Last visited
-
Days Won
175
Everything posted by warjort
-
No, you need a different instance each time you start a new sound. What if there are 5 players shouting at the same time? That's 5 different instances. You shouldn't be including gui code in that sound instance code. The sound instances could/will be for other players. I think you need to step back and think/understand how this should be working in a multiplayer environment. e.g. maybe you could have a shouting capability for players with its own network events to make it easier to model.
-
You don't call the method yourself. You override the method in your Screen to trap the keys you want to process. See for example ConfirmScreen.keyPressed() or one of the other vanilla screens.
-
If I understand what you are saying correctly, your instance can never be active at that point, you just created it. I don't see anything in the api that lets you check if a different instance with the same sound is playing. But it should be easy for you to keep track of this yourself?
-
You need your own RecipeBuilder like vanilla has for its recipes.
-
[1.18.2] [SOLVED] Modify incoming potion effects in Event handler
warjort replied to CrackedScreen's topic in Modder Support
A naive implementation yes. ๐ You just make the flag on the player something like NOTHING, NEEDS_ADDING, BEING_ADDED -
[SOLVED] [1.19] Cancel the crouching [CODES]
warjort replied to FantaLaTone's topic in Modder Support
The crouching is not controlled by the player's Pose. It is handled by the logic in LocalPlayer.aiStep() which is hardwired to check the isShiftKeyDown() I guess you could hack something in the MovementInputUpdateEvent? But you can't just set shiftKeyDown = false, because the isCrouching check is done before that event is fired. I can't see a clean way do it other than using an access transformer to be able to change the LocalPlayer's isCrouching field? -
[1.18.2] [SOLVED] Modify incoming potion effects in Event handler
warjort replied to CrackedScreen's topic in Modder Support
This is indeed recursive death. That method is meant to decide if you want to block a potion effect. Possible fixes include; * A hack with a ThreadLocal to spot the call is your addEffect() invocation. * Instead of applying the effect directly, defer the addition by remembering some flag for the player and doing it in a player tick handler on the next tick. -
Can someone explain this... I'm... lost...
warjort replied to A SPYDER PYTHON's topic in Support & Bug Reports
This is a crash in a native library. It looks to be related to the physicsmod Contact the author. -
1.18.2 forge 40.1.68 crash on joining any world.
warjort replied to libura's topic in Support & Bug Reports
It's not JEI, it's (magnesium) rubidium extras https://github.com/TeamDeusVult/MagnesiumExtras/issues/26 -
You will need to do more than playing the sound from the key press, otherwise it will only work in single player. ๐ You are going to need to tell the server to broadcast your shout/stop to other players. Looking at ClientBoundSoundPacket - the normal way to do this from one of the ServerLevel.playSound() methods, it does not have a parameter for looping so it looks like you will need your own custom packet handling for that as well? And you do need the tick event. Look at EntityBoundSoundInstance that has code so the sound moves with the entity/player.
-
The error says something is trying to change how chunk loading works but has not updated for the changes in forge 40.1.58 This gets reported like twice a day for optifine. ๐ Even though the download page and change log says they only support forge 40.0.24 https://optifine.net/changelog?f=OptiFine_1.18.2_HD_U_H7.jar But it sounds like you have some other mod that has the same problem. It's Impossible to say which one since you haven't posted your logs/debug.log (and even then it might not be clear?) For curseforge you will need to enable this in the minecraft advanced settings using the button in the bottom left of the screen.
-
https://github.com/sp614x/optifine/issues/6974
-
Minecraft.getInstance().getSoundManager()
-
SoundManager.stop() SoundInstance.isLooping() - see SoundEngine.shouldLoopAutomatically() for the full logic.
-
Use the latest versions of flywheel (0.6.4) and create (0.5.0c).
-
You don't put mods in the mod folder in development unless you know they are already deobfuscated and use your choice of deobfuscation mapping. You do it here: https://github.com/lynnpye/waymaker/blob/7a8cd7885ec6ca37d39ee6be84ef8c156f7e479d/build.gradle#L146 either as runtime or implementation dependency.
-
[1.19] Mod attempts to load LocalPlayer on dedicated server
warjort replied to ISenseHostility's topic in Modder Support
You are mixing client code in classes that get loaded on the dedicated server. If you have methods like that tooltip method that only gets used on the client and wants to use client specific classes, you should make it use a seperate helper class that does the client specific processing. Of course if you did try to use the helper class on the server it would complain again. ๐ -
[1.19] getStateForPlacement not returning the right blockstate
warjort replied to tomatosauce's topic in Modder Support
Yes. You might want to look at what FenceBlock does. That sounds close to what you are doing? -
There's a TagParser class if you want to explore what gets created for some SNBT. But I think what you are looking for is FloatTag?
-
[1.19] getStateForPlacement not returning the right blockstate
warjort replied to tomatosauce's topic in Modder Support
return this.defaultBlockState().setValue(SOUTH_CONNECTED, true); The why is look at Block.getStateForPlacement()