Jump to content

warjort

Members
  • Posts

    5420
  • Joined

  • Last visited

  • Days Won

    175

Everything posted by warjort

  1. 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.
  2. 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.
  3. 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?
  4. You need your own RecipeBuilder like vanilla has for its recipes.
  5. A naive implementation yes. ๐Ÿ™‚ You just make the flag on the player something like NOTHING, NEEDS_ADDING, BEING_ADDED
  6. 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?
  7. 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.
  8. This is a crash in a native library. It looks to be related to the physicsmod Contact the author.
  9. It's not JEI, it's (magnesium) rubidium extras https://github.com/TeamDeusVult/MagnesiumExtras/issues/26
  10. 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
  11. 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.
  12. 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.
  13. https://github.com/sp614x/optifine/issues/6974
  14. Minecraft.getInstance().getSoundManager()
  15. SoundManager.stop() SoundInstance.isLooping() - see SoundEngine.shouldLoopAutomatically() for the full logic.
  16. I don't know. Talk to the mod author. Or remove the mod. The file name begins rubidium-extras.
  17. Use the latest versions of flywheel (0.6.4) and create (0.5.0c).
  18. 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.
  19. 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. ๐Ÿ™‚
  20. Yes. You might want to look at what FenceBlock does. That sounds close to what you are doing?
  21. 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?
  22. return this.defaultBlockState().setValue(SOUTH_CONNECTED, true); The why is look at Block.getStateForPlacement()
×
×
  • Create New...

Important Information

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