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;
|
||||
|
@ -15,8 +16,10 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.soul.IDiscreteDemonWill;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
public class ItemDemonCrystal extends Item implements IDiscreteDemonWill
|
||||
public class ItemDemonCrystal extends Item implements IDiscreteDemonWill, IVariantProvider
|
||||
{
|
||||
@Getter
|
||||
private static ArrayList<String> names = new ArrayList<String>();
|
||||
|
@ -99,4 +102,12 @@ public class ItemDemonCrystal extends Item implements IDiscreteDemonWill
|
|||
{
|
||||
return EnumDemonWillType.values()[MathHelper.clamp_int(willStack.getMetadata(), 0, EnumDemonWillType.values().length - 1)];
|
||||
}
|
||||
|
||||
@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