More progress
This commit is contained in:
parent
00d6f8eb46
commit
d80afb18f0
64 changed files with 410 additions and 976 deletions
|
@ -8,6 +8,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -51,14 +52,15 @@ public class ItemStackWrapper
|
|||
this(blockStack.getBlock(), 1, blockStack.getMeta());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static ItemStackWrapper getHolder(ItemStack stack)
|
||||
{
|
||||
if (stack == null)
|
||||
if (stack.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStackWrapper(stack.getItem(), stack.stackSize, stack.getItemDamage());
|
||||
return new ItemStackWrapper(stack.getItem(), stack.getCount(), stack.getItemDamage());
|
||||
}
|
||||
|
||||
public ItemStack toStack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue