tutorial:sounds
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:sounds [2019/08/06 18:36] – fudge | tutorial:sounds [2019/08/19 19:57] – [Step 2: Add a sounds.json file, or add to it if you already have one] Add reference to minecraft wiki jamieswhiteshirt | ||
---|---|---|---|
Line 21: | Line 21: | ||
public class ExampleBlock extends Block { | public class ExampleBlock extends Block { | ||
[...] | [...] | ||
+ | | ||
@Override | @Override | ||
public boolean activate(BlockState blockState, World world, BlockPos blockPos, PlayerEntity placedBy, Hand hand, BlockHitResult blockHitResult) { | public boolean activate(BlockState blockState, World world, BlockPos blockPos, PlayerEntity placedBy, Hand hand, BlockHitResult blockHitResult) { | ||
Line 62: | Line 63: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | See the [[https:// | ||
==== Step 3: Create your sound event ==== | ==== Step 3: Create your sound event ==== | ||
Simply create a new instance of '' | Simply create a new instance of '' | ||
Line 67: | Line 70: | ||
public class ExampleMod { | public class ExampleMod { | ||
[...] | [...] | ||
- | public static | + | public static |
+ | public static SoundEvent MY_SOUND_EVENT = new SoundEvent(MY_SOUND_ID); | ||
} | } | ||
</ | </ | ||
Line 76: | Line 80: | ||
public void onInitialize(){ | public void onInitialize(){ | ||
[...] | [...] | ||
- | | + | |
} | } | ||
</ | </ |
tutorial/sounds.txt · Last modified: 2023/01/09 18:20 by slainlight