2020-11-01 15:11:04 +01:00
|
|
|
package de.ellpeck.actuallyadditions.common.items;
|
|
|
|
|
2020-11-20 20:57:44 +01:00
|
|
|
import com.google.common.collect.ImmutableSet;
|
2020-11-01 15:11:04 +01:00
|
|
|
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
2020-11-21 11:57:36 +01:00
|
|
|
import de.ellpeck.actuallyadditions.common.materials.ArmorMaterials;
|
|
|
|
import de.ellpeck.actuallyadditions.common.materials.ToolMaterials;
|
2020-11-20 20:57:44 +01:00
|
|
|
import net.minecraft.item.*;
|
|
|
|
import net.minecraftforge.fml.RegistryObject;
|
2020-11-01 15:11:04 +01:00
|
|
|
import net.minecraftforge.registries.DeferredRegister;
|
|
|
|
import net.minecraftforge.registries.ForgeRegistries;
|
|
|
|
|
2020-11-20 20:57:44 +01:00
|
|
|
import java.util.Set;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
|
2020-11-01 15:11:04 +01:00
|
|
|
public class ActuallyItems {
|
|
|
|
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ActuallyAdditions.MOD_ID);
|
|
|
|
|
2020-11-20 20:57:44 +01:00
|
|
|
// tools
|
2020-11-21 11:57:36 +01:00
|
|
|
// If these ever need registry object referencing then I might be shit out of luck but it shouldn't be that complex to fix.
|
2020-11-21 14:28:08 +01:00
|
|
|
public static final ToolSet EMERALD_SET = new ToolSet("emerald", ToolMaterials.EMERALD, ArmorMaterials.EMERALD, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet OBSIDIAN_SET = new ToolSet("obsidian", ToolMaterials.OBSIDIAN, ArmorMaterials.OBSIDIAN, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet QUARTZ_SET = new ToolSet("quartz", ToolMaterials.QUARTZ, ArmorMaterials.QUARTZ, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet ENORI_SET = new ToolSet("enori", ToolMaterials.ENORI, ArmorMaterials.ENORI, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet EMERADIC_SET = new ToolSet("emeradic", ToolMaterials.EMERADIC, ArmorMaterials.EMERADIC, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet VOID_SET = new ToolSet("void", ToolMaterials.VOID, ArmorMaterials.VOID, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet DIAMATINE_SET = new ToolSet("diamatine", ToolMaterials.DIAMATINE, ArmorMaterials.DIAMATINE, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet PALIS_SET = new ToolSet("palis", ToolMaterials.PALIS, ArmorMaterials.PALIS, ActuallyItems::defaultProps);
|
|
|
|
public static final ToolSet RESTONIA_SET = new ToolSet("restonia", ToolMaterials.RESTONIA, ArmorMaterials.RESTONIA, ActuallyItems::defaultProps);
|
2020-11-21 11:57:36 +01:00
|
|
|
|
|
|
|
public static final Set<ToolSet> ALL_TOOL_SETS = ImmutableSet.of(EMERALD_SET, OBSIDIAN_SET, QUARTZ_SET, ENORI_SET, EMERADIC_SET, VOID_SET, DIAMATINE_SET, PALIS_SET, RESTONIA_SET);
|
2020-11-20 20:57:44 +01:00
|
|
|
|
|
|
|
// Resources
|
|
|
|
public static final RegistryObject<Item> BLACK_QUARTS = ITEMS.register("black_quartz", basicItem());
|
|
|
|
public static final RegistryObject<Item> RESTONIA_CRYSTAL = ITEMS.register("restonia_crystal", basicItem());
|
|
|
|
public static final RegistryObject<Item> PALIS_CRYSTAL = ITEMS.register("palis_crystal", basicItem());
|
|
|
|
public static final RegistryObject<Item> DIAMATINE_CRYSTAL = ITEMS.register("diamatine_crystal", basicItem());
|
|
|
|
public static final RegistryObject<Item> VOID_CRYSTAL = ITEMS.register("void_crystal", basicItem());
|
|
|
|
public static final RegistryObject<Item> EMERADIC_CRYSTAL = ITEMS.register("emeradic_crystal", basicItem());
|
|
|
|
public static final RegistryObject<Item> ENORI_CRYSTAL = ITEMS.register("enori_crystal", basicItem());
|
|
|
|
|
2020-11-21 13:43:38 +01:00
|
|
|
public static final RegistryObject<Item> BOOKLET = ITEMS.register("booklet", basicItem());
|
|
|
|
|
2020-11-21 11:57:36 +01:00
|
|
|
public static final Set<RegistryObject<Item>> SIMPLE_ITEMS = ImmutableSet.of(
|
|
|
|
BLACK_QUARTS, RESTONIA_CRYSTAL, PALIS_CRYSTAL, DIAMATINE_CRYSTAL,
|
|
|
|
VOID_CRYSTAL, EMERADIC_CRYSTAL, ENORI_CRYSTAL
|
|
|
|
);
|
2020-11-20 20:57:44 +01:00
|
|
|
|
|
|
|
private static Supplier<Item> basicItem() {
|
|
|
|
return () -> new Item(defaultProps());
|
|
|
|
}
|
2020-11-01 15:11:04 +01:00
|
|
|
|
2020-11-20 20:57:44 +01:00
|
|
|
private static Item.Properties defaultProps() {
|
|
|
|
return new Item.Properties().group(ActuallyAdditions.ACTUALLY_GROUP);
|
|
|
|
}
|
2020-11-21 11:57:36 +01:00
|
|
|
|
|
|
|
static {
|
|
|
|
ALL_TOOL_SETS.forEach(e -> e.register(ITEMS));
|
|
|
|
}
|
2020-11-01 15:11:04 +01:00
|
|
|
}
|