This commit is contained in:
Sen 2025-03-18 13:18:23 +01:00
parent ca8880757d
commit 09ce79e666

View file

@ -15,18 +15,13 @@ public class BlockJukebox extends Block {
super(Material.wood); super(Material.wood);
this.setTab(CheatTab.tabTech); this.setTab(CheatTab.tabTech);
} }
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) { public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
if(!worldIn.client) if(!worldIn.client)
worldIn.playSound(worldIn.rand.pick(SoundEvent.values()), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1.0f); worldIn.playSound(worldIn.rand.pick(SoundEvent.values()), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 1.0f);
return true; return true;
} }
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, State state, float chance, int fortune) {
if(!worldIn.client)
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, 0);
}
public ModelBlock getModel(String name, State state) { public ModelBlock getModel(String name, State state) {
return new ModelBlock("jukebox_side").add().dnswe().u("jukebox_top"); return new ModelBlock("jukebox_side").add().dnswe().u("jukebox_top");
} }