2020-01-16 12:35:46 +01:00
|
|
|
package com.minelittlepony.unicopia;
|
2018-09-12 01:29:49 +02:00
|
|
|
|
2019-02-17 18:22:11 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemAlicornAmulet;
|
2019-02-07 10:46:59 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemAppleMultiType;
|
2019-01-09 16:23:22 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemCereal;
|
2020-01-16 16:46:24 +01:00
|
|
|
import com.minelittlepony.unicopia.item.AppleItem;
|
|
|
|
import com.minelittlepony.unicopia.item.CloudPlacerItem;
|
2018-09-20 22:49:10 +02:00
|
|
|
import com.minelittlepony.unicopia.item.ItemCurse;
|
2019-01-25 16:22:41 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemFruitLeaves;
|
2019-03-11 19:50:06 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemMagicStaff;
|
2019-02-23 14:23:24 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemMoss;
|
2018-09-19 09:07:39 +02:00
|
|
|
import com.minelittlepony.unicopia.item.ItemOfHolding;
|
2019-01-13 21:05:40 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemRottenApple;
|
2019-03-20 21:37:49 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemRottenTomato;
|
2019-04-09 13:45:36 +02:00
|
|
|
import com.minelittlepony.unicopia.item.ItemSpear;
|
2018-09-20 22:49:10 +02:00
|
|
|
import com.minelittlepony.unicopia.item.ItemSpell;
|
2019-01-10 10:35:15 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemSpellbook;
|
2019-02-14 18:11:28 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemStaff;
|
2019-01-06 22:31:34 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemTomato;
|
2019-01-08 21:23:22 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemTomatoSeeds;
|
2019-01-13 21:05:40 +01:00
|
|
|
import com.minelittlepony.unicopia.item.ItemZapApple;
|
2020-01-16 16:46:24 +01:00
|
|
|
import com.minelittlepony.unicopia.item.PredicatedBlockItem;
|
2019-03-08 21:55:27 +01:00
|
|
|
import com.minelittlepony.unicopia.item.URecord;
|
2019-03-18 14:22:22 +01:00
|
|
|
import com.minelittlepony.unicopia.item.override.ItemShear;
|
|
|
|
import com.minelittlepony.unicopia.item.override.ItemStick;
|
2020-01-16 16:46:24 +01:00
|
|
|
import com.minelittlepony.unicopia.magic.spells.SpellRegistry;
|
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
import net.minecraft.item.Item;
|
2020-01-16 16:46:24 +01:00
|
|
|
import net.minecraft.item.ItemGroup;
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.Blocks;
|
|
|
|
import net.minecraft.client.MinecraftClient;
|
|
|
|
import net.minecraft.client.color.item.ItemColors;
|
|
|
|
import net.minecraft.item.BlockItem;
|
|
|
|
import net.minecraft.item.FoodComponents;
|
2018-09-12 01:29:49 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2020-01-16 16:46:24 +01:00
|
|
|
import net.minecraft.item.Items;
|
|
|
|
import net.minecraft.item.TallBlockItem;
|
|
|
|
import net.minecraft.item.Item.Settings;
|
2020-01-16 12:35:46 +01:00
|
|
|
import net.minecraft.util.Identifier;
|
2020-01-16 16:46:24 +01:00
|
|
|
import net.minecraft.util.registry.Registry;
|
2018-09-16 00:45:44 +02:00
|
|
|
|
|
|
|
import static com.minelittlepony.unicopia.Predicates.*;
|
2018-09-12 01:29:49 +02:00
|
|
|
|
2019-03-18 14:22:22 +01:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2019-02-17 00:08:19 +01:00
|
|
|
import com.minelittlepony.unicopia.UClient;
|
|
|
|
import com.minelittlepony.unicopia.Unicopia;
|
2019-01-29 12:53:43 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.BushToxicityDeterminent;
|
2019-01-30 21:17:46 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.CookedToxicityDeterminent;
|
2019-01-29 12:53:43 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.FlowerToxicityDeterminent;
|
2019-02-23 14:23:24 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.MultiItemEdible;
|
2019-01-30 21:17:46 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.Toxicity;
|
2019-01-29 12:53:43 +01:00
|
|
|
import com.minelittlepony.unicopia.edibles.UItemFoodDelegate;
|
2019-03-20 21:37:49 +01:00
|
|
|
import com.minelittlepony.unicopia.entity.EntityConstructionCloud;
|
|
|
|
import com.minelittlepony.unicopia.entity.EntityRacingCloud;
|
|
|
|
import com.minelittlepony.unicopia.entity.EntityWildCloud;
|
2019-01-10 18:46:40 +01:00
|
|
|
import com.minelittlepony.unicopia.forgebullshit.BuildInTexturesBakery;
|
2019-02-01 17:29:58 +01:00
|
|
|
import com.minelittlepony.unicopia.forgebullshit.OreReplacer;
|
2019-03-09 14:42:11 +01:00
|
|
|
import com.minelittlepony.unicopia.forgebullshit.UnFuckedItemSnow;
|
2019-01-07 09:34:58 +01:00
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
public class UItems {
|
2020-01-16 16:46:24 +01:00
|
|
|
|
|
|
|
private static final ItemStick stick = register(new ItemStick(new Item.Settings()), "minecraft", "stick");
|
|
|
|
private static final ItemShear shears = register(new ItemShear(), "minecraft", "shears");
|
|
|
|
|
|
|
|
public static final AppleItem red_apple = register(new AppleItem(FoodComponents.APPLE), "minecraft", "apple");
|
|
|
|
public static final AppleItem green_apple = register(new AppleItem(FoodComponents.APPLE), "apple_green");
|
|
|
|
public static final AppleItem sweet_apple = register(new AppleItem(FoodComponents.APPLE), "apple_sweet");
|
|
|
|
public static final AppleItem sour_apple = register(new AppleItem(FoodComponents.APPLE), "apple_sour");
|
2018-09-12 01:29:49 +02:00
|
|
|
|
2019-02-07 10:46:59 +01:00
|
|
|
public static final ItemAppleMultiType zap_apple = new ItemZapApple(Unicopia.MODID, "zap_apple")
|
2019-01-31 18:16:49 +01:00
|
|
|
.setSubTypes("zap_apple", "red", "green", "sweet", "sour", "zap");
|
2019-01-13 21:05:40 +01:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final AppleItem rotten_apple = new ItemRottenApple(Unicopia.MODID, "rotten_apple");
|
|
|
|
public static final AppleItem cooked_zap_apple = register(new AppleItem(FoodComponents.APPLE), "cooked_zap_apple");
|
2019-01-13 21:05:40 +01:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item cloud_matter = register(new Item(new Item.Settings().group(ItemGroup.MATERIALS)), "cloud_matter");
|
|
|
|
public static final Item dew_drop = register(new Item(new Item.Settings().group(ItemGroup.MATERIALS)), "dew_drop");
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final CloudPlacerItem racing_cloud_spawner = register(new CloudPlacerItem(EntityRacingCloud::new), "racing_cloud_spawner");
|
|
|
|
public static final CloudPlacerItem construction_cloud_spawner = register(new CloudPlacerItem(EntityConstructionCloud::new), "construction_cloud_spawner");
|
|
|
|
public static final CloudPlacerItem wild_cloud_spawner = register(new CloudPlacerItem(EntityWildCloud::new), "wild_cloud_spawner");
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item cloud_block = register(new PredicatedBlockItem(UBlocks.normal_cloud, new Item.Settings().group(ItemGroup.MATERIALS), INTERACT_WITH_CLOUDS), "cloud_block");
|
|
|
|
public static final Item enchanted_cloud = register(new PredicatedBlockItem(UBlocks.enchanted_cloud, new Item.Settings().group(ItemGroup.MATERIALS), INTERACT_WITH_CLOUDS), "enchanted_cloud_block");
|
|
|
|
public static final Item packed_cloud = register(new PredicatedBlockItem(UBlocks.packed_cloud, new Item.Settings().group(ItemGroup.MATERIALS), INTERACT_WITH_CLOUDS), "packed_cloud_block");
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item cloud_stairs = register(new PredicatedBlockItem(UBlocks.cloud_stairs, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS), INTERACT_WITH_CLOUDS), "cloud_stairs");
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item cloud_fence = register(new PredicatedBlockItem(UBlocks.cloud_fence, new Item.Settings().group(ItemGroup.DECORATIONS), INTERACT_WITH_CLOUDS), "cloud_fence");
|
|
|
|
public static final Item cloud_banister = register(new PredicatedBlockItem(UBlocks.cloud_banister, new Item.Settings().group(ItemGroup.DECORATIONS), INTERACT_WITH_CLOUDS), "cloud_banister");
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item anvil = register(new PredicatedBlockItem(UBlocks.anvil, new Item.Settings().group(ItemGroup.DECORATIONS), INTERACT_WITH_CLOUDS), "cloud_anvil");
|
2018-09-19 09:07:39 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item record_crusade = register(new URecord(USounds.RECORD_CRUSADE), "crusade");
|
|
|
|
public static final Item record_pet = register(new URecord(USounds.RECORD_PET, "pet");
|
|
|
|
public static final Item record_popular = register(new URecord(USounds.RECORD_POPULAR), "popular");
|
|
|
|
public static final Item record_funk = register(new URecord(USounds.RECORD_FUNK), "funk");
|
2019-02-04 17:16:17 +01:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item hive = register(new BlockItem(UBlocks.hive, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "hive");
|
|
|
|
public static final Item chitin_shell = register(new Item(new Item.Settings().group(ItemGroup.MATERIALS)), "chitin_shell");
|
|
|
|
public static final Item chitin = register(new BlockItem(UBlocks.chitin, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "chitin_block");
|
|
|
|
public static final Item chissled_chitin = register(new BlockItem(UBlocks.chissled_chitin, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "chissled_chitin");
|
|
|
|
public static final Item cuccoon = register(new BlockItem(UBlocks.cuccoon, new Item.Settings().group(ItemGroup.MATERIALS)), "cuccoon");
|
|
|
|
public static final Item slime_layer = register(new BlockItem(UBlocks.slime_layer, new Item.Settings().group(ItemGroup.DECORATIONS)), "slime_layer");
|
2018-09-19 09:07:39 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item mist_door = register(new TallBlockItem(UBlocks.mist_door, new Item.Settings().group(ItemGroup.REDSTONE)), "mist_door");
|
|
|
|
public static final Item library_door = register(new TallBlockItem(UBlocks.library_door, new Item.Settings().group(ItemGroup.REDSTONE)), "library_door");
|
|
|
|
public static final Item bakery_door = register(new TallBlockItem(UBlocks.bakery_door, new Item.Settings().group(ItemGroup.REDSTONE)), "bakery_door");
|
|
|
|
public static final Item diamond_door = register(new TallBlockItem(UBlocks.diamond_door, new Item.Settings().group(ItemGroup.REDSTONE)), "diamond_door");
|
2019-03-08 21:55:27 +01:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item sugar_block = register(new BlockItem(UBlocks.sugar_block, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "sugar_block");
|
|
|
|
|
|
|
|
public static final Item cloud_slab = new PredicatedBlockItem(UBlocks.cloud_slab, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS), INTERACT_WITH_CLOUDS);
|
|
|
|
public static final Item enchanted_cloud_slab = new PredicatedBlockItem(UBlocks.enchanted_cloud_slab, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS), INTERACT_WITH_CLOUDS);
|
|
|
|
public static final Item packed_cloud_slab = new PredicatedBlockItem(UBlocks.packed_cloud_slab, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS), INTERACT_WITH_CLOUDS);
|
2018-09-16 00:45:44 +02:00
|
|
|
|
2018-09-20 22:49:10 +02:00
|
|
|
public static final ItemSpell spell = new ItemSpell(Unicopia.MODID, "gem");
|
|
|
|
public static final ItemSpell curse = new ItemCurse(Unicopia.MODID, "corrupted_gem");
|
2018-09-19 09:07:39 +02:00
|
|
|
|
|
|
|
public static final ItemOfHolding bag_of_holding = new ItemOfHolding(Unicopia.MODID, "bag_of_holding");
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final ItemAlicornAmulet alicorn_amulet = new ItemAlicornAmulet(Unicopia.MODID, "alicorn_amulet");
|
2018-09-19 09:07:39 +02:00
|
|
|
|
2019-01-10 10:35:15 +01:00
|
|
|
public static final ItemSpellbook spellbook = new ItemSpellbook(Unicopia.MODID, "spellbook");
|
2019-02-14 18:11:28 +01:00
|
|
|
public static final Item staff_meadow_brook = new ItemStaff(Unicopia.MODID, "staff_meadow_brook").setMaxDamage(2);
|
2019-03-11 19:50:06 +01:00
|
|
|
public static final Item staff_remembrance = new ItemMagicStaff(Unicopia.MODID, "staff_remembrance", new SpellScorch());
|
2019-02-14 18:11:28 +01:00
|
|
|
|
2019-04-09 13:45:36 +02:00
|
|
|
public static final Item spear = new ItemSpear(Unicopia.MODID, "spear");
|
|
|
|
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final ItemMoss moss = new ItemMoss(Unicopia.MODID, "moss");
|
2019-01-10 10:35:15 +01:00
|
|
|
|
2018-09-26 20:53:35 +02:00
|
|
|
public static final Item alfalfa_seeds = new ItemSeedFood(1, 4, UBlocks.alfalfa, Blocks.FARMLAND)
|
2018-09-25 23:30:21 +02:00
|
|
|
.setTranslationKey("alfalfa_seeds")
|
2019-01-08 21:23:22 +01:00
|
|
|
.setRegistryName(Unicopia.MODID, "alfalfa_seeds")
|
|
|
|
.setCreativeTab(CreativeTabs.MATERIALS);
|
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item enchanted_torch = register(new BlockItem(UBlocks.enchanted_torch), "enchanted_torch");
|
2018-09-25 23:30:21 +02:00
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
public static final Item alfalfa_leaves = new FoodItem(1, 3, false)
|
2018-09-26 20:53:35 +02:00
|
|
|
.setTranslationKey("alfalfa_leaves")
|
|
|
|
.setRegistryName(Unicopia.MODID, "alfalfa_leaves");
|
|
|
|
|
2019-01-22 17:39:30 +01:00
|
|
|
public static final Item cereal = new ItemCereal(Unicopia.MODID, "cereal", 9, 0.8F).setSugarAmount(1);
|
|
|
|
public static final Item sugar_cereal = new ItemCereal(Unicopia.MODID, "sugar_cereal", 20, -2).setSugarAmount(110).setAlwaysEdible();
|
2019-01-09 14:29:08 +01:00
|
|
|
|
2019-01-06 22:31:34 +01:00
|
|
|
public static final ItemTomato tomato = new ItemTomato(Unicopia.MODID, "tomato", 4, 34);
|
2019-03-20 21:37:49 +01:00
|
|
|
public static final ItemRottenTomato rotten_tomato = new ItemRottenTomato(Unicopia.MODID, "rotten_tomato", 4, 34);
|
|
|
|
|
2019-01-06 22:31:34 +01:00
|
|
|
public static final ItemTomato cloudsdale_tomato = new ItemTomato(Unicopia.MODID, "cloudsdale_tomato", 16, 4);
|
2019-03-20 21:37:49 +01:00
|
|
|
public static final ItemRottenTomato rotten_cloudsdale_tomato = new ItemRottenTomato(Unicopia.MODID, "rotten_cloudsdale_tomato", 4, 34);
|
|
|
|
|
2019-01-08 21:23:22 +01:00
|
|
|
public static final ItemTomatoSeeds tomato_seeds = new ItemTomatoSeeds(Unicopia.MODID, "tomato_seeds");
|
2019-01-06 22:31:34 +01:00
|
|
|
|
2019-01-25 16:22:41 +01:00
|
|
|
public static final Item apple_seeds = new UItemDecoration(UBlocks.apple_tree, Unicopia.MODID, "apple_seeds");
|
|
|
|
|
2019-02-22 19:48:36 +01:00
|
|
|
public static final Item apple_leaves = new ItemFruitLeaves(UBlocks.apple_leaves);
|
2019-01-25 16:22:41 +01:00
|
|
|
|
2019-01-29 12:53:43 +01:00
|
|
|
public static final Item double_plant = new UItemFoodDelegate(Blocks.DOUBLE_PLANT, stack ->
|
|
|
|
BlockDoublePlant.EnumPlantType.byMetadata(stack.getMetadata()).getTranslationKey()
|
2019-02-23 14:23:24 +01:00
|
|
|
).setFoodDelegate(new MultiItemEdible(new BushToxicityDeterminent()))
|
2019-01-29 12:53:43 +01:00
|
|
|
.setTranslationKey("doublePlant");
|
|
|
|
|
2019-01-31 15:34:08 +01:00
|
|
|
public static final Item tall_grass = new UItemFoodDelegate(Blocks.TALLGRASS, stack -> {
|
|
|
|
switch (stack.getMetadata()) {
|
|
|
|
case 0: return "shrub";
|
|
|
|
case 1: return "grass";
|
|
|
|
case 2: return "fern";
|
|
|
|
default: return "";
|
|
|
|
}
|
2019-02-23 14:23:24 +01:00
|
|
|
}).setFoodDelegate(new MultiItemEdible(stack -> {
|
2019-01-31 15:34:08 +01:00
|
|
|
switch (stack.getMetadata()) {
|
|
|
|
default:
|
|
|
|
case 0: return Toxicity.SAFE;
|
|
|
|
case 1: return Toxicity.SAFE;
|
|
|
|
case 2: return Toxicity.SEVERE;
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
|
2019-01-29 12:53:43 +01:00
|
|
|
public static final Item yellow_flower = new UItemFoodDelegate(Blocks.YELLOW_FLOWER, stack ->
|
|
|
|
BlockFlower.EnumFlowerType.getType(BlockFlower.EnumFlowerColor.YELLOW, stack.getMetadata()).getTranslationKey()
|
2019-02-23 14:23:24 +01:00
|
|
|
).setFoodDelegate(new MultiItemEdible(new FlowerToxicityDeterminent(BlockFlower.EnumFlowerColor.YELLOW)))
|
2019-01-29 12:53:43 +01:00
|
|
|
.setTranslationKey("flower");
|
|
|
|
|
|
|
|
public static final Item red_flower = new UItemFoodDelegate(Blocks.RED_FLOWER, stack ->
|
|
|
|
BlockFlower.EnumFlowerType.getType(BlockFlower.EnumFlowerColor.RED, stack.getMetadata()).getTranslationKey()
|
2019-02-23 14:23:24 +01:00
|
|
|
).setFoodDelegate(new MultiItemEdible(new FlowerToxicityDeterminent(BlockFlower.EnumFlowerColor.RED)))
|
2019-01-29 12:53:43 +01:00
|
|
|
.setTranslationKey("rose");
|
|
|
|
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item daffodil_daisy_sandwich = new MultiItemEdible(Unicopia.MODID, "daffodil_daisy_sandwich", 3, 2, CookedToxicityDeterminent.instance)
|
2019-01-31 13:18:27 +01:00
|
|
|
.setHasSubtypes(true);
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item hay_burger = new MultiItemEdible(Unicopia.MODID, "hay_burger", 3, 4, CookedToxicityDeterminent.instance)
|
2019-01-31 13:18:27 +01:00
|
|
|
.setHasSubtypes(true);
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item hay_fries = new MultiItemEdible(Unicopia.MODID, "hay_fries", 1, 5, stack -> Toxicity.SAFE);
|
|
|
|
public static final Item salad = new MultiItemEdible(Unicopia.MODID, "salad", 4, 2, CookedToxicityDeterminent.instance)
|
2019-01-31 13:18:27 +01:00
|
|
|
.setHasSubtypes(true)
|
2019-01-31 10:50:35 +01:00
|
|
|
.setContainerItem(Items.BOWL);
|
2019-01-30 21:17:46 +01:00
|
|
|
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item wheat_worms = new MultiItemEdible(Unicopia.MODID, "wheat_worms", 1, 0, stack -> Toxicity.SEVERE);
|
2019-01-30 21:17:46 +01:00
|
|
|
|
2019-01-31 10:50:35 +01:00
|
|
|
public static final Item mug = new Item()
|
|
|
|
.setTranslationKey("mug")
|
|
|
|
.setRegistryName(Unicopia.MODID, "mug")
|
|
|
|
.setCreativeTab(CreativeTabs.MATERIALS)
|
|
|
|
.setFull3D();
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item apple_cider = new MultiItemEdible(Unicopia.MODID, "apple_cider", 4, 2, stack -> Toxicity.MILD)
|
2019-02-03 18:37:38 +01:00
|
|
|
.setUseAction(EnumAction.DRINK)
|
2019-01-31 10:50:35 +01:00
|
|
|
.setContainerItem(mug)
|
|
|
|
.setFull3D();
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item juice = new MultiItemEdible(Unicopia.MODID, "juice", 2, 2, stack -> Toxicity.SAFE)
|
2019-01-31 13:28:17 +01:00
|
|
|
.setUseAction(EnumAction.DRINK)
|
2019-01-31 10:50:35 +01:00
|
|
|
.setContainerItem(Items.GLASS_BOTTLE);
|
2019-02-23 14:23:24 +01:00
|
|
|
public static final Item burned_juice = new MultiItemEdible(Unicopia.MODID, "burned_juice", 3, 1, stack -> Toxicity.FAIR)
|
2019-01-31 13:28:17 +01:00
|
|
|
.setUseAction(EnumAction.DRINK)
|
2019-01-31 10:50:35 +01:00
|
|
|
.setContainerItem(Items.GLASS_BOTTLE);
|
2019-01-30 21:17:46 +01:00
|
|
|
|
2019-03-16 08:36:51 +01:00
|
|
|
|
2019-01-31 14:57:50 +01:00
|
|
|
static void init(IForgeRegistry<Item> registry) {
|
2019-01-31 10:50:35 +01:00
|
|
|
RegistryLockSpinner.open(Item.REGISTRY, Items.class, r -> r
|
2019-02-07 11:14:41 +01:00
|
|
|
.replace(Items.APPLE, red_apple)
|
2019-01-31 15:34:08 +01:00
|
|
|
.replace(Item.getItemFromBlock(Blocks.TALLGRASS), tall_grass)
|
2019-01-31 10:50:35 +01:00
|
|
|
.replace(Item.getItemFromBlock(Blocks.DOUBLE_PLANT), double_plant)
|
|
|
|
.replace(Item.getItemFromBlock(Blocks.YELLOW_FLOWER), yellow_flower)
|
|
|
|
.replace(Item.getItemFromBlock(Blocks.RED_FLOWER), red_flower));
|
2018-09-12 01:29:49 +02:00
|
|
|
|
2018-09-16 00:45:44 +02:00
|
|
|
if (UClient.isClientSide()) {
|
2020-01-16 12:35:46 +01:00
|
|
|
BuildInTexturesBakery.getBuiltInTextures().add(new Identifier(Unicopia.MODID, "items/empty_slot_gem"));
|
2018-09-16 00:45:44 +02:00
|
|
|
}
|
2019-01-30 21:17:46 +01:00
|
|
|
|
2020-01-16 12:35:46 +01:00
|
|
|
FurnaceRecipes.getInstance().addSmeltingRecipe(new ItemStack(zap_apple), new ItemStack(cooked_zap_apple), 0.1F);
|
|
|
|
FurnaceRecipes.getInstance().addSmeltingRecipe(new ItemStack(juice), new ItemStack(burned_juice), 0);
|
|
|
|
FurnaceRecipes.getInstance().addSmeltingRecipe(new ItemStack(cuccoon), new ItemStack(chitin_shell), 0.3F);
|
2018-09-19 09:07:39 +02:00
|
|
|
}
|
2018-09-20 22:49:10 +02:00
|
|
|
|
2019-02-17 00:08:19 +01:00
|
|
|
public static void fixRecipes() {
|
2019-02-01 17:29:58 +01:00
|
|
|
new OreReplacer()
|
2019-02-07 11:14:41 +01:00
|
|
|
.registerAll(stack -> stack.getItem().getRegistryName().equals(red_apple.getRegistryName()))
|
2019-02-01 17:29:58 +01:00
|
|
|
.done();
|
|
|
|
}
|
|
|
|
|
2020-01-16 16:46:24 +01:00
|
|
|
private static <T extends Item> T register(T item, String namespace, String name) {
|
|
|
|
return Registry.ITEM.add(new Identifier(namespace, name), item);
|
|
|
|
}
|
|
|
|
private static <T extends Item> T register(T item, String name) {
|
|
|
|
return register(item, name);
|
|
|
|
}
|
|
|
|
|
2018-09-20 22:49:10 +02:00
|
|
|
static void registerColors(ItemColors registry) {
|
2020-01-16 16:46:24 +01:00
|
|
|
registry.register((stack, tint) -> {
|
2020-01-16 12:35:46 +01:00
|
|
|
if (MAGI.test(MinecraftClient.getInstance().player)) {
|
2020-01-16 16:46:24 +01:00
|
|
|
return SpellRegistry.instance().getSpellTintFromStack(stack);
|
2018-09-20 22:49:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0xffffff;
|
|
|
|
}, spell, curse);
|
|
|
|
}
|
2018-09-12 01:29:49 +02:00
|
|
|
}
|