Fixed an issue where Parts/Blocks would not properly identify them selves with the proper ItemStack.

This commit is contained in:
AlgorithmX2
2014-02-09 01:55:44 -06:00
parent 7367502d75
commit 49da876b6f
9 changed files with 66 additions and 27 deletions
+33
View File
@@ -0,0 +1,33 @@
package appeng.core.features;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemStackSrc
{
public final Item item;
public final Block block;
public final int damage;
public ItemStackSrc(Item i, int dmg) {
block = null;
item = i;
damage = dmg;
}
public ItemStackSrc(Block b, int dmg) {
item = null;
block = b;
damage = dmg;
}
public ItemStack stack(int i)
{
if ( block != null )
return new ItemStack( block, i, damage );
return new ItemStack( item, i, damage );
}
}