Search in sources :

Example 26 with ItemStackWrapper

use of com.builtbroken.mc.prefab.items.ItemStackWrapper in project Engine by VoltzEngine-Project.

the class ItemStackWrapperTest method testHashCodeEquals.

public void testHashCodeEquals() {
    ItemStackWrapper a = new ItemStackWrapper(new ItemStack(Items.apple));
    ItemStackWrapper b = new ItemStackWrapper(new ItemStack(Items.apple));
    assertTrue("Wrappers failed to equal each other", a.equals(b));
    assertTrue("Hash codes don't equal", a.hashCode() == b.hashCode());
    a = new ItemStackWrapper(new ItemStack(Items.coal));
    b = new ItemStackWrapper(new ItemStack(Items.coal, 10));
    assertTrue("Wrappers failed to equal each other", a.equals(b));
    assertTrue("Hash codes don't equal", a.hashCode() == b.hashCode());
}
Also used : ItemStackWrapper(com.builtbroken.mc.prefab.items.ItemStackWrapper) ItemStack(net.minecraft.item.ItemStack)

Example 27 with ItemStackWrapper

use of com.builtbroken.mc.prefab.items.ItemStackWrapper in project Engine by VoltzEngine-Project.

the class MRFluidStack method addInputOption.

public MRFluidStack addInputOption(Item input) {
    ItemStackWrapper wrapper = new ItemStackWrapper(new ItemStack(input));
    wrapper.meta_compare = false;
    wrapper.nbt_compare = false;
    return (MRFluidStack) super.addInputOption(wrapper);
}
Also used : ItemStackWrapper(com.builtbroken.mc.prefab.items.ItemStackWrapper) ItemStack(net.minecraft.item.ItemStack)

Example 28 with ItemStackWrapper

use of com.builtbroken.mc.prefab.items.ItemStackWrapper in project Engine by VoltzEngine-Project.

the class MRFluidStack method addInputOption.

public MRFluidStack addInputOption(Block input) {
    ItemStackWrapper wrapper = new ItemStackWrapper(new ItemStack(input));
    wrapper.meta_compare = false;
    wrapper.nbt_compare = false;
    return (MRFluidStack) super.addInputOption(wrapper);
}
Also used : ItemStackWrapper(com.builtbroken.mc.prefab.items.ItemStackWrapper) ItemStack(net.minecraft.item.ItemStack)

Example 29 with ItemStackWrapper

use of com.builtbroken.mc.prefab.items.ItemStackWrapper in project Engine by VoltzEngine-Project.

the class MRItemStack method addInputOption.

public MRItemStack addInputOption(Item input) {
    ItemStackWrapper wrapper = new ItemStackWrapper(new ItemStack(input));
    wrapper.meta_compare = false;
    wrapper.nbt_compare = false;
    return (MRItemStack) super.addInputOption(wrapper);
}
Also used : ItemStackWrapper(com.builtbroken.mc.prefab.items.ItemStackWrapper) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemStackWrapper (com.builtbroken.mc.prefab.items.ItemStackWrapper)29 ItemStack (net.minecraft.item.ItemStack)22 IExplosiveHandler (com.builtbroken.mc.api.explosive.IExplosiveHandler)4 Item (net.minecraft.item.Item)3 ITexturedExplosiveHandler (com.builtbroken.mc.api.explosive.ITexturedExplosiveHandler)2 IItemHasMass (com.builtbroken.mc.api.items.IItemHasMass)2 IExplosiveContainerItem (com.builtbroken.mc.api.items.explosives.IExplosiveContainerItem)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Block (net.minecraft.block.Block)2 IIcon (net.minecraft.util.IIcon)2 ExplosiveHandlerGeneric (com.builtbroken.mc.prefab.explosive.ExplosiveHandlerGeneric)1 AbstractTest (com.builtbroken.mc.testing.junit.AbstractTest)1 IRecipe (net.minecraft.item.crafting.IRecipe)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 Test (org.junit.Test)1