Skip to content
Permalink
Browse files

Various bug fixes:

- Added missing sluice recipe (Closes #560).
- Fixed stone anvils' hardness and resistance (Closes #559).
- Fixed stone anvils' model missing bottom texture (Closes #557).
- Fixed stone anvils' requiring air blocks to be created (Closes #532).
- Fixed tool rack not accepting ItemHoe as valid item (Closes #552).
  • Loading branch information
DisasterMoo committed Nov 20, 2019
1 parent e06d475 commit 412040343dfe214d5824e452d78cc420936ddbd6
@@ -67,7 +67,7 @@ public IBlockState getStateFromMeta(int meta)
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
ItemStack stack = playerIn.getHeldItem(hand);
if (OreDictionaryHelper.doesStackMatchOre(stack, "hammer"))
if (OreDictionaryHelper.doesStackMatchOre(stack, "hammer") && worldIn.isAirBlock(pos.up()))
{
if (!worldIn.isRemote)
{
@@ -63,8 +63,8 @@ public BlockStoneAnvil(Rock rock)
super(Material.ROCK);

setSoundType(SoundType.STONE);
setHardness(2.0F);
setResistance(10.0F);
setHardness(rock.getRockCategory().getHardness());
setResistance(rock.getRockCategory().getResistance());
setHarvestLevel("pickaxe", 0);

this.rock = rock;
@@ -12,10 +12,7 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.item.*;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
@@ -38,7 +35,8 @@ public static boolean isItemEligible(Item item)
{
return item instanceof ItemMetalTool
|| item instanceof ItemTool
|| item instanceof ItemBow;
|| item instanceof ItemBow
|| item instanceof ItemHoe;
}

public static boolean isItemEligible(@Nullable ItemStack item)

0 comments on commit 4120403

Please sign in to comment.
You can’t perform that action at this time.