August 5, 201610 yr 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.
August 5, 201610 yr It works something like this. world.playSound(x, y, z, SoundEvent.REGISTRY.getObject("block.anvil.break"), category, volume, pitch, distanceDelay); 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.
August 5, 201610 yr Author I tried that but it says "game.neutral.swim" is a string, not a resource variable.
August 5, 201610 yr Why not create a new ResourceLocation... ResourceLocation resourcelocation = new ResourceLocation(soundNameIn); 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.
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.