Everything posted by warjort
-
[1.19] Stop sound
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.
-
1.19 How to detect key press?
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.
-
[1.19] Stop sound
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?
-
[1.18.2] Datagen'ing custom recipe types?
You need your own RecipeBuilder like vanilla has for its recipes.
-
[1.18.2] [SOLVED] Modify incoming potion effects in Event handler
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]
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
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...
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.
It's not JEI, it's (magnesium) rubidium extras https://github.com/TeamDeusVult/MagnesiumExtras/issues/26
-
(1.18) method reference not being recognized in EntityRenderers.register
You are trying to use the RegistryObject instead of the EntityType ModEntities.STEAM_ENGINE.get() You should also really be registering your EntityRenderers by subscribing to the EntityRenderersEvent.RegisterRenderers on the MOD event bus. https://forge.gemwire.uk/wiki/Events/1.18
-
[1.19] Stop sound
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.
-
Server tick loop
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.
-
Server tick loop
https://github.com/sp614x/optifine/issues/6974
-
[1.19] Stop sound
Minecraft.getInstance().getSoundManager()
-
[1.19] Stop sound
SoundManager.stop() SoundInstance.isLooping() - see SoundEngine.shouldLoopAutomatically() for the full logic.
-
org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
Since this is mod pack, you can also talk to the modpack author.
-
org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
I don't know. Talk to the mod author. Or remove the mod. The file name begins rubidium-extras.
-
org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
https://github.com/TeamDeusVult/MagnesiumExtras/issues/26
-
Create Mod 0.5, World Crash
Use the latest versions of flywheel (0.6.4) and create (0.5.0c).
-
Crash caused by an invalid Java Runtime Configuration. Check any custom configuration settings. Error Code: 1
Issue with magnesium. You should contact the mod author.
-
Having problems using 'runServer' configuration with dependency on mod with mixins
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
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
Yes. You might want to look at what FenceBlock does. That sounds close to what you are doing?
-
NBT, CompoundTag, Tag, ListTag of floats
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
return this.defaultBlockState().setValue(SOUTH_CONNECTED, true); The why is look at Block.getStateForPlacement()
IPS spam blocked by CleanTalk.