2019-07-11 09:03:08 +02:00
|
|
|
package com.simibubi.create;
|
|
|
|
|
2019-07-12 12:13:05 +02:00
|
|
|
import com.simibubi.create.item.ItemBlueprint;
|
2019-07-17 17:13:09 +02:00
|
|
|
import com.simibubi.create.item.ItemBlueprintAndQuill;
|
2019-07-11 09:03:08 +02:00
|
|
|
import com.simibubi.create.item.ItemWandSymmetry;
|
|
|
|
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.Item.Properties;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2019-07-15 12:10:57 +02:00
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
|
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
2019-07-11 09:03:08 +02:00
|
|
|
import net.minecraftforge.registries.IForgeRegistry;
|
|
|
|
|
|
|
|
public enum AllItems {
|
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
SYMMETRY_WAND(new ItemWandSymmetry(standardProperties())),
|
|
|
|
EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))),
|
2019-07-17 17:13:09 +02:00
|
|
|
BLUEPRINT_AND_QUILL(new ItemBlueprintAndQuill(standardProperties().maxStackSize(1))),
|
2019-07-12 12:13:05 +02:00
|
|
|
BLUEPRINT(new ItemBlueprint(standardProperties()));
|
2019-07-11 09:03:08 +02:00
|
|
|
|
|
|
|
public Item item;
|
|
|
|
|
|
|
|
private AllItems(Item item) {
|
|
|
|
this.item = item;
|
|
|
|
this.item.setRegistryName(Create.ID, this.name().toLowerCase());
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Properties standardProperties() {
|
|
|
|
return new Properties().group(Create.creativeTab);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void registerItems(IForgeRegistry<Item> iForgeRegistry) {
|
|
|
|
for (AllItems item : values()) {
|
|
|
|
iForgeRegistry.register(item.get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Item get() {
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean typeOf(ItemStack stack) {
|
|
|
|
return stack.getItem() == item;
|
|
|
|
}
|
|
|
|
|
2019-07-15 12:10:57 +02:00
|
|
|
@OnlyIn(Dist.CLIENT)
|
2019-07-11 09:03:08 +02:00
|
|
|
public static void initColorHandlers() {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|