All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.magistuarmory.item.ItemsSupply Maven / Gradle / Ivy

There is a newer version: 8.10
Show newest version
package com.magistuarmory.item;

import dev.architectury.registry.registries.RegistrySupplier;
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.annotation.Nullable;
import net.minecraft.class_1792;
import java.util.ArrayList;
import java.util.function.BiFunction;


public class ItemsSupply
{
	public @Nullable RegistrySupplier wood;
	public @Nullable RegistrySupplier stone;
	public @Nullable RegistrySupplier iron;
	public @Nullable RegistrySupplier gold;
	public @Nullable RegistrySupplier diamond;

	public @Nullable RegistrySupplier copper;
	public @Nullable RegistrySupplier steel;
	public @Nullable RegistrySupplier silver;
	public @Nullable RegistrySupplier netherite;
	public @Nullable RegistrySupplier tin;
	public @Nullable RegistrySupplier bronze;

	public ItemsSupply(BiFunction> workshop, class_1792.class_1793 prop)
	{
		this.wood = workshop.apply(ModItemTier.WOOD, prop);
		this.stone = workshop.apply(ModItemTier.STONE, prop);
		this.iron = workshop.apply(ModItemTier.IRON, prop);
		this.gold = workshop.apply(ModItemTier.GOLD, prop);
		this.diamond = workshop.apply(ModItemTier.DIAMOND, prop);
		this.netherite = workshop.apply(ModItemTier.NETHERITE, prop.method_24359());

		this.copper = workshop.apply(ModItemTier.COPPER, prop);
		this.steel = workshop.apply(ModItemTier.STEEL, prop);
		this.silver = workshop.apply(ModItemTier.SILVER, prop);
		this.tin = workshop.apply(ModItemTier.TIN, prop);
		this.bronze = workshop.apply(ModItemTier.BRONZE, prop);
	}

	public ArrayList> get()
	{
		ArrayList> suppliers = new ArrayList<>();

		suppliers.add(this.iron);
		suppliers.add(this.wood);
		suppliers.add(this.stone);
		suppliers.add(this.gold);
		suppliers.add(this.diamond);
		suppliers.add(this.copper);
		suppliers.add(this.steel);
		suppliers.add(this.silver);
		suppliers.add(this.netherite);
		suppliers.add(this.tin);
		suppliers.add(this.bronze);

		return suppliers;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy