Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

llynxfyre

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

llynxfyre's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. doing minecraft.getinstance().player.position().y shows a warning of Resource leak: '<unassigned Closeable value>' is not closed at this location. What does getinstance.player actually do?
  2. I couldn't find what i needed to import to use getposition()
  3. @SubscribeEvent public void whenGameMusicPlays(final PlaySoundEvent event) { if (event.getName().equals("music.game") && ) { ResourceLocation loc = new ResourceLocation(CaveMusic.MODID + ":" + "music.overworld.underground"); SimpleSoundInstance MyPSR = new SimpleSoundInstance( loc, SoundSource.MUSIC, 1.0f, 1.0f, false, 0, SoundInstance.Attenuation.NONE, 0.0D, 0.0D, 0.0D, true); event.setResultSound(MyPSR); essentially i tried a few combinations of vec3i, vec3, Player and getY() after the &&. I was essentially throwing spaghetti at the wall because i didn't know what i needed to use in 1.17.1. I want to be able to test if player's position on the Y axis is less than a certain value. I'm really sorry if this is a stupid question.
  4. Hello, I know I've been quite active here lately and I promise I'll get out of your hair once i can work out this final thing. Essentially I'm looking for a way to get the player's Position on a specific axis and use its value in an if statement. I've experimented with classes vec3 and vec3i as the method getY() seemed promising, but i didn't know how to use it with the player and I had issues with the method being non-static. Any help would be appreciated.
  5. Alright, I did what i wanted to do with my code, thank you so much for you patience with helping me. i just thought i'd post the code i wrote in case other people go looking for the same answers i was if (event.getName().equals("music.game")) { ResourceLocation loc = new ResourceLocation(CaveMusic.MODID + ":" + "music.overworld.underground"); SimpleSoundInstance MyPSR = new SimpleSoundInstance( loc, SoundSource.MUSIC, 1.0f, 1.0f, false, 0, SoundInstance.Attenuation.NONE, 0.0D, 0.0D, 0.0D, true); event.setResultSound(MyPSR); }
  6. what does the hashtags mean
  7. can you get any useful info from your crash reports?
  8. Ok, so, that's really helpful. I guess i need to learn how to make a custom sound instance for my sound.
  9. what is the 1.17.1 equivalent of PositionedSoundRecord
  10. @SubscribeEvent public static void whenGameMusicPlays(final PlaySoundEvent event) { if (event.getName().equals("music.game")) { event.setResultSound(null); } this is the code that i have so far. I'm essentially looking for what i need to put in the field that currently says null. Can I put the sound event i made in there?
  11. Hi, I'm quite new to modding and I'm trying to use event.setResultSound to play some custom music under certain conditions in place of music.game. All the examples I've seen of this being used involve a variable or something called ISound. I'm not sure what it is and my ide doesn't recognize it as being a part of forge or minecraft. How do I use this method? Is it even appropriate for what i wish to do? Like i said before, I'm very new to modding and an explanation would be super helpful for my learning process.
  12. Is there a way to just get the player position on one axis?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.