From c04775398aa5b147d400ea8d1d0450b72002cb09 Mon Sep 17 00:00:00 2001 From: tiflu <123897398+tiflu@users.noreply.github.com> Date: Sun, 11 May 2025 00:20:27 -0500 Subject: [PATCH] Polishes Alchemic Calcinator & Belljars (#79) Co-authored-by: Martin Robertz Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com> Co-authored-by: koolkrafter5 --- .../common/block/BlockAlchemicCalcinator.java | 19 +++++++++++++ .../common/block/BlockBelljar.java | 27 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java index 85d1b1e9..94409f49 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java @@ -5,21 +5,28 @@ import java.util.Random; 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.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockAlchemicCalcinator extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon icon; + public BlockAlchemicCalcinator() { super(Material.rock); setHardness(2.0F); @@ -28,6 +35,18 @@ public class BlockAlchemicCalcinator extends BlockContainer { this.setBlockName("alchemicCalcinator"); } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return icon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + this.icon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune"); + } + @Override public TileEntity createNewTileEntity(World world, int meta) { return new TEAlchemicCalcinator(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index d5f93a30..807fc232 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; @@ -26,12 +29,36 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBelljar extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + + @SideOnly(Side.CLIENT) + private IIcon otherIcon; + public BlockBelljar() { super(Material.glass); setHardness(2.0F); setResistance(5.0F); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setBlockName("crystalBelljar"); + this.setStepSound(Block.soundTypeGlass); + this.setHarvestLevel("pickaxe", 0); + } + + @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)