Fix typo causing some oredict blocks to not be chiseleable in world

Closes #177
This commit is contained in:
tterrag1098 committed 2015-01-25 15:08:29 -05:00
1 parent a4f779ef0f
commit 06f2aff70c
3 files changed
+8 -5

No files matched your search

@@ -1,11 +1,14 @@
package com.cricketcraft.chisel.api;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import com.cricketcraft.chisel.carving.CarvableHelper;
import com.cricketcraft.chisel.carving.CarvableVariation;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
* To be implemented on blocks that can be chiseled and need advanced metadata to variation mapping. Currently not very usable without internal classes.
*/
public interface ICarvable {
/**
@@ -112,7 +112,7 @@ public class Carving implements ICarvingRegistry {
@Override
public ICarvingGroup getGroup(Block block, int metadata) {
int[] ids = OreDictionary.getOreIDs(new ItemStack(block, metadata));
int[] ids = OreDictionary.getOreIDs(new ItemStack(block, 1, metadata));
if (ids.length > 0) {
for (int id : ids) {
ICarvingGroup oreGroup = groups.getGroupByOre(OreDictionary.getOreName(id));
@@ -129,7 +129,7 @@ public class ContainerChisel extends Container {
public void onChiselSlotChanged() {
ItemStack stack = playerInventory.mainInventory[currentIndex];
if (!stack.isItemEqual(chisel))
if (stack == null || !stack.isItemEqual(chisel))
finished = true;
if (finished)