From 806d9aac1cf3be8da2ace5faebdc41fa99fe933e Mon Sep 17 00:00:00 2001 From: tiflu Date: Mon, 28 Apr 2025 17:23:41 -0500 Subject: [PATCH] Adds glass breaking sound to belljar, fixes missing texture particles when breaking, and allows the pickaxe to break the belljar quickly. --- .../common/block/BlockBelljar.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index d5f93a30..77c2a888 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -3,8 +3,10 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.ArrayList; import java.util.List; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,6 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -32,6 +35,30 @@ public class BlockBelljar extends BlockContainer { setResistance(5.0F); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setBlockName("crystalBelljar"); + this.setStepSound(Block.soundTypeGlass); + this.setHarvestLevel("pickaxe", 0); + } + + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + + @SideOnly(Side.CLIENT) + private IIcon otherIcon; + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + if (side == 0) { + return bottomIcon; + } + return otherIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + this.bottomIcon = iconRegister.registerIcon("minecraft:planks_oak"); + this.otherIcon = iconRegister.registerIcon("minecraft:glass"); } @SideOnly(Side.CLIENT)