rojo8399 Posted August 5, 2016 Posted August 5, 2016 The new way to play a sound is confusing to me .playSound(x, y, z, soundIn, category, volume, pitch, distanceDelay); What do I put in the "soundIn" field? It says it's of type "SoundEvent" and I've never worked with that. Quote
Animefan8888 Posted August 5, 2016 Posted August 5, 2016 It works something like this. world.playSound(x, y, z, SoundEvent.REGISTRY.getObject("block.anvil.break"), category, volume, pitch, distanceDelay); Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
rojo8399 Posted August 5, 2016 Author Posted August 5, 2016 I tried that but it says "game.neutral.swim" is a string, not a resource variable. Quote
Animefan8888 Posted August 5, 2016 Posted August 5, 2016 Why not create a new ResourceLocation... ResourceLocation resourcelocation = new ResourceLocation(soundNameIn); Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.