Most items done now
This commit is contained in:
parent
ba0b24d231
commit
03662c0cd3
74 changed files with 677 additions and 314 deletions
|
@ -3,6 +3,7 @@ package WayofTime.bloodmagic.item;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -12,8 +13,10 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
public class ItemComponent extends Item
|
||||
public class ItemComponent extends Item implements IVariantProvider
|
||||
{
|
||||
@Getter
|
||||
private static ArrayList<String> names = new ArrayList<String>();
|
||||
|
@ -91,4 +94,12 @@ public class ItemComponent extends Item
|
|||
{
|
||||
return new ItemStack(ModItems.itemComponent, 1, names.indexOf(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants() {
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
for (String name : names)
|
||||
ret.add(new ImmutablePair<Integer, String>(names.indexOf(name), "type=" + name));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue