From 2d5ceefa393d1dc88cecd9543bd876157af019ad Mon Sep 17 00:00:00 2001 From: brnbrd Date: Sat, 28 Sep 2024 00:15:10 -0700 Subject: [PATCH] Cleanup --- .../net/brnbrd/delightful/Delightful.java | 31 +- src/main/java/net/brnbrd/delightful/Util.java | 209 +-- .../delightful/common/DelightfulConfig.java | 125 +- .../common/block/CantaloupePlantBlock.java | 23 +- .../delightful/common/block/DPieBlock.java | 8 +- .../common/block/DelightfulBlocks.java | 194 +-- .../common/block/DelightfulCabinetBlock.java | 26 +- .../delightful/common/block/ISliceable.java | 7 +- .../delightful/common/block/MiniBlock.java | 29 +- .../common/block/MiniMelonBlock.java | 95 +- .../common/block/SalmonberryBushBlock.java | 188 +-- .../common/block/SlicedGourdBlock.java | 10 +- .../common/block/SlicedMelonBlock.java | 320 ++-- .../common/block/SlicedMiniMelonBlock.java | 312 ++-- .../common/crafting/EnabledCondition.java | 83 +- .../delightful/common/events/ForgeEvents.java | 18 +- .../delightful/common/events/KnifeEvents.java | 4 +- .../delightful/common/events/ModEvents.java | 209 ++- .../common/events/pie/PieEvents.java | 58 +- .../delightful/common/events/pie/Pies.java | 13 +- .../common/fluid/DelightfulFluids.java | 29 +- .../delightful/common/fluid/TeaFluidType.java | 4 +- .../common/item/DelightfulItems.java | 358 ++--- .../common/item/DelightfulTiers.java | 232 +-- .../common/item/FurnaceFuelItem.java | 96 +- .../delightful/common/item/ICompat.java | 10 +- .../delightful/common/item/IConfigured.java | 28 +- .../delightful/common/item/TagItem.java | 5 +- .../common/item/food/CheeseburgerItem.java | 4 +- .../item/food/CompatConsumableItem.java | 4 +- .../common/item/food/DrinkItem.java | 68 +- .../common/item/food/EnderNectarItem.java | 38 +- .../common/item/food/GreenTeaLeavesItem.java | 4 +- .../common/item/food/IceCreamItem.java | 6 +- .../common/item/food/JamJarItem.java | 4 +- .../common/item/food/NutButterBottleItem.java | 4 +- .../common/item/food/Nutrition.java | 216 +-- .../common/item/food/PumpkinPieSliceItem.java | 4 +- .../common/item/knife/CompatKnifeItem.java | 89 +- .../item/knife/DelightfulKnifeItem.java | 139 +- .../delightful/common/item/knife/Knives.java | 70 +- .../GildedNetheriteKnifeItem.java | 6 +- .../RoseGoldKnifeItem.java | 6 +- .../item/knife/compat/ae2/FluixKnifeItem.java | 6 +- .../knife/compat/aether/AetherKnifeItem.java | 4 +- .../knife/compat/aether/ZaniteKnifeItem.java | 4 +- .../aether_redux/VeridiumKnifeItem.java | 118 +- .../allthemodium/AllthemodiumKnifeItem.java | 4 +- .../compat/botania/ManasteelKnifeItem.java | 18 +- .../knife/compat/botania/TerraKnifeItem.java | 26 +- .../compat/create_sa/BlazingKnifeItem.java | 6 +- .../compat/create_sa/ExperienceKnifeItem.java | 6 +- .../deep_aether/DummyStratusKnifeItem.java | 7 +- .../compat/deeperdarker/WardenKnifeItem.java | 6 +- .../compat/lolenderite/EnderiteKnifeItem.java | 6 +- .../ObsdianInfusedEnderiteKnifeItem.java | 6 +- .../compat/mythicbotany/AlfKnifeItem.java | 12 +- .../compat/mythicbotany/AlfsteelTier.java | 3 +- .../nethers_exoticism/KiwanoKnifeItem.java | 2 +- .../nourished_nether/NecroniumKnifeItem.java | 4 +- .../NetheriteOpalKnifeItem.java | 4 +- .../knife/compat/seeds/LeafKnifeItem.java | 2 +- .../compat/twilightforest/FieryKnifeItem.java | 52 +- .../twilightforest/IronwoodKnifeItem.java | 32 +- .../twilightforest/KnightmetalKnifeItem.java | 4 +- .../twilightforest/SteeleafKnifeItem.java | 32 +- .../compat/undergarden/CloggrumKnifeItem.java | 4 +- .../undergarden/ForgottenKnifeItem.java | 29 +- .../undergarden/FroststeelKnifeItem.java | 10 +- .../compat/undergarden/UtheriumKnifeItem.java | 12 +- .../common/loot/AddItemLootModifier.java | 80 +- .../loot/CompatAddItemLootModifier.java | 16 +- .../loot/DelightfulLootItemConditions.java | 8 +- .../loot/LootItemBlockIsTagCondition.java | 3 +- .../common/loot/LootItemEnabledCondition.java | 3 +- .../loot/LootItemModLoadedCondition.java | 3 +- .../common/loot/SmeltLootModifier.java | 66 +- .../delightful/compat/AetherReduxCompat.java | 3 +- .../compat/AppleSkinEventHandler.java | 4 +- .../delightful/compat/ArsNouveauCompat.java | 2 +- .../brnbrd/delightful/compat/BWGCompat.java | 12 +- .../delightful/compat/BotaniaCompat.java | 20 +- .../brnbrd/delightful/compat/BotaniaLCP.java | 10 +- .../delightful/compat/DeepAetherCompat.java | 6 +- .../brnbrd/delightful/compat/JEIPlugin.java | 183 ++- .../net/brnbrd/delightful/compat/Mods.java | 4 +- .../delightful/compat/UndergardenCompat.java | 11 +- .../delightful/compat/jade/DCropProgress.java | 16 +- .../compat/jade/DMushroomColonyAge.java | 6 +- .../compat/nuggets/ISupportNuggets.java | 38 +- .../delightful/compat/nuggets/Nugget.java | 68 +- .../gen/DelightfulAdvancementProvider.java | 60 +- .../data/gen/DelightfulBlockLoot.java | 335 ++-- .../gen/DelightfulBlockStateProvider.java | 460 +++--- .../data/gen/DelightfulBlockTagProvider.java | 130 +- .../data/gen/DelightfulEntityTagProvider.java | 218 +-- .../data/gen/DelightfulItemModelProvider.java | 90 +- .../data/gen/DelightfulItemTagProvider.java | 740 ++++----- .../data/gen/DelightfulLanguageProvider.java | 264 ++-- .../gen/DelightfulLootModifierProvider.java | 147 +- .../data/gen/DelightfulRecipeProvider.java | 1400 ++++++++--------- .../delightful/data/gen/Generators.java | 46 +- .../data/tags/DelightfulEntityTags.java | 6 +- .../delightful/network/DPacketHandler.java | 20 +- .../brnbrd/delightful/proxy/ClientProxy.java | 26 +- .../brnbrd/delightful/proxy/CommonProxy.java | 36 +- .../models/block/cantaloupe_plant_stage0.json | 499 +++++- .../models/block/cantaloupe_plant_stage1.json | 499 +++++- .../models/block/cantaloupe_plant_stage2.json | 498 +++++- .../models/block/cantaloupe_plant_stage3.json | 499 +++++- .../stuffed_cantaloupe_block_stage0.json | 415 ++++- .../stuffed_cantaloupe_block_stage1.json | 283 +++- .../stuffed_cantaloupe_block_stage2.json | 283 +++- .../stuffed_cantaloupe_block_stage3.json | 287 +++- .../recipes/honeyed_apple.json | 2 +- .../recipes/cutting/cooked_crab.json | 4 +- src/main/resources/pack.mcmeta | 10 +- 117 files changed, 6898 insertions(+), 4726 deletions(-) diff --git a/src/main/java/net/brnbrd/delightful/Delightful.java b/src/main/java/net/brnbrd/delightful/Delightful.java index 2aadd5b1..16ec1be6 100644 --- a/src/main/java/net/brnbrd/delightful/Delightful.java +++ b/src/main/java/net/brnbrd/delightful/Delightful.java @@ -11,21 +11,20 @@ import org.apache.logging.log4j.Logger; @Mod(Delightful.MODID) -public class Delightful -{ - public static final String MODID = "delightful"; - public static Delightful instance; - public static CommonProxy proxy; - private static final Logger LOGGER = LogManager.getLogger(); +public class Delightful { + public static final String MODID = "delightful"; + private static final Logger LOGGER = LogManager.getLogger(); + public static Delightful instance; + public static CommonProxy proxy; - public Delightful() { - instance = this; - proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new); - proxy.start(); - ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, DelightfulConfig.SPEC); - } + public Delightful() { + instance = this; + proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new); + proxy.start(); + ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, DelightfulConfig.SPEC); + } - public static Logger getLogger() { - return LOGGER; - } -} + public static Logger getLogger() { + return LOGGER; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/Util.java b/src/main/java/net/brnbrd/delightful/Util.java index 117121f0..5885f2bf 100644 --- a/src/main/java/net/brnbrd/delightful/Util.java +++ b/src/main/java/net/brnbrd/delightful/Util.java @@ -22,111 +22,114 @@ import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; import org.jetbrains.annotations.Nullable; - import java.util.Objects; import java.util.function.Supplier; public class Util { - public static final String LOADER = "forge"; - - public static ResourceLocation rl(String modid, String path) { - return new ResourceLocation(modid, path); - } - - public static ResourceLocation rl(String separated) { - return new ResourceLocation(separated); - } - - public static TagKey it(String modid, String path) { - return ItemTags.create(rl(modid, path)); - } - - public static TagKey> et(String modid, String path) { - return TagKey.create(Registries.ENTITY_TYPE, rl(modid, path)); - } - - public static ObjectArrayList with(ObjectArrayList before, ItemStack addition) { - before.add(addition); - return before; - } - - @Nullable public static Item item(String modid, String path) { - return item(rl(modid, path)); - } - - @Nullable public static Item item(ResourceLocation rl) { - if (ForgeRegistries.ITEMS.containsKey(rl)) { - return ForgeRegistries.ITEMS.getValue(rl); - } - return null; - } - - @Nullable public static Block block(String modid, String path) { - return block(rl(modid, path)); - } - - @Nullable public static Block block(ResourceLocation rl) { - return ForgeRegistries.BLOCKS.getValue(rl); - } - - public static ItemStack gs(RegistryObject r, int count) { - return new ItemStack(r.get(), count); - } - - public static ItemStack gs(RegistryObject r) { - return gs(r, 1); - } - - public static String name(Item item) { - return (ForgeRegistries.ITEMS.containsValue(item)) ? - Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)).getPath() : ""; - } - - public static String name(Block block) { - return (ForgeRegistries.BLOCKS.containsValue(block)) ? - Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath() : ""; - } - - public static String name(RegistryObject reg) { - return reg.getId().getPath(); - } - - public static Ingredient ing(Supplier i) { - return Ingredient.of(i.get()); - } - - public static ItemStack enchant(ItemStack stack, Enchantment enchantment, int level) { - ItemStack enchanted = stack.copy(); - enchanted.enchant(enchantment, level); - return enchanted; - } - - public static void dropOrGive(ItemStack stack, Level world, BlockPos drop, Player give) { - if (DelightfulConfig.GIVE_SLICED_DIRECTLY.get()) { - ItemHandlerHelper.giveItemToPlayer(give, stack, 0); - } else { - Containers.dropItemStack(world, drop.getX(), drop.getY() + 0.25F, drop.getZ(), stack); - } - } - - public static boolean hasTagString(ItemStack stack, String key, String value) { - if (stack.hasTag()) { - CompoundTag tag = stack.getTag(); - return tag != null && tag.contains(key) && tag.getString(key).equals(value); - } - return false; - } - - public static boolean enabled(String item) { - return DelightfulConfig.CONFIG.verify(item); - } - - public static boolean enabled(RegistryObject item) { - return enabled(item.getId().getPath()); - } - - public static boolean enabled(Item item) { - return enabled(Util.name(item)); - } -} + public static final String LOADER = "forge"; + + public static ResourceLocation rl(String modid, String path) { + return new ResourceLocation(modid, path); + } + + public static ResourceLocation rl(String separated) { + return new ResourceLocation(separated); + } + + public static TagKey it(String modid, String path) { + return ItemTags.create(rl(modid, path)); + } + + public static TagKey> et(String modid, String path) { + return TagKey.create(Registries.ENTITY_TYPE, rl(modid, path)); + } + + public static ObjectArrayList with(ObjectArrayList before, ItemStack addition) { + before.add(addition); + return before; + } + + @Nullable + public static Item item(String modid, String path) { + return item(rl(modid, path)); + } + + @Nullable + public static Item item(ResourceLocation rl) { + if (ForgeRegistries.ITEMS.containsKey(rl)) { + return ForgeRegistries.ITEMS.getValue(rl); + } + return null; + } + + @Nullable + public static Block block(String modid, String path) { + return block(rl(modid, path)); + } + + @Nullable + public static Block block(ResourceLocation rl) { + return ForgeRegistries.BLOCKS.getValue(rl); + } + + public static ItemStack gs(RegistryObject r, int count) { + return new ItemStack(r.get(), count); + } + + public static ItemStack gs(RegistryObject r) { + return gs(r, 1); + } + + public static String name(Item item) { + return (ForgeRegistries.ITEMS.containsValue(item)) ? + Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)).getPath() : ""; + } + + public static String name(Block block) { + return (ForgeRegistries.BLOCKS.containsValue(block)) ? + Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath() : ""; + } + + public static String name(RegistryObject reg) { + return reg.getId().getPath(); + } + + public static Ingredient ing(Supplier i) { + return Ingredient.of(i.get()); + } + + public static ItemStack enchant(ItemStack stack, Enchantment enchantment, int level) { + ItemStack enchanted = stack.copy(); + enchanted.enchant(enchantment, level); + return enchanted; + } + + public static void dropOrGive(ItemStack stack, Level world, BlockPos drop, Player give) { + if (DelightfulConfig.GIVE_SLICED_DIRECTLY.get()) { + ItemHandlerHelper.giveItemToPlayer(give, stack, 0); + } else { + Containers.dropItemStack(world, drop.getX(), drop.getY() + 0.25F, drop.getZ(), stack); + } + } + + public static boolean hasTagString(ItemStack stack, String key, String value) { + if (stack.hasTag()) { + CompoundTag tag = stack.getTag(); + return tag != null && tag.contains(key) && tag.getString(key).equals(value); + } + return false; + } + + public static boolean enabled(String item) { + return DelightfulConfig.CONFIG.verify(item); + } + + public static boolean enabled(RegistryObject item) { + return enabled(item.getId().getPath()); + } + + public static boolean enabled(Item item) { + return enabled(Util.name(item)); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/DelightfulConfig.java b/src/main/java/net/brnbrd/delightful/common/DelightfulConfig.java index 47767111..d7c67554 100644 --- a/src/main/java/net/brnbrd/delightful/common/DelightfulConfig.java +++ b/src/main/java/net/brnbrd/delightful/common/DelightfulConfig.java @@ -11,70 +11,71 @@ public class DelightfulConfig { - public static final DelightfulConfig CONFIG; - public static final ForgeConfigSpec SPEC; - private final Map stuff = new HashMap<>(); - public static ForgeConfigSpec.BooleanValue CRAFT_NUT_MILK; - public static ForgeConfigSpec.BooleanValue COOK_CLOVER_HONEY; - public static ForgeConfigSpec.BooleanValue GIVE_SLICED_DIRECTLY; - public static ForgeConfigSpec.BooleanValue MELON_JUICING; - private static final ImmutableList DEFAULT_DISABLED = ImmutableList.of( - Util.name(Knives.COPPER), - Util.name(Knives.AMETHYST), - Util.name(Knives.EMERALD), - Util.name(Knives.LAPIS_LAZULI) - ); + public static final DelightfulConfig CONFIG; + public static final ForgeConfigSpec SPEC; + private static final ImmutableList DEFAULT_DISABLED = ImmutableList.of( + Util.name(Knives.COPPER), + Util.name(Knives.AMETHYST), + Util.name(Knives.EMERALD), + Util.name(Knives.LAPIS_LAZULI) + ); + public static ForgeConfigSpec.BooleanValue CRAFT_NUT_MILK; + public static ForgeConfigSpec.BooleanValue COOK_CLOVER_HONEY; + public static ForgeConfigSpec.BooleanValue GIVE_SLICED_DIRECTLY; + public static ForgeConfigSpec.BooleanValue MELON_JUICING; - DelightfulConfig(ForgeConfigSpec.Builder builder) { - List items = DelightfulItems.ITEMS.getEntries().stream() - .map(obj -> obj.getId().getPath()) - .sorted() - .toList(); - builder.comment(" Let's Configure Delightful"); - stuff.clear(); - builder.push("Knives"); - items.stream() - .filter(path -> path.contains("_knife")) - .forEach(knife -> put(builder, stuff, knife, !DEFAULT_DISABLED.contains(knife))); - builder.pop(); - builder.push("Pie Overhauls"); - items.stream() - .filter(path -> path.contains("_pie_slice")) - .forEach(knife -> put(builder, stuff, knife, !DEFAULT_DISABLED.contains(knife))); - builder.pop(); - builder.push("Registry & Recipes"); - items.stream() - .filter(path -> !path.contains("_knife") && !path.contains("_pie_slice")) - .forEach(not -> put(builder, stuff, not, !DEFAULT_DISABLED.contains(not))); - CRAFT_NUT_MILK = builder - .comment("Allow cooking milk from nuts") - .define("nut_milk", true); - stuff.put("nut_milk", CRAFT_NUT_MILK); - COOK_CLOVER_HONEY = builder - .comment("Allow cooking honey from honey and clovers") - .define("clover_honey", false); - stuff.put("clover_honey", COOK_CLOVER_HONEY); - GIVE_SLICED_DIRECTLY = builder - .comment("Give items that are sliced off of blocks directly to player's inventory instead of dropping") - .define("give_sliced_directly", false); - MELON_JUICING = builder - .comment("Allow sliced melons to be juiced in-world (right click)") - .define("melon_juicing", true); - builder.pop(); - } + static { + var pair = new ForgeConfigSpec.Builder().configure(DelightfulConfig::new); + SPEC = pair.getRight(); + CONFIG = pair.getLeft(); + } - private static void put(ForgeConfigSpec.Builder builder, Map map, String name, boolean def) { - map.put(name, builder.define(name, def)); - } + private final Map stuff = new HashMap<>(); - public boolean verify(String item) { - return CONFIG.stuff.containsKey(item) ? - CONFIG.stuff.get(item).get() : false; - } + DelightfulConfig(ForgeConfigSpec.Builder builder) { + List items = DelightfulItems.ITEMS.getEntries().stream() + .map(obj -> obj.getId().getPath()) + .sorted() + .toList(); + builder.comment(" Let's Configure Delightful"); + stuff.clear(); + builder.push("Knives"); + items.stream() + .filter(path -> path.contains("_knife")) + .forEach(knife -> put(builder, stuff, knife, !DEFAULT_DISABLED.contains(knife))); + builder.pop(); + builder.push("Pie Overhauls"); + items.stream() + .filter(path -> path.contains("_pie_slice")) + .forEach(knife -> put(builder, stuff, knife, !DEFAULT_DISABLED.contains(knife))); + builder.pop(); + builder.push("Registry & Recipes"); + items.stream() + .filter(path -> !path.contains("_knife") && !path.contains("_pie_slice")) + .forEach(not -> put(builder, stuff, not, !DEFAULT_DISABLED.contains(not))); + CRAFT_NUT_MILK = builder + .comment("Allow cooking milk from nuts") + .define("nut_milk", true); + stuff.put("nut_milk", CRAFT_NUT_MILK); + COOK_CLOVER_HONEY = builder + .comment("Allow cooking honey from honey and clovers") + .define("clover_honey", false); + stuff.put("clover_honey", COOK_CLOVER_HONEY); + GIVE_SLICED_DIRECTLY = builder + .comment("Give items that are sliced off of blocks directly to player's inventory instead of dropping") + .define("give_sliced_directly", false); + MELON_JUICING = builder + .comment("Allow sliced melons to be juiced in-world (right click)") + .define("melon_juicing", true); + builder.pop(); + } - static { - var pair = new ForgeConfigSpec.Builder().configure(DelightfulConfig::new); - SPEC = pair.getRight(); - CONFIG = pair.getLeft(); - } + private static void put(ForgeConfigSpec.Builder builder, Map map, String name, boolean def) { + map.put(name, builder.define(name, def)); + } + + public boolean verify(String item) { + return CONFIG.stuff.containsKey(item) ? + CONFIG.stuff.get(item).get() : false; + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/CantaloupePlantBlock.java b/src/main/java/net/brnbrd/delightful/common/block/CantaloupePlantBlock.java index 203e7f6f..a72e2395 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/CantaloupePlantBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/CantaloupePlantBlock.java @@ -17,7 +17,10 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.BushBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; @@ -36,10 +39,10 @@ public class CantaloupePlantBlock extends BushBlock implements BonemealableBlock public static final int MAX_AGE = 3; public static final IntegerProperty AGE = BlockStateProperties.AGE_3; private static final VoxelShape[] SHAPE_BY_AGE = new VoxelShape[]{ - Block.box(3.0D, 0.0D, 3.0D, 13.0D, 2.0D, 13.0D), - Block.box(2.0D, 0.0D, 2.0D, 14.0D, 5.0D, 14.0D), - Block.box(0.0D, 0.0D, 0.0D, 16.0D, 6.0D, 16.0D), - Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D) + Block.box(3.0D, 0.0D, 3.0D, 13.0D, 2.0D, 13.0D), + Block.box(2.0D, 0.0D, 2.0D, 14.0D, 5.0D, 14.0D), + Block.box(0.0D, 0.0D, 0.0D, 16.0D, 6.0D, 16.0D), + Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D) }; public CantaloupePlantBlock(BlockBehaviour.Properties pProperties) { @@ -81,9 +84,9 @@ public boolean isRandomlyTicking(@NotNull BlockState state) { public void randomTick(BlockState pState, @NotNull ServerLevel pLevel, @NotNull BlockPos pPos, @NotNull RandomSource pRandom) { int i = pState.getValue(AGE); if ( - i < MAX_AGE && - pLevel.getRawBrightness(pPos.above(), 0) >= 8 && - ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(16) == 0) + i < MAX_AGE && + pLevel.getRawBrightness(pPos.above(), 0) >= 8 && + ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(16) == 0) ) { BlockState blockstate = pState.setValue(AGE, i + 1); pLevel.setBlock(pPos, blockstate, 2); @@ -102,8 +105,8 @@ public boolean canSurvive(@NotNull BlockState pState, LevelReader pLevel, BlockP BlockPos blockpos = pPos.below(); for (Direction direction : Direction.Plane.HORIZONTAL) { if ( - pState.canBeHydrated(pLevel, pPos, pLevel.getFluidState(blockpos.relative(direction)), blockpos.relative(direction)) || - pLevel.getBlockState(blockpos.relative(direction)).is(Blocks.FROSTED_ICE) + pState.canBeHydrated(pLevel, pPos, pLevel.getFluidState(blockpos.relative(direction)), blockpos.relative(direction)) || + pLevel.getBlockState(blockpos.relative(direction)).is(Blocks.FROSTED_ICE) ) { return true; } diff --git a/src/main/java/net/brnbrd/delightful/common/block/DPieBlock.java b/src/main/java/net/brnbrd/delightful/common/block/DPieBlock.java index ef4c5a30..b5f5a2d6 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/DPieBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/DPieBlock.java @@ -1,7 +1,5 @@ package net.brnbrd.delightful.common.block; -import java.util.Objects; -import java.util.function.Supplier; import net.minecraft.core.BlockPos; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; @@ -12,9 +10,11 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.HitResult; import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.NotNull; import vectorwing.farmersdelight.common.block.PieBlock; import vectorwing.farmersdelight.common.registry.ModBlocks; -import org.jetbrains.annotations.NotNull; +import java.util.Objects; +import java.util.function.Supplier; public class DPieBlock extends PieBlock { private final ResourceLocation pie; @@ -44,4 +44,4 @@ public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGett ItemStack stack = this.getStack(); return !stack.isEmpty() ? stack : super.getCloneItemStack(state, target, level, pos, player); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/DelightfulBlocks.java b/src/main/java/net/brnbrd/delightful/common/block/DelightfulBlocks.java index 662efe71..8520b46c 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/DelightfulBlocks.java +++ b/src/main/java/net/brnbrd/delightful/common/block/DelightfulBlocks.java @@ -8,7 +8,9 @@ import net.minecraft.core.cauldron.CauldronInteraction; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.MapColor; import net.minecraft.world.level.material.PushReaction; @@ -25,102 +27,102 @@ public class DelightfulBlocks { - public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Delightful.MODID); + public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Delightful.MODID); - public static final RegistryObject QUARTZ_CABINET = registerBlock("quartz_cabinet", - () -> new DelightfulCabinetBlock(DelightfulItems.getGem("quartz"), Block.Properties.copy(Blocks.QUARTZ_BLOCK).requiresCorrectToolForDrops().strength(0.8F))); - public static final RegistryObject BASALT_CABINET = registerBlock("basalt_cabinet", - () -> new DelightfulCabinetBlock(Ingredient.of(Items.BASALT), Block.Properties.copy(Blocks.BASALT).requiresCorrectToolForDrops().strength(1.25F, 4.2F).sound(SoundType.BASALT))); - public static final RegistryObject WILD_SALMONBERRIES = BLOCKS.register("wild_salmonberries", - WildSalmonberriesBlock::new); - public static final RegistryObject SALMONBERRY_BUSH = BLOCKS.register("salmonberry_bush", () -> new SalmonberryBushBlock(Block.Properties.copy(Blocks.SWEET_BERRY_BUSH).randomTicks().noCollission().sound(SoundType.SWEET_BERRY_BUSH))); - public static final RegistryObject MINI_MELON = BLOCKS.register("mini_melon", - () -> new MiniMelonBlock(Block.Properties.copy(Blocks.MELON).noOcclusion())); - public static final RegistryObject SLICED_MINI_MELON = BLOCKS.register("sliced_mini_melon", - () -> new SlicedMiniMelonBlock(Block.Properties.copy(MINI_MELON.get()).noOcclusion(), () -> Items.MELON_SLICE, ModItems.MELON_JUICE)); - public static final RegistryObject CANTALOUPE = BLOCKS.register("cantaloupe", - () -> new CantaloupeBlock(Block.Properties.copy(MINI_MELON.get()).noOcclusion())); - public static final RegistryObject SLICED_CANTALOUPE = BLOCKS.register("sliced_cantaloupe", - () -> new SlicedMiniMelonBlock(Block.Properties.copy(SLICED_MINI_MELON.get()).noOcclusion(), DelightfulItems.CANTALOUPE_SLICE, null)); - public static final RegistryObject CANTALOUPE_PLANT = BLOCKS.register("cantaloupe_plant", - () -> new CantaloupePlantBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP).pushReaction(PushReaction.DESTROY))); - public static final RegistryObject STUFFED_CANTALOUPE_BLOCK = BLOCKS.register("stuffed_cantaloupe_block", () -> - new FeastBlock(BlockBehaviour.Properties.copy(DelightfulBlocks.CANTALOUPE.get()), DelightfulItems.STUFFED_CANTALOUPE, false)); - public static final RegistryObject SLICED_MELON = BLOCKS.register("sliced_melon", - () -> new SlicedMelonBlock(Block.Properties.copy(Blocks.MELON), () -> Items.MELON_SLICE, ModItems.MELON_JUICE)); - public static final RegistryObject SLICED_PUMPKIN = BLOCKS.register("sliced_pumpkin", () -> new SlicedGourdBlock( - Block.Properties.copy(Blocks.PUMPKIN), - ModItems.PUMPKIN_SLICE, - () -> Blocks.PUMPKIN_STEM, - () -> Blocks.ATTACHED_PUMPKIN_STEM) - ); - public static final RegistryObject SLICED_GLOOMGOURD = BLOCKS.register("sliced_gloomgourd", - Mods.loaded(Mods.UG) ? () -> new SlicedGourdBlock( - Block.Properties.copy(UndergardenCompat.gloomgourd().get()), - UndergardenCompat.gloomgourd_slice(), - UndergardenCompat.gloomgourd_stem(), - UndergardenCompat.gloomgourd_attached_stem() - ) : () -> new SlicedGourdBlock( - Block.Properties.copy(Blocks.PUMPKIN), - ModItems.PUMPKIN_SLICE, - () -> Blocks.PUMPKIN_STEM, - () -> Blocks.ATTACHED_PUMPKIN_STEM - ) - ); - public static final RegistryObject SALMONBERRY_SACK = BLOCKS.register("salmonberry_sack", - () -> new Block(Block.Properties.copy(Blocks.ORANGE_WOOL).strength(.5f).sound(SoundType.WOOL))); - public static final RegistryObject SALMONBERRY_PIE = BLOCKS.register("salmonberry_pie", - () -> new PieBlock(Block.Properties.copy(ModBlocks.APPLE_PIE.get()), DelightfulItems.SALMONBERRY_PIE_SLICE)); - public static final RegistryObject PUMPKIN_PIE = BLOCKS.register("pumpkin_pie", - () -> new DPieBlock(DelightfulItems.PUMPKIN_PIE_SLICE, Util.rl("minecraft", "pumpkin_pie"))); - public static final RegistryObject SOURCE_BERRY_PIE = BLOCKS.register("source_berry_pie", - () -> new DPieBlock(DelightfulItems.SOURCE_BERRY_PIE_SLICE, Util.rl(Mods.AN, "source_berry_pie"))); - public static final RegistryObject GLOOMGOURD_PIE = BLOCKS.register("gloomgourd_pie", - () -> new DPieBlock(DelightfulItems.GLOOMGOURD_PIE_SLICE, Util.rl(Mods.UG, "gloomgourd_pie"))); - public static final RegistryObject BLUEBERRY_PIE = BLOCKS.register("blueberry_pie", - () -> new DPieBlock(DelightfulItems.BLUEBERRY_PIE_SLICE, Util.rl(Mods.BWG, "blueberry_pie"))); - public static final RegistryObject GREEN_APPLE_PIE = BLOCKS.register("green_apple_pie", - () -> new DPieBlock(DelightfulItems.GREEN_APPLE_PIE_SLICE, Util.rl(Mods.BWG, "green_apple_pie"))); - public static final RegistryObject ACORN_SACK = BLOCKS.register("acorn_sack", - () -> new Block(Block.Properties.copy(Blocks.BROWN_WOOL).strength(.5f).sound(SoundType.WOOL))); - public static final RegistryObject SALMONBERRY_ICE_CREAM_BLOCK = BLOCKS.register("salmonberry_ice_cream_block", - () -> new Block(Block.Properties.copy(Blocks.SNOW_BLOCK).mapColor(MapColor.COLOR_ORANGE).strength(0.2F).sound(SoundType.SNOW))); - public static final RegistryObject MATCHA_ICE_CREAM_BLOCK = BLOCKS.register("matcha_ice_cream_block", - () -> new Block(Block.Properties.copy(Blocks.SNOW_BLOCK).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(0.2F).sound(SoundType.SNOW))); - public static final RegistryObject SALMONBERRY_MILKSHAKE_CAULDRON = BLOCKS.register("salmonberry_milkshake_cauldron", - () -> new DelightfulMilkshakeCauldronBlock( - ModList.get().isLoaded(Mods.N) ? - DelightfulCauldronInteractions.SALMONBERRY_MILKSHAKE.map() : - CauldronInteraction.newInteractionMap()) - ); - public static final RegistryObject MATCHA_MILKSHAKE_CAULDRON = BLOCKS.register("matcha_milkshake_cauldron", - () -> new DelightfulMilkshakeCauldronBlock( - ModList.get().isLoaded(Mods.N) ? - DelightfulCauldronInteractions.MATCHA_MILKSHAKE.map() : - CauldronInteraction.newInteractionMap()) - ); - public static final RegistryObject BLUEBERRY_SACK = BLOCKS.register("blueberry_sack", - () -> new Block(Block.Properties.copy(Blocks.BLUE_WOOL).strength(.5f).sound(SoundType.WOOL))); - public static final RegistryObject MENDOSTEEN_CRATE = BLOCKS.register("mendosteen_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject BASTION_FRUIT_CRATE = BLOCKS.register("bastion_fruit_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_PURPLE).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject FROSTAYA_CRATE = BLOCKS.register("frostaya_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_BLUE).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject BOMBEGRANATE_CRATE = BLOCKS.register("bombegranate_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_RED).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject GREEN_APPLE_CRATE = BLOCKS.register("green_apple_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject YUCCA_FRUIT_CRATE = BLOCKS.register("yucca_fruit_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static final RegistryObject BAOBAB_FRUIT_CRATE = BLOCKS.register("baobab_fruit_crate", - () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_YELLOW).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject QUARTZ_CABINET = registerBlock("quartz_cabinet", + () -> new DelightfulCabinetBlock(DelightfulItems.getGem("quartz"), Block.Properties.copy(Blocks.QUARTZ_BLOCK).requiresCorrectToolForDrops().strength(0.8F))); + public static final RegistryObject BASALT_CABINET = registerBlock("basalt_cabinet", + () -> new DelightfulCabinetBlock(Ingredient.of(Items.BASALT), Block.Properties.copy(Blocks.BASALT).requiresCorrectToolForDrops().strength(1.25F, 4.2F).sound(SoundType.BASALT))); + public static final RegistryObject WILD_SALMONBERRIES = BLOCKS.register("wild_salmonberries", + WildSalmonberriesBlock::new); + public static final RegistryObject SALMONBERRY_BUSH = BLOCKS.register("salmonberry_bush", () -> new SalmonberryBushBlock(Block.Properties.copy(Blocks.SWEET_BERRY_BUSH).randomTicks().noCollission().sound(SoundType.SWEET_BERRY_BUSH))); + public static final RegistryObject MINI_MELON = BLOCKS.register("mini_melon", + () -> new MiniMelonBlock(Block.Properties.copy(Blocks.MELON).noOcclusion())); + public static final RegistryObject SLICED_MINI_MELON = BLOCKS.register("sliced_mini_melon", + () -> new SlicedMiniMelonBlock(Block.Properties.copy(MINI_MELON.get()).noOcclusion(), () -> Items.MELON_SLICE, ModItems.MELON_JUICE)); + public static final RegistryObject SLICED_CANTALOUPE = BLOCKS.register("sliced_cantaloupe", + () -> new SlicedMiniMelonBlock(Block.Properties.copy(SLICED_MINI_MELON.get()).noOcclusion(), DelightfulItems.CANTALOUPE_SLICE, null)); + public static final RegistryObject CANTALOUPE = BLOCKS.register("cantaloupe", + () -> new CantaloupeBlock(Block.Properties.copy(MINI_MELON.get()).noOcclusion())); + public static final RegistryObject STUFFED_CANTALOUPE_BLOCK = BLOCKS.register("stuffed_cantaloupe_block", () -> + new FeastBlock(BlockBehaviour.Properties.copy(DelightfulBlocks.CANTALOUPE.get()), DelightfulItems.STUFFED_CANTALOUPE, false)); + public static final RegistryObject CANTALOUPE_PLANT = BLOCKS.register("cantaloupe_plant", + () -> new CantaloupePlantBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP).pushReaction(PushReaction.DESTROY))); + public static final RegistryObject SLICED_MELON = BLOCKS.register("sliced_melon", + () -> new SlicedMelonBlock(Block.Properties.copy(Blocks.MELON), () -> Items.MELON_SLICE, ModItems.MELON_JUICE)); + public static final RegistryObject SLICED_PUMPKIN = BLOCKS.register("sliced_pumpkin", () -> new SlicedGourdBlock( + Block.Properties.copy(Blocks.PUMPKIN), + ModItems.PUMPKIN_SLICE, + () -> Blocks.PUMPKIN_STEM, + () -> Blocks.ATTACHED_PUMPKIN_STEM) + ); + public static final RegistryObject SLICED_GLOOMGOURD = BLOCKS.register("sliced_gloomgourd", + Mods.loaded(Mods.UG) ? () -> new SlicedGourdBlock( + Block.Properties.copy(UndergardenCompat.gloomgourd().get()), + UndergardenCompat.gloomgourd_slice(), + UndergardenCompat.gloomgourd_stem(), + UndergardenCompat.gloomgourd_attached_stem() + ) : () -> new SlicedGourdBlock( + Block.Properties.copy(Blocks.PUMPKIN), + ModItems.PUMPKIN_SLICE, + () -> Blocks.PUMPKIN_STEM, + () -> Blocks.ATTACHED_PUMPKIN_STEM + ) + ); + public static final RegistryObject SALMONBERRY_SACK = BLOCKS.register("salmonberry_sack", + () -> new Block(Block.Properties.copy(Blocks.ORANGE_WOOL).strength(.5f).sound(SoundType.WOOL))); + public static final RegistryObject SALMONBERRY_PIE = BLOCKS.register("salmonberry_pie", + () -> new PieBlock(Block.Properties.copy(ModBlocks.APPLE_PIE.get()), DelightfulItems.SALMONBERRY_PIE_SLICE)); + public static final RegistryObject PUMPKIN_PIE = BLOCKS.register("pumpkin_pie", + () -> new DPieBlock(DelightfulItems.PUMPKIN_PIE_SLICE, Util.rl("minecraft", "pumpkin_pie"))); + public static final RegistryObject SOURCE_BERRY_PIE = BLOCKS.register("source_berry_pie", + () -> new DPieBlock(DelightfulItems.SOURCE_BERRY_PIE_SLICE, Util.rl(Mods.AN, "source_berry_pie"))); + public static final RegistryObject GLOOMGOURD_PIE = BLOCKS.register("gloomgourd_pie", + () -> new DPieBlock(DelightfulItems.GLOOMGOURD_PIE_SLICE, Util.rl(Mods.UG, "gloomgourd_pie"))); + public static final RegistryObject BLUEBERRY_PIE = BLOCKS.register("blueberry_pie", + () -> new DPieBlock(DelightfulItems.BLUEBERRY_PIE_SLICE, Util.rl(Mods.BWG, "blueberry_pie"))); + public static final RegistryObject GREEN_APPLE_PIE = BLOCKS.register("green_apple_pie", + () -> new DPieBlock(DelightfulItems.GREEN_APPLE_PIE_SLICE, Util.rl(Mods.BWG, "green_apple_pie"))); + public static final RegistryObject ACORN_SACK = BLOCKS.register("acorn_sack", + () -> new Block(Block.Properties.copy(Blocks.BROWN_WOOL).strength(.5f).sound(SoundType.WOOL))); + public static final RegistryObject SALMONBERRY_ICE_CREAM_BLOCK = BLOCKS.register("salmonberry_ice_cream_block", + () -> new Block(Block.Properties.copy(Blocks.SNOW_BLOCK).mapColor(MapColor.COLOR_ORANGE).strength(0.2F).sound(SoundType.SNOW))); + public static final RegistryObject MATCHA_ICE_CREAM_BLOCK = BLOCKS.register("matcha_ice_cream_block", + () -> new Block(Block.Properties.copy(Blocks.SNOW_BLOCK).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(0.2F).sound(SoundType.SNOW))); + public static final RegistryObject SALMONBERRY_MILKSHAKE_CAULDRON = BLOCKS.register("salmonberry_milkshake_cauldron", + () -> new DelightfulMilkshakeCauldronBlock( + ModList.get().isLoaded(Mods.N) ? + DelightfulCauldronInteractions.SALMONBERRY_MILKSHAKE.map() : + CauldronInteraction.newInteractionMap()) + ); + public static final RegistryObject MATCHA_MILKSHAKE_CAULDRON = BLOCKS.register("matcha_milkshake_cauldron", + () -> new DelightfulMilkshakeCauldronBlock( + ModList.get().isLoaded(Mods.N) ? + DelightfulCauldronInteractions.MATCHA_MILKSHAKE.map() : + CauldronInteraction.newInteractionMap()) + ); + public static final RegistryObject BLUEBERRY_SACK = BLOCKS.register("blueberry_sack", + () -> new Block(Block.Properties.copy(Blocks.BLUE_WOOL).strength(.5f).sound(SoundType.WOOL))); + public static final RegistryObject MENDOSTEEN_CRATE = BLOCKS.register("mendosteen_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject BASTION_FRUIT_CRATE = BLOCKS.register("bastion_fruit_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_PURPLE).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject FROSTAYA_CRATE = BLOCKS.register("frostaya_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_BLUE).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject BOMBEGRANATE_CRATE = BLOCKS.register("bombegranate_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_RED).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject GREEN_APPLE_CRATE = BLOCKS.register("green_apple_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject YUCCA_FRUIT_CRATE = BLOCKS.register("yucca_fruit_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_LIGHT_GREEN).strength(2.0F, 3.0F).sound(SoundType.WOOD))); + public static final RegistryObject BAOBAB_FRUIT_CRATE = BLOCKS.register("baobab_fruit_crate", + () -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS).mapColor(MapColor.COLOR_YELLOW).strength(2.0F, 3.0F).sound(SoundType.WOOD))); - public static RegistryObject registerBlock(String name, Supplier block) { - return BLOCKS.register(name, block); - } + public static RegistryObject registerBlock(String name, Supplier block) { + return BLOCKS.register(name, block); + } - public static void create(IEventBus bus) { - BLOCKS.register(bus); - } + public static void create(IEventBus bus) { + BLOCKS.register(bus); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/DelightfulCabinetBlock.java b/src/main/java/net/brnbrd/delightful/common/block/DelightfulCabinetBlock.java index ad65989f..efb15542 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/DelightfulCabinetBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/DelightfulCabinetBlock.java @@ -6,19 +6,19 @@ import vectorwing.farmersdelight.common.block.CabinetBlock; public class DelightfulCabinetBlock extends CabinetBlock implements IConfigured { - private final Ingredient ingredient; + private final Ingredient ingredient; - public DelightfulCabinetBlock(Ingredient ingredient, Properties properties) { - super(properties); - this.ingredient = ingredient; - } + public DelightfulCabinetBlock(Ingredient ingredient, Properties properties) { + super(properties); + this.ingredient = ingredient; + } - public Ingredient getIngredient() { - return this.ingredient; - } + public Ingredient getIngredient() { + return this.ingredient; + } - @Override - public boolean enabled() { - return Util.enabled(Util.name(this)); - } -} + @Override + public boolean enabled() { + return Util.enabled(Util.name(this)); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/ISliceable.java b/src/main/java/net/brnbrd/delightful/common/block/ISliceable.java index 4f065e39..4a9051b7 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/ISliceable.java +++ b/src/main/java/net/brnbrd/delightful/common/block/ISliceable.java @@ -5,11 +5,16 @@ public interface ISliceable { IntegerProperty getBitesProperty(); + ItemStack getSliceItem(); + int getMaxBites(); + int getSliceSize(); + float getBaseHeight(); + default float getHeight(int bites) { return this.getBaseHeight() - ((bites - 1) * getSliceSize()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/MiniBlock.java b/src/main/java/net/brnbrd/delightful/common/block/MiniBlock.java index b959a0cb..e023d5a7 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/MiniBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/MiniBlock.java @@ -12,20 +12,21 @@ public class MiniBlock extends MelonBlock { - private static final VoxelShape SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 10.0D, 13.0D); - public MiniBlock(Properties pProperties) { - super(pProperties); - } + private static final VoxelShape SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 10.0D, 13.0D); - @SuppressWarnings("deprecation") - @Override - public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { - return SHAPE; - } + public MiniBlock(Properties pProperties) { + super(pProperties); + } - @SuppressWarnings("deprecation") - @Override - public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { - return Shapes.empty(); - } + @SuppressWarnings("deprecation") + @Override + public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { + return SHAPE; + } + + @SuppressWarnings("deprecation") + @Override + public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { + return Shapes.empty(); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/MiniMelonBlock.java b/src/main/java/net/brnbrd/delightful/common/block/MiniMelonBlock.java index 098d1c4b..f6008e2f 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/MiniMelonBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/MiniMelonBlock.java @@ -9,7 +9,6 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Blocks; @@ -22,55 +21,57 @@ public class MiniMelonBlock extends MiniBlock implements BonemealableBlock { - public MiniMelonBlock(Properties pProperties) { - super(pProperties); - } + public MiniMelonBlock(Properties pProperties) { + super(pProperties); + } - @SuppressWarnings("deprecation") - @Override - public void randomTick(@NotNull BlockState pState, ServerLevel pLevel, @NotNull BlockPos pPos, @NotNull RandomSource pRandom) { - if (!pLevel.isAreaLoaded(pPos, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light - if (pLevel.getRawBrightness(pPos, 0) >= 5 && - pLevel.getBlockState(pPos.below()).is(Blocks.DIRT) && - ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(10) == 0)) { - pLevel.setBlock(pPos, Blocks.MELON.withPropertiesOf(pState), 2); - ForgeHooks.onCropsGrowPost(pLevel, pPos, pState); - } - } + @SuppressWarnings("deprecation") + @Override + public void randomTick(@NotNull BlockState pState, ServerLevel pLevel, @NotNull BlockPos pPos, @NotNull RandomSource pRandom) { + if (!pLevel.isAreaLoaded(pPos, 1)) + return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (pLevel.getRawBrightness(pPos, 0) >= 5 && + pLevel.getBlockState(pPos.below()).is(Blocks.DIRT) && + ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(10) == 0)) { + pLevel.setBlock(pPos, Blocks.MELON.withPropertiesOf(pState), 2); + ForgeHooks.onCropsGrowPost(pLevel, pPos, pState); + } + } - @Override - public boolean isValidBonemealTarget(@NotNull LevelReader pLevel, @NotNull BlockPos pPos, @NotNull BlockState pState, boolean pIsClient) { - return true; - } + @Override + public boolean isValidBonemealTarget(@NotNull LevelReader pLevel, @NotNull BlockPos pPos, @NotNull BlockState pState, boolean pIsClient) { + return true; + } - @Override - public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) { - return true; - } + @Override + public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) { + return true; + } - @SuppressWarnings("deprecation") - @Override - public void performBonemeal(ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) { - if (!level.isAreaLoaded(pos, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light - if (ForgeHooks.onCropsGrowPre(level, pos, state, true)) { - level.setBlock(pos, Blocks.MELON.withPropertiesOf(state), 2); - ForgeHooks.onCropsGrowPost(level, pos, state); - } - } + @SuppressWarnings("deprecation") + @Override + public void performBonemeal(ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) { + if (!level.isAreaLoaded(pos, 1)) + return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (ForgeHooks.onCropsGrowPre(level, pos, state, true)) { + level.setBlock(pos, Blocks.MELON.withPropertiesOf(state), 2); + ForgeHooks.onCropsGrowPost(level, pos, state); + } + } - @SuppressWarnings("deprecation") - @Override - public @NotNull InteractionResult use(@NotNull BlockState pState, @NotNull Level world, @NotNull BlockPos pPos, Player pPlayer, @NotNull InteractionHand pHand, @NotNull BlockHitResult pHit) { - if (pPlayer.getItemInHand(pHand).is(ForgeTags.TOOLS_KNIVES)) { - if (!world.isClientSide()) { - SlicedMiniMelonBlock sliced = (SlicedMiniMelonBlock) DelightfulBlocks.SLICED_MINI_MELON.get(); - world.setBlock(pPos, sliced.defaultBlockState(), 2); - Util.dropOrGive(sliced.getSliceItem(), world, pPos, pPlayer); - world.playSound(null, pPos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); - pPlayer.getItemInHand(pHand).hurtAndBreak(1, pPlayer, onBroken -> onBroken.broadcastBreakEvent(pHand)); - } - return InteractionResult.sidedSuccess(world.isClientSide()); - } - return InteractionResult.FAIL; - } + @SuppressWarnings("deprecation") + @Override + public @NotNull InteractionResult use(@NotNull BlockState pState, @NotNull Level world, @NotNull BlockPos pPos, Player pPlayer, @NotNull InteractionHand pHand, @NotNull BlockHitResult pHit) { + if (pPlayer.getItemInHand(pHand).is(ForgeTags.TOOLS_KNIVES)) { + if (!world.isClientSide()) { + SlicedMiniMelonBlock sliced = (SlicedMiniMelonBlock) DelightfulBlocks.SLICED_MINI_MELON.get(); + world.setBlock(pPos, sliced.defaultBlockState(), 2); + Util.dropOrGive(sliced.getSliceItem(), world, pPos, pPlayer); + world.playSound(null, pPos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); + pPlayer.getItemInHand(pHand).hurtAndBreak(1, pPlayer, onBroken -> onBroken.broadcastBreakEvent(pHand)); + } + return InteractionResult.sidedSuccess(world.isClientSide()); + } + return InteractionResult.FAIL; + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/SalmonberryBushBlock.java b/src/main/java/net/brnbrd/delightful/common/block/SalmonberryBushBlock.java index b0ef0165..ca5ab038 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/SalmonberryBushBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/SalmonberryBushBlock.java @@ -34,109 +34,109 @@ import org.jetbrains.annotations.NotNull; public class SalmonberryBushBlock extends BushBlock implements BonemealableBlock { - public static final int MAX_AGE = 4; - public static final IntegerProperty AGE = BlockStateProperties.AGE_4; - private static final VoxelShape SAPLING_SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 8.0D, 13.0D); - private static final VoxelShape MID_GROWTH_SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); + public static final int MAX_AGE = 4; + public static final IntegerProperty AGE = BlockStateProperties.AGE_4; + private static final VoxelShape SAPLING_SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 8.0D, 13.0D); + private static final VoxelShape MID_GROWTH_SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D); - public SalmonberryBushBlock(BlockBehaviour.Properties pProperties) { - super(pProperties); - this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); - } + public SalmonberryBushBlock(BlockBehaviour.Properties pProperties) { + super(pProperties); + this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } - @Override - public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { - return state.getValue(AGE) <= 2 ? Util.gs(DelightfulItems.SALMONBERRY_PIPS) : DelightfulItems.SALMONBERRIES.get().getDefaultInstance(); - } + @Override + public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { + return state.getValue(AGE) <= 2 ? Util.gs(DelightfulItems.SALMONBERRY_PIPS) : DelightfulItems.SALMONBERRIES.get().getDefaultInstance(); + } - @SuppressWarnings("deprecation") - @Override - public @NotNull VoxelShape getShape(BlockState state, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { - if (state.getValue(AGE) == 0) { - return SAPLING_SHAPE; - } else { - return this.isMaxAge(state) ? super.getShape(state, pLevel, pPos, pContext) : MID_GROWTH_SHAPE; - } - } + @SuppressWarnings("deprecation") + @Override + public @NotNull VoxelShape getShape(BlockState state, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { + if (state.getValue(AGE) == 0) { + return SAPLING_SHAPE; + } else { + return this.isMaxAge(state) ? super.getShape(state, pLevel, pPos, pContext) : MID_GROWTH_SHAPE; + } + } - /** - * @return whether this block needs random ticking. - */ - @Override - public boolean isRandomlyTicking(@NotNull BlockState state) { - return !this.isMaxAge(state); - } + /** + * @return whether this block needs random ticking. + */ + @Override + public boolean isRandomlyTicking(@NotNull BlockState state) { + return !this.isMaxAge(state); + } - /** - * Performs a random tick on a block. - */ - @SuppressWarnings("deprecation") - @Override - public void randomTick(BlockState pState, @NotNull ServerLevel pLevel, @NotNull BlockPos pPos, @NotNull RandomSource pRandom) { - int i = pState.getValue(AGE); - if (i < MAX_AGE && pLevel.getRawBrightness(pPos.above(), 0) >= 8){ - int speed = 20; - Biome biome = pLevel.getBiome(pPos).value(); - if (pLevel.isRainingAt(pPos) && - biome.getPrecipitationAt(pPos) == Biome.Precipitation.RAIN && - biome.warmEnoughToRain(pPos)) { // Hard raining ON the block - speed -= 15; - } else if (pLevel.isRaining()) { // Level just raining - speed -= 12; - } - if (ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(speed) == 0)) { - BlockState blockstate = pState.setValue(AGE, i + 1); - pLevel.setBlock(pPos, blockstate, 2); - pLevel.gameEvent(GameEvent.BLOCK_CHANGE, pPos, GameEvent.Context.of(blockstate)); - ForgeHooks.onCropsGrowPost(pLevel, pPos, pState); - } - } - } + /** + * Performs a random tick on a block. + */ + @SuppressWarnings("deprecation") + @Override + public void randomTick(BlockState pState, @NotNull ServerLevel pLevel, @NotNull BlockPos pPos, @NotNull RandomSource pRandom) { + int i = pState.getValue(AGE); + if (i < MAX_AGE && pLevel.getRawBrightness(pPos.above(), 0) >= 8) { + int speed = 20; + Biome biome = pLevel.getBiome(pPos).value(); + if (pLevel.isRainingAt(pPos) && + biome.getPrecipitationAt(pPos) == Biome.Precipitation.RAIN && + biome.warmEnoughToRain(pPos)) { // Hard raining ON the block + speed -= 15; + } else if (pLevel.isRaining()) { // Level just raining + speed -= 12; + } + if (ForgeHooks.onCropsGrowPre(pLevel, pPos, pState, pRandom.nextInt(speed) == 0)) { + BlockState blockstate = pState.setValue(AGE, i + 1); + pLevel.setBlock(pPos, blockstate, 2); + pLevel.gameEvent(GameEvent.BLOCK_CHANGE, pPos, GameEvent.Context.of(blockstate)); + ForgeHooks.onCropsGrowPost(pLevel, pPos, pState); + } + } + } - @SuppressWarnings("deprecation") - @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { - boolean flag = this.isMaxAge(state); - if (!flag && player.getItemInHand(hand).is(Items.BONE_MEAL)) { - return InteractionResult.PASS; - } else if (state.getValue(AGE) > 2) { - popResource(level, pos, Util.gs(DelightfulItems.SALMONBERRIES, (flag ? 2 + level.random.nextInt(2) : 1))); - level.playSound(null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, 0.8F + level.random.nextFloat() * 0.4F); - BlockState blockstate = state.setValue(AGE, 1); - level.setBlock(pos, blockstate, 2); - level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(player, blockstate)); - return InteractionResult.sidedSuccess(level.isClientSide()); - } else { - return super.use(state, level, pos, player, hand, hit); - } - } + @SuppressWarnings("deprecation") + @Override + public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, @NotNull Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { + boolean flag = this.isMaxAge(state); + if (!flag && player.getItemInHand(hand).is(Items.BONE_MEAL)) { + return InteractionResult.PASS; + } else if (state.getValue(AGE) > 2) { + popResource(level, pos, Util.gs(DelightfulItems.SALMONBERRIES, (flag ? 2 + level.random.nextInt(2) : 1))); + level.playSound(null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, 0.8F + level.random.nextFloat() * 0.4F); + BlockState blockstate = state.setValue(AGE, 1); + level.setBlock(pos, blockstate, 2); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(player, blockstate)); + return InteractionResult.sidedSuccess(level.isClientSide()); + } else { + return super.use(state, level, pos, player, hand, hit); + } + } - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(AGE); - } + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(AGE); + } - @Override - public boolean isValidBonemealTarget(@NotNull LevelReader pLevel, @NotNull BlockPos pPos, @NotNull BlockState state, boolean pIsClient) { - return !this.isMaxAge(state); - } + @Override + public boolean isValidBonemealTarget(@NotNull LevelReader pLevel, @NotNull BlockPos pPos, @NotNull BlockState state, boolean pIsClient) { + return !this.isMaxAge(state); + } - @Override - public boolean isBonemealSuccess(@NotNull Level pLevel, @NotNull RandomSource pRandom, @NotNull BlockPos pPos, @NotNull BlockState pState) { - return true; - } + @Override + public boolean isBonemealSuccess(@NotNull Level pLevel, @NotNull RandomSource pRandom, @NotNull BlockPos pPos, @NotNull BlockState pState) { + return true; + } - @Override - public void performBonemeal(ServerLevel pLevel, @NotNull RandomSource pRandom, @NotNull BlockPos pPos, BlockState pState) { - pLevel.setBlock(pPos, pState.setValue(AGE, Math.min(MAX_AGE, pState.getValue(AGE) + 1)), 2); - } + @Override + public void performBonemeal(ServerLevel pLevel, @NotNull RandomSource pRandom, @NotNull BlockPos pPos, BlockState pState) { + pLevel.setBlock(pPos, pState.setValue(AGE, Math.min(MAX_AGE, pState.getValue(AGE) + 1)), 2); + } - public boolean isMaxAge(BlockState state) { - return state.getValue(AGE) >= MAX_AGE; - } + public boolean isMaxAge(BlockState state) { + return state.getValue(AGE) >= MAX_AGE; + } - @Override - public PlantType getPlantType(BlockGetter world, BlockPos pos) { - return PlantType.CROP; - } -} + @Override + public PlantType getPlantType(BlockGetter world, BlockPos pos) { + return PlantType.CROP; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/SlicedGourdBlock.java b/src/main/java/net/brnbrd/delightful/common/block/SlicedGourdBlock.java index 53ed5d82..757339d7 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/SlicedGourdBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/SlicedGourdBlock.java @@ -15,7 +15,10 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.AttachedStemBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.StemBlock; +import net.minecraft.world.level.block.StemGrownBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -26,7 +29,6 @@ import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.NotNull; import vectorwing.farmersdelight.common.tag.ForgeTags; - import java.util.function.Supplier; public class SlicedGourdBlock extends StemGrownBlock implements ISliceable { @@ -131,7 +133,7 @@ protected InteractionResult consumeBite(Level level, BlockPos pos, BlockState st int bites = state.getValue(BITES); if (bites == this.getMaxBites()) { level.removeBlock(pos, false); - } else if (bites < this.getMaxBites()){ + } else if (bites < this.getMaxBites()) { level.setBlock(pos, state.setValue(BITES, bites + 1), 3); } level.playSound(null, pos, SoundEvents.GENERIC_EAT, SoundSource.PLAYERS, 0.8F, 0.8F); @@ -173,4 +175,4 @@ public boolean hasAnalogOutputSignal(@NotNull BlockState state) { public boolean isPathfindable(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull PathComputationType type) { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/SlicedMelonBlock.java b/src/main/java/net/brnbrd/delightful/common/block/SlicedMelonBlock.java index 35ff000c..c3200589 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/SlicedMelonBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/SlicedMelonBlock.java @@ -34,164 +34,164 @@ public class SlicedMelonBlock extends MelonBlock implements ISliceable { - public static final IntegerProperty BITES = IntegerProperty.create("bites", 1, 8); - private final Supplier sliceItem; - private final Supplier juiceItem; - - public SlicedMelonBlock(Properties pProperties, Supplier sliceItem, Supplier juiceItem) { - super(pProperties); - this.registerDefaultState(this.stateDefinition.any().setValue(BITES, 1)); - this.sliceItem = sliceItem; - this.juiceItem = juiceItem; - } - - @Override - public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { - return this.getSliceItem(); - } - - public VoxelShape byBite(BlockState state) { - return Block.box(0.0D, 0.0D, 0.0D, 16.0D, this.getHeight(state.getValue(BITES)), 16.0D); - } - - @SuppressWarnings("deprecation") - @Override - public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { - return byBite(pState); - } - - @SuppressWarnings("deprecation") - @Override - public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { - return byBite(pState); - } - - @Override - public IntegerProperty getBitesProperty() { - return BITES; - } - - @Override - public ItemStack getSliceItem() { - return new ItemStack(this.sliceItem.get()); - } - - public ItemStack getJuiceItem() { - return new ItemStack(this.juiceItem.get()); - } - - @Override - public int getMaxBites() { - return 8; - } - - @Override - public float getBaseHeight() { - return 15f; - } - - @Override - public int getSliceSize() { - return 2; - } - - @Override - public BlockState getStateForPlacement(@NotNull BlockPlaceContext context) { - return this.defaultBlockState(); - } - - @SuppressWarnings("deprecation") - @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { - ItemStack heldStack = player.getItemInHand(hand); - if (heldStack.is(ForgeTags.TOOLS_KNIVES)) { - return this.cutSlice(level, pos, state, player, hand); - } else if (heldStack.is(Items.GLASS_BOTTLE) && DelightfulConfig.MELON_JUICING.get()) { - return this.bottleJuice(level, pos, state, player, hand); - } - return this.consumeBite(level, pos, state, player); - } - - protected InteractionResult consumeBite(Level level, BlockPos pos, BlockState state, Player playerIn) { - if (!playerIn.canEat(false)) { - return InteractionResult.PASS; - } else if (!level.isClientSide()) { - ItemStack sliceStack = this.getSliceItem(); - Item slice = sliceStack.getItem(); - FoodProperties sliceFood = slice.getFoodProperties(sliceStack, playerIn); - playerIn.getFoodData().eat(slice, sliceStack, playerIn); - if (slice.isEdible() && sliceFood != null) { - for (Pair pair : sliceFood.getEffects()) { - var effect = pair.getFirst(); - if (effect != null && level.random.nextFloat() < pair.getSecond()) { - playerIn.addEffect(new MobEffectInstance(effect)); - } - } - } - int bites = state.getValue(BITES); - if (bites == this.getMaxBites()) { - level.removeBlock(pos, false); - } else if (bites < this.getMaxBites()){ - level.setBlock(pos, state.setValue(BITES, bites + 1), 3); - } - level.playSound(null, pos, SoundEvents.GENERIC_EAT, SoundSource.PLAYERS, 0.8F, 0.8F); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - protected InteractionResult cutSlice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { - if (!level.isClientSide()) { - int bites = state.getValue(BITES); - if (bites == this.getMaxBites()) { - level.removeBlock(pos, false); - } else if (bites < this.getMaxBites()) { - level.setBlock(pos, state.setValue(BITES, bites + 1), 3); - } - Util.dropOrGive(this.getSliceItem(), level, pos, player); - level.playSound(null, pos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); - player.getItemInHand(hand).hurtAndBreak(1, player, onBroken -> onBroken.broadcastBreakEvent(hand)); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - protected InteractionResult bottleJuice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { - if (!level.isClientSide()) { - int bites = state.getValue(BITES); - int bites_left = ((this.getMaxBites() + 1) - bites); - if (bites_left == 4) { - level.removeBlock(pos, false); - } else if (bites_left > 4) { - level.setBlock(pos, state.setValue(BITES, bites + 4), 3); - } else { - return InteractionResult.FAIL; - } - player.getItemInHand(hand).shrink(1); - ItemHandlerHelper.giveItemToPlayer(player, this.getJuiceItem(), 0); - level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.PLAYERS, 0.8F, 0.8F); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(BITES); - } - - @SuppressWarnings("deprecation") - @Override - public int getAnalogOutputSignal(BlockState blockState, @NotNull Level level, @NotNull BlockPos pos) { - return this.getMaxBites() - blockState.getValue(BITES); - } - - @SuppressWarnings("deprecation") - @Override - public boolean hasAnalogOutputSignal(@NotNull BlockState state) { - return true; - } - - @SuppressWarnings("deprecation") - @Override - public boolean isPathfindable(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull PathComputationType type) { - return false; - } + public static final IntegerProperty BITES = IntegerProperty.create("bites", 1, 8); + private final Supplier sliceItem; + private final Supplier juiceItem; + + public SlicedMelonBlock(Properties pProperties, Supplier sliceItem, Supplier juiceItem) { + super(pProperties); + this.registerDefaultState(this.stateDefinition.any().setValue(BITES, 1)); + this.sliceItem = sliceItem; + this.juiceItem = juiceItem; + } + + @Override + public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { + return this.getSliceItem(); + } + + public VoxelShape byBite(BlockState state) { + return Block.box(0.0D, 0.0D, 0.0D, 16.0D, this.getHeight(state.getValue(BITES)), 16.0D); + } + + @SuppressWarnings("deprecation") + @Override + public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { + return byBite(pState); + } + + @SuppressWarnings("deprecation") + @Override + public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { + return byBite(pState); + } + + @Override + public IntegerProperty getBitesProperty() { + return BITES; + } + + @Override + public ItemStack getSliceItem() { + return new ItemStack(this.sliceItem.get()); + } + + public ItemStack getJuiceItem() { + return new ItemStack(this.juiceItem.get()); + } + + @Override + public int getMaxBites() { + return 8; + } + + @Override + public float getBaseHeight() { + return 15f; + } + + @Override + public int getSliceSize() { + return 2; + } + + @Override + public BlockState getStateForPlacement(@NotNull BlockPlaceContext context) { + return this.defaultBlockState(); + } + + @SuppressWarnings("deprecation") + @Override + public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { + ItemStack heldStack = player.getItemInHand(hand); + if (heldStack.is(ForgeTags.TOOLS_KNIVES)) { + return this.cutSlice(level, pos, state, player, hand); + } else if (heldStack.is(Items.GLASS_BOTTLE) && DelightfulConfig.MELON_JUICING.get()) { + return this.bottleJuice(level, pos, state, player, hand); + } + return this.consumeBite(level, pos, state, player); + } + + protected InteractionResult consumeBite(Level level, BlockPos pos, BlockState state, Player playerIn) { + if (!playerIn.canEat(false)) { + return InteractionResult.PASS; + } else if (!level.isClientSide()) { + ItemStack sliceStack = this.getSliceItem(); + Item slice = sliceStack.getItem(); + FoodProperties sliceFood = slice.getFoodProperties(sliceStack, playerIn); + playerIn.getFoodData().eat(slice, sliceStack, playerIn); + if (slice.isEdible() && sliceFood != null) { + for (Pair pair : sliceFood.getEffects()) { + var effect = pair.getFirst(); + if (effect != null && level.random.nextFloat() < pair.getSecond()) { + playerIn.addEffect(new MobEffectInstance(effect)); + } + } + } + int bites = state.getValue(BITES); + if (bites == this.getMaxBites()) { + level.removeBlock(pos, false); + } else if (bites < this.getMaxBites()) { + level.setBlock(pos, state.setValue(BITES, bites + 1), 3); + } + level.playSound(null, pos, SoundEvents.GENERIC_EAT, SoundSource.PLAYERS, 0.8F, 0.8F); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + protected InteractionResult cutSlice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { + if (!level.isClientSide()) { + int bites = state.getValue(BITES); + if (bites == this.getMaxBites()) { + level.removeBlock(pos, false); + } else if (bites < this.getMaxBites()) { + level.setBlock(pos, state.setValue(BITES, bites + 1), 3); + } + Util.dropOrGive(this.getSliceItem(), level, pos, player); + level.playSound(null, pos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); + player.getItemInHand(hand).hurtAndBreak(1, player, onBroken -> onBroken.broadcastBreakEvent(hand)); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + protected InteractionResult bottleJuice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { + if (!level.isClientSide()) { + int bites = state.getValue(BITES); + int bites_left = ((this.getMaxBites() + 1) - bites); + if (bites_left == 4) { + level.removeBlock(pos, false); + } else if (bites_left > 4) { + level.setBlock(pos, state.setValue(BITES, bites + 4), 3); + } else { + return InteractionResult.FAIL; + } + player.getItemInHand(hand).shrink(1); + ItemHandlerHelper.giveItemToPlayer(player, this.getJuiceItem(), 0); + level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.PLAYERS, 0.8F, 0.8F); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(BITES); + } + + @SuppressWarnings("deprecation") + @Override + public int getAnalogOutputSignal(BlockState blockState, @NotNull Level level, @NotNull BlockPos pos) { + return this.getMaxBites() - blockState.getValue(BITES); + } + + @SuppressWarnings("deprecation") + @Override + public boolean hasAnalogOutputSignal(@NotNull BlockState state) { + return true; + } + + @SuppressWarnings("deprecation") + @Override + public boolean isPathfindable(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull PathComputationType type) { + return false; + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/block/SlicedMiniMelonBlock.java b/src/main/java/net/brnbrd/delightful/common/block/SlicedMiniMelonBlock.java index 63c6c8ca..5bec4cf1 100644 --- a/src/main/java/net/brnbrd/delightful/common/block/SlicedMiniMelonBlock.java +++ b/src/main/java/net/brnbrd/delightful/common/block/SlicedMiniMelonBlock.java @@ -36,159 +36,159 @@ public class SlicedMiniMelonBlock extends MelonBlock implements ISliceable { - public static final IntegerProperty BITES = IntegerProperty.create("bites", 1, 5); - private final Supplier sliceItem; - private final Supplier juiceItem; - - public SlicedMiniMelonBlock(Properties pProperties, Supplier sliceItem, Supplier juiceItem) { - super(pProperties); - this.registerDefaultState(this.stateDefinition.any().setValue(BITES, 1)); - this.sliceItem = sliceItem; - this.juiceItem = juiceItem; - } - - @Override - public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { - return this.getSliceItem(); - } - - public VoxelShape byBite(BlockState state) { - return Block.box(3.0D, 0.0D, 3.0D, 13.0D, this.getHeight(state.getValue(BITES)), 13.0D); - } - - @Override - public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { - return byBite(pState); - } - - @Override - public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { - return Shapes.empty(); - } - - @Override - public IntegerProperty getBitesProperty() { - return BITES; - } - - @Override - public ItemStack getSliceItem() { - return new ItemStack(this.sliceItem.get()); - } - - @Nullable - public ItemStack getJuiceItem() { - return new ItemStack(this.juiceItem.get()); - } - - @Override - public int getMaxBites() { - return 5; - } - - @Override - public float getBaseHeight() { - return 9f; - } - - @Override - public int getSliceSize() { - return 2; - } - - @Override - public BlockState getStateForPlacement(@NotNull BlockPlaceContext context) { - return this.defaultBlockState(); - } - - @Override - public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { - ItemStack heldStack = player.getItemInHand(hand); - if (heldStack.is(ForgeTags.TOOLS_KNIVES)) { - return this.cutSlice(level, pos, state, player, hand); - } else if (heldStack.is(Items.GLASS_BOTTLE) && this.juiceItem.get() != null && DelightfulConfig.MELON_JUICING.get()) { - return this.bottleJuice(level, pos, state, player, hand); - } - return this.consumeBite(level, pos, state, player); - } - - protected InteractionResult consumeBite(Level level, BlockPos pos, BlockState state, Player playerIn) { - if (!playerIn.canEat(false)) { - return InteractionResult.PASS; - } else if (!level.isClientSide()) { - ItemStack sliceStack = this.getSliceItem(); - Item slice = sliceStack.getItem(); - FoodProperties sliceFood = slice.getFoodProperties(sliceStack, playerIn); - playerIn.getFoodData().eat(slice, sliceStack, playerIn); - if (slice.isEdible() && sliceFood != null) { - for (Pair pair : sliceFood.getEffects()) { - var effect = pair.getFirst(); - if (effect != null && level.random.nextFloat() < pair.getSecond()) { - playerIn.addEffect(new MobEffectInstance(effect)); - } - } - } - int bites = state.getValue(BITES); - if (bites == this.getMaxBites()) { - level.removeBlock(pos, false); - } else if (bites < this.getMaxBites()){ - level.setBlock(pos, state.setValue(BITES, bites + 1), 3); - } - level.playSound(null, pos, SoundEvents.GENERIC_EAT, SoundSource.PLAYERS, 0.8F, 0.8F); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - protected InteractionResult cutSlice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { - if (!level.isClientSide()) { - int bites = state.getValue(BITES); - if (bites == this.getMaxBites()) { - level.removeBlock(pos, false); - } else if (bites < this.getMaxBites()){ - level.setBlock(pos, state.setValue(BITES, bites + 1), 3); - } - Util.dropOrGive(this.getSliceItem(), level, pos, player); - level.playSound(null, pos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); - player.getItemInHand(hand).hurtAndBreak(1, player, onBroken -> onBroken.broadcastBreakEvent(hand)); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - protected InteractionResult bottleJuice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { - if (!level.isClientSide() && this.getJuiceItem() != null) { - int bites = state.getValue(BITES); - int bites_left = ((this.getMaxBites() + 1) - bites); - if (bites_left == 4) { - level.removeBlock(pos, false); - } else if (bites_left > 4) { - level.setBlock(pos, state.setValue(BITES, bites + 4), 3); - } else { - return InteractionResult.FAIL; - } - player.getItemInHand(hand).shrink(1); - ItemHandlerHelper.giveItemToPlayer(player, this.getJuiceItem(), 0); - level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.PLAYERS, 0.8F, 0.8F); - } - return InteractionResult.sidedSuccess(level.isClientSide()); - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(BITES); - } - - @Override - public int getAnalogOutputSignal(BlockState blockState, @NotNull Level level, @NotNull BlockPos pos) { - return this.getMaxBites() - blockState.getValue(BITES); - } - - @Override - public boolean hasAnalogOutputSignal(@NotNull BlockState state) { - return true; - } - - @Override - public boolean isPathfindable(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull PathComputationType type) { - return false; - } -} + public static final IntegerProperty BITES = IntegerProperty.create("bites", 1, 5); + private final Supplier sliceItem; + private final Supplier juiceItem; + + public SlicedMiniMelonBlock(Properties pProperties, Supplier sliceItem, Supplier juiceItem) { + super(pProperties); + this.registerDefaultState(this.stateDefinition.any().setValue(BITES, 1)); + this.sliceItem = sliceItem; + this.juiceItem = juiceItem; + } + + @Override + public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) { + return this.getSliceItem(); + } + + public VoxelShape byBite(BlockState state) { + return Block.box(3.0D, 0.0D, 3.0D, 13.0D, this.getHeight(state.getValue(BITES)), 13.0D); + } + + @Override + public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { + return byBite(pState); + } + + @Override + public @NotNull VoxelShape getOcclusionShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos) { + return Shapes.empty(); + } + + @Override + public IntegerProperty getBitesProperty() { + return BITES; + } + + @Override + public ItemStack getSliceItem() { + return new ItemStack(this.sliceItem.get()); + } + + @Nullable + public ItemStack getJuiceItem() { + return new ItemStack(this.juiceItem.get()); + } + + @Override + public int getMaxBites() { + return 5; + } + + @Override + public float getBaseHeight() { + return 9f; + } + + @Override + public int getSliceSize() { + return 2; + } + + @Override + public BlockState getStateForPlacement(@NotNull BlockPlaceContext context) { + return this.defaultBlockState(); + } + + @Override + public @NotNull InteractionResult use(@NotNull BlockState state, @NotNull Level level, @NotNull BlockPos pos, Player player, @NotNull InteractionHand hand, @NotNull BlockHitResult hit) { + ItemStack heldStack = player.getItemInHand(hand); + if (heldStack.is(ForgeTags.TOOLS_KNIVES)) { + return this.cutSlice(level, pos, state, player, hand); + } else if (heldStack.is(Items.GLASS_BOTTLE) && this.juiceItem.get() != null && DelightfulConfig.MELON_JUICING.get()) { + return this.bottleJuice(level, pos, state, player, hand); + } + return this.consumeBite(level, pos, state, player); + } + + protected InteractionResult consumeBite(Level level, BlockPos pos, BlockState state, Player playerIn) { + if (!playerIn.canEat(false)) { + return InteractionResult.PASS; + } else if (!level.isClientSide()) { + ItemStack sliceStack = this.getSliceItem(); + Item slice = sliceStack.getItem(); + FoodProperties sliceFood = slice.getFoodProperties(sliceStack, playerIn); + playerIn.getFoodData().eat(slice, sliceStack, playerIn); + if (slice.isEdible() && sliceFood != null) { + for (Pair pair : sliceFood.getEffects()) { + var effect = pair.getFirst(); + if (effect != null && level.random.nextFloat() < pair.getSecond()) { + playerIn.addEffect(new MobEffectInstance(effect)); + } + } + } + int bites = state.getValue(BITES); + if (bites == this.getMaxBites()) { + level.removeBlock(pos, false); + } else if (bites < this.getMaxBites()) { + level.setBlock(pos, state.setValue(BITES, bites + 1), 3); + } + level.playSound(null, pos, SoundEvents.GENERIC_EAT, SoundSource.PLAYERS, 0.8F, 0.8F); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + protected InteractionResult cutSlice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { + if (!level.isClientSide()) { + int bites = state.getValue(BITES); + if (bites == this.getMaxBites()) { + level.removeBlock(pos, false); + } else if (bites < this.getMaxBites()) { + level.setBlock(pos, state.setValue(BITES, bites + 1), 3); + } + Util.dropOrGive(this.getSliceItem(), level, pos, player); + level.playSound(null, pos, SoundEvents.WOOD_HIT, SoundSource.PLAYERS, 0.8F, 0.8F); + player.getItemInHand(hand).hurtAndBreak(1, player, onBroken -> onBroken.broadcastBreakEvent(hand)); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + protected InteractionResult bottleJuice(Level level, BlockPos pos, BlockState state, Player player, InteractionHand hand) { + if (!level.isClientSide() && this.getJuiceItem() != null) { + int bites = state.getValue(BITES); + int bites_left = ((this.getMaxBites() + 1) - bites); + if (bites_left == 4) { + level.removeBlock(pos, false); + } else if (bites_left > 4) { + level.setBlock(pos, state.setValue(BITES, bites + 4), 3); + } else { + return InteractionResult.FAIL; + } + player.getItemInHand(hand).shrink(1); + ItemHandlerHelper.giveItemToPlayer(player, this.getJuiceItem(), 0); + level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.PLAYERS, 0.8F, 0.8F); + } + return InteractionResult.sidedSuccess(level.isClientSide()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(BITES); + } + + @Override + public int getAnalogOutputSignal(BlockState blockState, @NotNull Level level, @NotNull BlockPos pos) { + return this.getMaxBites() - blockState.getValue(BITES); + } + + @Override + public boolean hasAnalogOutputSignal(@NotNull BlockState state) { + return true; + } + + @Override + public boolean isPathfindable(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull PathComputationType type) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/crafting/EnabledCondition.java b/src/main/java/net/brnbrd/delightful/common/crafting/EnabledCondition.java index aff19cdb..5f60a0bc 100644 --- a/src/main/java/net/brnbrd/delightful/common/crafting/EnabledCondition.java +++ b/src/main/java/net/brnbrd/delightful/common/crafting/EnabledCondition.java @@ -9,45 +9,44 @@ import net.minecraftforge.common.crafting.conditions.IConditionSerializer; public class EnabledCondition implements ICondition { - private static final ResourceLocation NAME = Util.rl(Delightful.MODID, "enabled"); - private final String value; - - public EnabledCondition(String value) { - this.value = value; - } - - @Override - public ResourceLocation getID() { - return NAME; - } - - @Override - public boolean test(IContext context) { - return Util.enabled(this.value); - } - - @Override - public String toString() - { - return "enabled(\"" + this.value + "\")"; - } - - public static class Serializer implements IConditionSerializer { - public static final EnabledCondition.Serializer INSTANCE = new EnabledCondition.Serializer(); - - @Override - public void write(JsonObject json, EnabledCondition condition) { - json.addProperty("value", condition.value); - } - - @Override - public EnabledCondition read(JsonObject json) { - return new EnabledCondition(GsonHelper.getAsString(json, "value")); - } - - @Override - public ResourceLocation getID() { - return EnabledCondition.NAME; - } - } -} + private static final ResourceLocation NAME = Util.rl(Delightful.MODID, "enabled"); + private final String value; + + public EnabledCondition(String value) { + this.value = value; + } + + @Override + public ResourceLocation getID() { + return NAME; + } + + @Override + public boolean test(IContext context) { + return Util.enabled(this.value); + } + + @Override + public String toString() { + return "enabled(\"" + this.value + "\")"; + } + + public static class Serializer implements IConditionSerializer { + public static final EnabledCondition.Serializer INSTANCE = new EnabledCondition.Serializer(); + + @Override + public void write(JsonObject json, EnabledCondition condition) { + json.addProperty("value", condition.value); + } + + @Override + public EnabledCondition read(JsonObject json) { + return new EnabledCondition(GsonHelper.getAsString(json, "value")); + } + + @Override + public ResourceLocation getID() { + return EnabledCondition.NAME; + } + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/events/ForgeEvents.java b/src/main/java/net/brnbrd/delightful/common/events/ForgeEvents.java index d0c17ee3..1eb91816 100644 --- a/src/main/java/net/brnbrd/delightful/common/events/ForgeEvents.java +++ b/src/main/java/net/brnbrd/delightful/common/events/ForgeEvents.java @@ -43,7 +43,7 @@ void onWanderingTrader(WandererTradesEvent e) { } // Right slick slicing an Item from a Block - @SubscribeEvent (priority = EventPriority.HIGHEST) + @SubscribeEvent(priority = EventPriority.HIGHEST) void onInteract(PlayerInteractEvent.RightClickBlock e) { Level world = e.getLevel(); BlockPos pos = e.getPos(); @@ -57,15 +57,15 @@ void onInteract(PlayerInteractEvent.RightClickBlock e) { SlicedGourdBlock sliced = (SlicedGourdBlock) DelightfulBlocks.SLICED_PUMPKIN.get(); slice(sliced.defaultBlockState(), sliced.getSliceItem(), world, pos, SoundEvents.BAMBOO_BREAK, e, client); } else if ( - Mods.loaded(Mods.UGD) && - Objects.equals(ForgeRegistries.BLOCKS.getKey(current.getBlock()), Util.rl(Mods.UG, "gloomgourd")) + Mods.loaded(Mods.UGD) && + Objects.equals(ForgeRegistries.BLOCKS.getKey(current.getBlock()), Util.rl(Mods.UG, "gloomgourd")) ) { SlicedGourdBlock sliced = (SlicedGourdBlock) DelightfulBlocks.SLICED_GLOOMGOURD.get(); slice(sliced.defaultBlockState(), sliced.getSliceItem(), world, pos, SoundEvents.BAMBOO_BREAK, e, client); } else if ( - Mods.loaded(Mods.FU, Mods.FUD) && - Util.name(current.getBlock()).equals("truffle_cake") && - ForgeRegistries.ITEMS.containsKey(Util.rl(Mods.FUD, "truffle_cake_slice")) + Mods.loaded(Mods.FU, Mods.FUD) && + Util.name(current.getBlock()).equals("truffle_cake") && + ForgeRegistries.ITEMS.containsKey(Util.rl(Mods.FUD, "truffle_cake_slice")) ) { int currentBites = current.getValue(BlockStateProperties.BITES); ItemStack slice = new ItemStack(Objects.requireNonNull(Util.item(Mods.FUD, "truffle_cake_slice"))); @@ -74,7 +74,8 @@ void onInteract(PlayerInteractEvent.RightClickBlock e) { world.gameEvent(e.getEntity(), GameEvent.BLOCK_DESTROY, pos); Util.dropOrGive(slice, world, pos, e.getEntity()); world.playSound(null, pos, SoundEvents.WOOL_PLACE, SoundSource.PLAYERS, 0.8F, 0.8F); - e.getEntity().getItemInHand(e.getHand()).hurtAndBreak(1, e.getEntity(), onBroken -> {}); + e.getEntity().getItemInHand(e.getHand()).hurtAndBreak(1, e.getEntity(), onBroken -> { + }); e.setCancellationResult(InteractionResult.sidedSuccess(client)); e.setCanceled(true); return; @@ -90,7 +91,8 @@ void slice(BlockState block, ItemStack slice, Level world, BlockPos pos, SoundEv world.setBlock(pos, block, 2); Util.dropOrGive(slice, world, pos, e.getEntity()); world.playSound(null, pos, sound, SoundSource.PLAYERS, 0.8F, 0.8F); - e.getEntity().getItemInHand(e.getHand()).hurtAndBreak(1, e.getEntity(), onBroken -> {}); + e.getEntity().getItemInHand(e.getHand()).hurtAndBreak(1, e.getEntity(), onBroken -> { + }); } e.setCancellationResult(InteractionResult.sidedSuccess(client)); e.setCanceled(true); diff --git a/src/main/java/net/brnbrd/delightful/common/events/KnifeEvents.java b/src/main/java/net/brnbrd/delightful/common/events/KnifeEvents.java index 750f927f..cd2c6108 100644 --- a/src/main/java/net/brnbrd/delightful/common/events/KnifeEvents.java +++ b/src/main/java/net/brnbrd/delightful/common/events/KnifeEvents.java @@ -11,8 +11,8 @@ public class KnifeEvents { @SubscribeEvent void onFireKnife(LivingAttackEvent e) { if (e.getSource().getEntity() instanceof LivingEntity living && - living.getMainHandItem().is(DelightfulItemTags.FIRE_KNIVES) && - !e.getEntity().fireImmune()) { + living.getMainHandItem().is(DelightfulItemTags.FIRE_KNIVES) && + !e.getEntity().fireImmune()) { e.getEntity().setSecondsOnFire(15); } } diff --git a/src/main/java/net/brnbrd/delightful/common/events/ModEvents.java b/src/main/java/net/brnbrd/delightful/common/events/ModEvents.java index 52686c60..a4e8e815 100644 --- a/src/main/java/net/brnbrd/delightful/common/events/ModEvents.java +++ b/src/main/java/net/brnbrd/delightful/common/events/ModEvents.java @@ -30,114 +30,113 @@ public class ModEvents { - @SubscribeEvent - void setup(FMLCommonSetupEvent e) { - DPacketHandler.init(); // Botania - e.enqueueWork(() -> { - // Flammables + @SubscribeEvent + void setup(FMLCommonSetupEvent e) { + DPacketHandler.init(); // Botania + e.enqueueWork(() -> { + // Flammables - // Compostables - ComposterBlock.COMPOSTABLES.put(DelightfulItems.ACORN.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.ROASTED_ACORN.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRIES.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIPS.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.PUMPKIN_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SOURCE_BERRY_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.GLOOMGOURD_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.BLUEBERRY_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_APPLE_PIE_SLICE.get(), 0.85F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_TEA_LEAF.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.MATCHA.get(), 0.6F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CHOPPED_CLOVER.get(), 0.5F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CACTUS_FLESH.get(), 0.25F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CACTUS_STEAK.get(), 0.25F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_SLICE.get(), 0.6F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_SEEDS.get(), 0.3F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.MINI_MELON.get(), 0.65F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE.get(), 0.75F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.WILD_SALMONBERRIES.get(), 0.65F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SMORE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.ACORN_SACK.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_SACK.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.BLUEBERRY_SACK.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.MENDOSTEEN_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.BASTION_FRUIT_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.FROSTAYA_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.BOMBEGRANATE_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_APPLE_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.YUCCA_FRUIT_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.BAOBAB_FRUIT_CRATE.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_BREAD.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get(), 1.0F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_GUMMY.get(), 0.65F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.MATCHA_GUMMY.get(), 0.65F); - ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_GUMMY.get(), 0.65F); + // Compostables + ComposterBlock.COMPOSTABLES.put(DelightfulItems.ACORN.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.ROASTED_ACORN.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRIES.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIPS.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.PUMPKIN_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SOURCE_BERRY_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.GLOOMGOURD_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.BLUEBERRY_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_APPLE_PIE_SLICE.get(), 0.85F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_TEA_LEAF.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.MATCHA.get(), 0.6F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CHOPPED_CLOVER.get(), 0.5F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CACTUS_FLESH.get(), 0.25F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CACTUS_STEAK.get(), 0.25F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_SLICE.get(), 0.6F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_SEEDS.get(), 0.3F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.MINI_MELON.get(), 0.65F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE.get(), 0.75F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.WILD_SALMONBERRIES.get(), 0.65F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SMORE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.ACORN_SACK.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_SACK.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.BLUEBERRY_SACK.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.MENDOSTEEN_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.BASTION_FRUIT_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.FROSTAYA_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.BOMBEGRANATE_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.GREEN_APPLE_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.YUCCA_FRUIT_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.BAOBAB_FRUIT_CRATE.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_BREAD.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get(), 1.0F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.SALMONBERRY_GUMMY.get(), 0.65F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.MATCHA_GUMMY.get(), 0.65F); + ComposterBlock.COMPOSTABLES.put(DelightfulItems.CANTALOUPE_GUMMY.get(), 0.65F); - // Animal Foods - Chicken.FOOD_ITEMS = CompoundIngredient.of( - Chicken.FOOD_ITEMS, - Util.ing(DelightfulItems.SALMONBERRY_PIPS), - Util.ing(DelightfulItems.CANTALOUPE_SEEDS) - ); - Collections.addAll( - Parrot.TAME_FOOD, - DelightfulItems.SALMONBERRY_PIPS.get(), - DelightfulItems.CANTALOUPE_SEEDS.get() - ); - if (ModList.get().isLoaded(Mods.N)) { - DelightfulCauldronInteractions.registerCauldronInteractions(); - } - }); - } + // Animal Foods + Chicken.FOOD_ITEMS = CompoundIngredient.of( + Chicken.FOOD_ITEMS, + Util.ing(DelightfulItems.SALMONBERRY_PIPS), + Util.ing(DelightfulItems.CANTALOUPE_SEEDS) + ); + Collections.addAll( + Parrot.TAME_FOOD, + DelightfulItems.SALMONBERRY_PIPS.get(), + DelightfulItems.CANTALOUPE_SEEDS.get() + ); + if (ModList.get().isLoaded(Mods.N)) { + DelightfulCauldronInteractions.registerCauldronInteractions(); + } + }); + } - // Adds Delightful conditions - @SubscribeEvent - void registerSerializers(RegisterEvent e) { - if (e.getRegistryKey() == ForgeRegistries.RECIPE_SERIALIZERS.getRegistryKey()) { - CraftingHelper.register(EnabledCondition.Serializer.INSTANCE); - } - } + // Adds Delightful conditions + @SubscribeEvent + void registerSerializers(RegisterEvent e) { + if (e.getRegistryKey() == ForgeRegistries.RECIPE_SERIALIZERS.getRegistryKey()) { + CraftingHelper.register(EnabledCondition.Serializer.INSTANCE); + } + } - @SubscribeEvent - public void buildContents(BuildCreativeModeTabContentsEvent event) { - var tags = ForgeRegistries.ITEMS.tags(); - ResourceLocation TOAST_WITH_BLUEBERRIES = Util.rl(Mods.MOD, "toast_with_blueberries"); - ResourceLocation TOAST_WITH_CHEESE = Util.rl(Mods.MOD, "toast_with_cheese"); - // Delightful Items - if (event.getTabKey() == ModCreativeTabs.TAB_FARMERS_DELIGHT.getKey()) { - DelightfulItems.ITEMS.getEntries().stream().filter(RegistryObject::isPresent).forEach((item) -> { - Item i = item.get(); - ItemStack inst = i instanceof DelightfulKnifeItem ? - ((DelightfulKnifeItem) i).getCreativeItem() : new ItemStack(i); - if ( - (i instanceof IConfigured conf && conf.enabled() && !inst.isEmpty()) || - !(i instanceof IConfigured)) - { - event.accept(inst, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - } - }); - } else if ( - Mods.loaded(Mods.MOD) && - event.getTabKey().location().getNamespace().equals(Mods.MOD) && - tags != null - ) { - if ( - !Mods.loaded("nutritious_feast") && - ForgeRegistries.ITEMS.containsKey(TOAST_WITH_BLUEBERRIES) && - tags.isKnownTagName(DelightfulItemTags.FRUITS_BLUEBERRIES) - ) { - event.accept(ForgeRegistries.ITEMS.getValue(TOAST_WITH_BLUEBERRIES)); - } - if ( - !Mods.loaded("casualness_delight") && - ForgeRegistries.ITEMS.containsKey(TOAST_WITH_CHEESE) && - tags.isKnownTagName(DelightfulItemTags.CHEESE) - ) { - event.accept(ForgeRegistries.ITEMS.getValue(TOAST_WITH_CHEESE)); - } - } - } + @SubscribeEvent + public void buildContents(BuildCreativeModeTabContentsEvent event) { + var tags = ForgeRegistries.ITEMS.tags(); + ResourceLocation TOAST_WITH_BLUEBERRIES = Util.rl(Mods.MOD, "toast_with_blueberries"); + ResourceLocation TOAST_WITH_CHEESE = Util.rl(Mods.MOD, "toast_with_cheese"); + // Delightful Items + if (event.getTabKey() == ModCreativeTabs.TAB_FARMERS_DELIGHT.getKey()) { + DelightfulItems.ITEMS.getEntries().stream().filter(RegistryObject::isPresent).forEach((item) -> { + Item i = item.get(); + ItemStack inst = i instanceof DelightfulKnifeItem ? + ((DelightfulKnifeItem) i).getCreativeItem() : new ItemStack(i); + if ( + (i instanceof IConfigured conf && conf.enabled() && !inst.isEmpty()) || + !(i instanceof IConfigured)) { + event.accept(inst, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); + } + }); + } else if ( + Mods.loaded(Mods.MOD) && + event.getTabKey().location().getNamespace().equals(Mods.MOD) && + tags != null + ) { + if ( + !Mods.loaded("nutritious_feast") && + ForgeRegistries.ITEMS.containsKey(TOAST_WITH_BLUEBERRIES) && + tags.isKnownTagName(DelightfulItemTags.FRUITS_BLUEBERRIES) + ) { + event.accept(ForgeRegistries.ITEMS.getValue(TOAST_WITH_BLUEBERRIES)); + } + if ( + !Mods.loaded("casualness_delight") && + ForgeRegistries.ITEMS.containsKey(TOAST_WITH_CHEESE) && + tags.isKnownTagName(DelightfulItemTags.CHEESE) + ) { + event.accept(ForgeRegistries.ITEMS.getValue(TOAST_WITH_CHEESE)); + } + } + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/events/pie/PieEvents.java b/src/main/java/net/brnbrd/delightful/common/events/pie/PieEvents.java index 88b2db47..621dad88 100644 --- a/src/main/java/net/brnbrd/delightful/common/events/pie/PieEvents.java +++ b/src/main/java/net/brnbrd/delightful/common/events/pie/PieEvents.java @@ -28,24 +28,24 @@ public class PieEvents { // Adds "Placeable" tooltip to compat pies - @SubscribeEvent (priority = EventPriority.NORMAL) + @SubscribeEvent(priority = EventPriority.NORMAL) void onPieTooltip(ItemTooltipEvent e) { ItemStack stack = e.getItemStack(); if ( - (stack.getItem() instanceof BlockItem b && b.getBlock() instanceof PieBlock) || - Pies.enabled(stack) || - isBerryPieOrMuffin(stack) + (stack.getItem() instanceof BlockItem b && b.getBlock() instanceof PieBlock) || + Pies.enabled(stack) || + isBerryPieOrMuffin(stack) ) { e.getToolTip().add( - Component.translatable(Delightful.MODID + ".placeable.desc") - .withStyle(ChatFormatting.DARK_GRAY) - .withStyle(ChatFormatting.ITALIC) + Component.translatable(Delightful.MODID + ".placeable.desc") + .withStyle(ChatFormatting.DARK_GRAY) + .withStyle(ChatFormatting.ITALIC) ); } } // Cancels pies' vanilla right-click eating - @SubscribeEvent (priority = EventPriority.HIGHEST) + @SubscribeEvent(priority = EventPriority.HIGHEST) void onCancelDefault(PlayerInteractEvent.RightClickItem e) { if (Pies.enabled(e.getItemStack())) { e.setCancellationResult(InteractionResult.FAIL); @@ -57,17 +57,17 @@ void onCancelDefault(PlayerInteractEvent.RightClickItem e) { @SubscribeEvent void onPieOverhaul(PlayerInteractEvent.RightClickBlock e) { if ( - Pies.enabled(e.getItemStack()) && - !e.getLevel().getBlockState(e.getHitVec().getBlockPos()).is(ModBlocks.CUTTING_BOARD.get()) && - !e.isCanceled() + Pies.enabled(e.getItemStack()) && + !e.getLevel().getBlockState(e.getHitVec().getBlockPos()).is(ModBlocks.CUTTING_BOARD.get()) && + !e.isCanceled() ) { PieBlock pie = Pies.get(e.getItemStack()); if (pie != null) { InteractionResult place = placePie(pie, new BlockPlaceContext( - e.getEntity(), - e.getHand(), - e.getItemStack(), - e.getHitVec() + e.getEntity(), + e.getHand(), + e.getItemStack(), + e.getHitVec() )); if (place.consumesAction()) { e.setUseItem(Event.Result.DENY); @@ -94,12 +94,12 @@ private InteractionResult placePie(PieBlock pie, BlockPlaceContext context) { level.gameEvent(GameEvent.BLOCK_PLACE, pos, GameEvent.Context.of(player, pieState)); SoundType soundtype = placedState.getSoundType(level, pos, player); level.playSound( - player, - pos, - placedState.getSoundType(level, pos, player).getPlaceSound(), - SoundSource.BLOCKS, - (soundtype.getVolume() + 1.0F) / 2.0F, - soundtype.getPitch() * 0.8F + player, + pos, + placedState.getSoundType(level, pos, player).getPlaceSound(), + SoundSource.BLOCKS, + (soundtype.getVolume() + 1.0F) / 2.0F, + soundtype.getPitch() * 0.8F ); if (player != null && !player.getAbilities().instabuild) { context.getItemInHand().shrink(1); @@ -114,19 +114,19 @@ private boolean canPlace(BlockPlaceContext pContext, BlockState pState) { Player player = pContext.getPlayer(); CollisionContext collisioncontext = player == null ? CollisionContext.empty() : CollisionContext.of(player); return ( - pState.canSurvive(pContext.getLevel(), pContext.getClickedPos()) && - pContext.getLevel().isUnobstructed(pState, pContext.getClickedPos(), collisioncontext) + pState.canSurvive(pContext.getLevel(), pContext.getClickedPos()) && + pContext.getLevel().isUnobstructed(pState, pContext.getClickedPos(), collisioncontext) ); } // Wild Berries compat boolean isBerryPieOrMuffin(ItemStack stack) { return ( - Mods.loaded(Mods.WB) && - ( - stack.is(Util.it(Mods.WB, "berry_pies")) || - stack.is(Util.it(Mods.WB, "berry_muffins")) - ) + Mods.loaded(Mods.WB) && + ( + stack.is(Util.it(Mods.WB, "berry_pies")) || + stack.is(Util.it(Mods.WB, "berry_muffins")) + ) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/events/pie/Pies.java b/src/main/java/net/brnbrd/delightful/common/events/pie/Pies.java index 646d9919..217c7412 100644 --- a/src/main/java/net/brnbrd/delightful/common/events/pie/Pies.java +++ b/src/main/java/net/brnbrd/delightful/common/events/pie/Pies.java @@ -6,23 +6,24 @@ import net.brnbrd.delightful.data.tags.DelightfulItemTags; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import vectorwing.farmersdelight.common.block.PieBlock; import org.jetbrains.annotations.Nullable; +import vectorwing.farmersdelight.common.block.PieBlock; public class Pies { public static boolean enabled(ItemStack stack) { return ( - stack.is(DelightfulItemTags.COMPAT_PIES) && - !(stack.is(Items.PUMPKIN_PIE) && Mods.loaded(Mods.CCK)) && - Util.enabled(Util.name(stack.getItem()) + "_slice") + stack.is(DelightfulItemTags.COMPAT_PIES) && + !(stack.is(Items.PUMPKIN_PIE) && Mods.loaded(Mods.CCK)) && + Util.enabled(Util.name(stack.getItem()) + "_slice") ); } - @Nullable public static PieBlock get(ItemStack stack) { + @Nullable + public static PieBlock get(ItemStack stack) { if (Util.block(Delightful.MODID, Util.name(stack.getItem())) instanceof PieBlock pie) { return pie; } return null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/fluid/DelightfulFluids.java b/src/main/java/net/brnbrd/delightful/common/fluid/DelightfulFluids.java index 706ee1f1..d2e57dca 100644 --- a/src/main/java/net/brnbrd/delightful/common/fluid/DelightfulFluids.java +++ b/src/main/java/net/brnbrd/delightful/common/fluid/DelightfulFluids.java @@ -16,24 +16,25 @@ public class DelightfulFluids { public static final DeferredRegister TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, Delightful.MODID); public static final RegistryObject AZALEA_TEA_TYPE = TYPES.register("azalea_tea_type", - () -> new TeaFluidType(0xffd3619c)); - public static final RegistryObject AZALEA_TEA = FLUIDS.register("azalea_tea", - () -> new ForgeFlowingFluid.Source(DelightfulFluids.AZALEA_TEA_PROPERTIES)); - public static final RegistryObject FLOWING_AZALEA_TEA = FLUIDS.register("flowing_azalea_tea", - () -> new ForgeFlowingFluid.Flowing(DelightfulFluids.AZALEA_TEA_PROPERTIES)); - + () -> new TeaFluidType(0xffd3619c)); public static final RegistryObject LAVENDER_TEA_TYPE = TYPES.register("lavender_tea_type", - () -> new TeaFluidType(0xff9e79a2)); + () -> new TeaFluidType(0xff9e79a2)); public static final RegistryObject AZALEA_TEA = FLUIDS.register("azalea_tea", + () -> new ForgeFlowingFluid.Source(DelightfulFluids.AZALEA_TEA_PROPERTIES)); + + public static void create(IEventBus bus) { + FLUIDS.register(bus); + TYPES.register(bus); + } public static final RegistryObject FLOWING_AZALEA_TEA = FLUIDS.register("flowing_azalea_tea", + () -> new ForgeFlowingFluid.Flowing(DelightfulFluids.AZALEA_TEA_PROPERTIES)); + + public static final RegistryObject LAVENDER_TEA = FLUIDS.register("lavender_tea", - () -> new ForgeFlowingFluid.Source(DelightfulFluids.LAVENDER_TEA_PROPERTIES)); + () -> new ForgeFlowingFluid.Source(DelightfulFluids.LAVENDER_TEA_PROPERTIES)); public static final RegistryObject FLOWING_LAVENDER_TEA = FLUIDS.register("flowing_lavender_tea", - () -> new ForgeFlowingFluid.Flowing(DelightfulFluids.LAVENDER_TEA_PROPERTIES)); + () -> new ForgeFlowingFluid.Flowing(DelightfulFluids.LAVENDER_TEA_PROPERTIES)); public static final ForgeFlowingFluid.Properties AZALEA_TEA_PROPERTIES = new ForgeFlowingFluid.Properties(AZALEA_TEA_TYPE, AZALEA_TEA, FLOWING_AZALEA_TEA); public static final ForgeFlowingFluid.Properties LAVENDER_TEA_PROPERTIES = new ForgeFlowingFluid.Properties(LAVENDER_TEA_TYPE, LAVENDER_TEA, FLOWING_LAVENDER_TEA); - public static void create(IEventBus bus) { - FLUIDS.register(bus); - TYPES.register(bus); - } -} + +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/fluid/TeaFluidType.java b/src/main/java/net/brnbrd/delightful/common/fluid/TeaFluidType.java index bade94d5..659ea0bb 100644 --- a/src/main/java/net/brnbrd/delightful/common/fluid/TeaFluidType.java +++ b/src/main/java/net/brnbrd/delightful/common/fluid/TeaFluidType.java @@ -13,8 +13,8 @@ public class TeaFluidType extends FluidType { public TeaFluidType(int tint) { super(FluidType.Properties.create() - .sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL) - .sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY) + .sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL) + .sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY) ); this.tint = tint; } diff --git a/src/main/java/net/brnbrd/delightful/common/item/DelightfulItems.java b/src/main/java/net/brnbrd/delightful/common/item/DelightfulItems.java index 047174e7..49fee905 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/DelightfulItems.java +++ b/src/main/java/net/brnbrd/delightful/common/item/DelightfulItems.java @@ -24,183 +24,183 @@ public class DelightfulItems { - public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Delightful.MODID); - - public static final RegistryObject QUARTZ_CABINET = registerItem("quartz_cabinet", - () -> new BlockItem(DelightfulBlocks.QUARTZ_CABINET.get(), ModItems.basicItem())); - public static final RegistryObject BASALT_CABINET = registerItem("basalt_cabinet", - () -> new BlockItem(DelightfulBlocks.BASALT_CABINET.get(), ModItems.basicItem())); - - public static final RegistryObject SALMONBERRY_SACK = registerItem("salmonberry_sack", () -> - new BlockItem(DelightfulBlocks.SALMONBERRY_SACK.get(), ModItems.basicItem())); - public static final RegistryObject ACORN_SACK = registerItem("acorn_sack", () -> - new BlockItem(DelightfulBlocks.ACORN_SACK.get(), ModItems.basicItem())); - public static final RegistryObject BLUEBERRY_SACK = registerItem("blueberry_sack", () -> - new CompatBlockItem(DelightfulBlocks.BLUEBERRY_SACK.get(), (new Item.Properties()), Mods.BWG, Mods.WB, Mods.AE)); - public static final RegistryObject MENDOSTEEN_CRATE = registerItem("mendosteen_crate", () -> - new CompatBlockItem(DelightfulBlocks.MENDOSTEEN_CRATE.get(), (new Item.Properties()), Mods.AN)); - public static final RegistryObject BASTION_FRUIT_CRATE = registerItem("bastion_fruit_crate", () -> - new CompatBlockItem(DelightfulBlocks.BASTION_FRUIT_CRATE.get(), (new Item.Properties()), Mods.AN)); - public static final RegistryObject FROSTAYA_CRATE = registerItem("frostaya_crate", () -> - new CompatBlockItem(DelightfulBlocks.FROSTAYA_CRATE.get(), (new Item.Properties()), Mods.AN)); - public static final RegistryObject BOMBEGRANATE_CRATE = registerItem("bombegranate_crate", () -> - new CompatBlockItem(DelightfulBlocks.BOMBEGRANATE_CRATE.get(), (new Item.Properties()), Mods.AN)); - public static final RegistryObject GREEN_APPLE_CRATE = registerItem("green_apple_crate", () -> - new CompatBlockItem(DelightfulBlocks.GREEN_APPLE_CRATE.get(), (new Item.Properties()), Mods.BWG)); - public static final RegistryObject YUCCA_FRUIT_CRATE = registerItem("yucca_fruit_crate", () -> - new CompatBlockItem(DelightfulBlocks.YUCCA_FRUIT_CRATE.get(), (new Item.Properties()), Mods.BWG)); - public static final RegistryObject BAOBAB_FRUIT_CRATE = registerItem("baobab_fruit_crate", () -> - new CompatBlockItem(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get(), (new Item.Properties()), Mods.BWG)); - - public static final RegistryObject MATCHA_ICE_CREAM_BLOCK = registerItem("matcha_ice_cream_block", () -> - new CompatBlockItem(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get(), (new Item.Properties()), Mods.N)); - public static final RegistryObject SALMONBERRY_ICE_CREAM_BLOCK = registerItem("salmonberry_ice_cream_block", () -> - new CompatBlockItem(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get(), (new Item.Properties()), Mods.N)); - - public static final RegistryObject MATCHA_ICE_CREAM = registerItem("matcha_ice_cream", () -> new IceCreamItem((new Item.Properties()).food(Nutrition.MATCHA_ICE_CREAM))); - public static final RegistryObject SALMONBERRY_ICE_CREAM = registerItem("salmonberry_ice_cream", () -> new IceCreamItem((new Item.Properties()).food(Nutrition.SALMONBERRY_ICE_CREAM))); - public static final RegistryObject MATCHA_MILKSHAKE = registerItem("matcha_milkshake", - () -> new ShakeItem(new Item.Properties().food(Nutrition.MATCHA_MILKSHAKE))); - public static final RegistryObject SALMONBERRY_MILKSHAKE = registerItem("salmonberry_milkshake", - () -> new ShakeItem(new Item.Properties().food(Nutrition.SALMONBERRY_MILKSHAKE))); - public static final RegistryObject MATCHA = registerItem("matcha", () -> new MatchaItem(new Item.Properties().food(Nutrition.MATCHA))); - public static final RegistryObject GREEN_TEA_LEAF = registerItem("green_tea_leaf", () -> new GreenTeaLeavesItem(new Item.Properties().food(Nutrition.GREEN_TEA_LEAF))); - public static final RegistryObject SALMONBERRIES = registerFood("salmonberries", Nutrition.SALMONBERRIES); - public static final RegistryObject SALMONBERRY_PIPS = registerItem("salmonberry_pips", - () -> new ItemNameBlockItem(DelightfulBlocks.SALMONBERRY_BUSH.get(), ModItems.basicItem())); - public static final RegistryObject WILD_SALMONBERRIES = registerItem("wild_salmonberries", - () -> new BlockItem(DelightfulBlocks.WILD_SALMONBERRIES.get(), ModItems.basicItem())); - public static final RegistryObject SALMONBERRY_PIE = registerItem("salmonberry_pie", - () -> new BlockItem(DelightfulBlocks.SALMONBERRY_PIE.get(), ModItems.basicItem())); - public static final RegistryObject SALMONBERRY_PIE_SLICE = registerItem("salmonberry_pie_slice", - () -> new DItem((new Item.Properties()).food(Nutrition.SALMONBERRY_PIE_SLICE), true)); - public static final RegistryObject PUMPKIN_PIE_SLICE = registerItem("pumpkin_pie_slice", - () -> new PumpkinPieSliceItem((new Item.Properties()).food(FoodValues.PIE_SLICE))); - public static final RegistryObject SOURCE_BERRY_PIE_SLICE = registerCompatPieSlice(ArsNouveauCompat.pie + "_slice", ArsNouveauCompat.SOURCE_BERRY_PIE_SLICE, - Mods.AN); - public static final RegistryObject GLOOMGOURD_PIE_SLICE = registerCompatPieSlice(UndergardenCompat.pie + "_slice", UndergardenCompat.GLOOMGOURD_PIE_SLICE.get(), - Mods.UG); - public static final RegistryObject BLUEBERRY_PIE_SLICE = registerCompatPieSlice(BWGCompat.blueberry_pie + "_slice", BWGCompat.BLUEBERRY_PIE_SLICE.get(), - Mods.BWG); - public static final RegistryObject GREEN_APPLE_PIE_SLICE = registerCompatPieSlice(BWGCompat.green_apple_pie + "_slice", BWGCompat.GREEN_APPLE_PIE_SLICE.get(), - Mods.BWG); - public static final RegistryObject ANIMAL_FAT = registerFood("animal_fat", Nutrition.ANIMAL_FAT); - public static final RegistryObject ANIMAL_OIL_BOTTLE = registerItem("animal_oil_bottle", - () -> new FurnaceFuelItem((new Item.Properties()).craftRemainder(Items.GLASS_BOTTLE), 3200)); - public static final RegistryObject ACORN = registerFood("acorn", Nutrition.ACORN); - public static final RegistryObject ROASTED_ACORN = registerFood("roasted_acorn", Nutrition.ROASTED_ACORN); - public static final RegistryObject NUT_DOUGH = registerFood("nut_dough", Nutrition.NUT_DOUGH); - public static final RegistryObject CHOPPED_CLOVER = registerItem("chopped_clover", () -> new ReverseTagItem((new Item.Properties()).food(Nutrition.CHOPPED_CLOVER), DelightfulItemTags.CLOVER)); - public static final RegistryObject CACTUS_FLESH = registerFood("cactus_flesh", Nutrition.CACTUS_FLESH); - public static final RegistryObject CACTUS_STEAK = registerFood("cactus_steak", Nutrition.CACTUS_STEAK); - public static final RegistryObject CACTUS_CHILI = registerItem("cactus_chili", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.CACTUS_CHILI).stacksTo(16).craftRemainder(Items.BOWL), true)); - public static final RegistryObject CACTUS_SOUP = registerItem("cactus_soup", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.CACTUS_SOUP).stacksTo(16).craftRemainder(Items.BOWL), true)); - public static final RegistryObject CACTUS_SOUP_CUP = registerItem("cactus_soup_cup", () -> new CupItem((new Item.Properties()).food(Nutrition.CACTUS_SOUP_CUP), true, false)); - public static final RegistryObject FIELD_SALAD = registerItem("field_salad", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.FIELD_SALAD).stacksTo(16).craftRemainder(Items.BOWL), true)); - public static final RegistryObject COCONUT_CURRY = registerItem("coconut_curry", - () -> new CoconutCurryItem((new Item.Properties()).food(Nutrition.COCONUT_CURRY).stacksTo(16).craftRemainder(Items.BOWL))); - public static final RegistryObject SINIGANG = registerItem("sinigang", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.SINIGANG).craftRemainder(Items.BOWL).stacksTo(16), true, false)); - public static final RegistryObject AZALEA_TEA = registerItem("azalea_tea", - () -> new AzaleaTeaItem((new Item.Properties()).food(Nutrition.AZALEA_TEA).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false)); - public static final RegistryObject LAVENDER_TEA = registerItem("lavender_tea", - () -> new LavenderTeaItem((new Item.Properties()).food(Nutrition.LAVENDER_TEA).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false)); - public static final RegistryObject PRICKLY_PEAR_JUICE = registerItem("prickly_pear_juice", () -> new CompatDrinkItem((new Item.Properties()).food(Nutrition.PRICKLY_PEAR_JUICE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false, Mods.ECO)); - public static final RegistryObject ENDER_NECTAR = registerItem("ender_nectar", () -> new EnderNectarItem((new Item.Properties()).food(Nutrition.ENDER_NECTAR).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16))); - public static final RegistryObject MATCHA_LATTE = registerItem("matcha_latte", () -> new DrinkItem((new Item.Properties()).food(Nutrition.MATCHA_LATTE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 2.0F, true, true)); - public static final RegistryObject BERRY_MATCHA_LATTE = registerItem("berry_matcha_latte", () -> new DrinkItem((new Item.Properties()).food(Nutrition.BERRY_MATCHA_LATTE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 2.0F, true, true)); - public static final RegistryObject JELLY_BOTTLE = registerItem("jelly_bottle", () -> new JamJarItem((new Item.Properties()).food(Nutrition.JELLY_BOTTLE).craftRemainder(Items.GLASS_BOTTLE), false, false)); - public static final RegistryObject GLOW_JELLY_BOTTLE = registerItem("glow_jelly_bottle", () -> new JamJarItem((new Item.Properties()).food(Nutrition.GLOW_JELLY_BOTTLE).craftRemainder(Items.GLASS_BOTTLE), true, false)); - public static final RegistryObject NUT_BUTTER_BOTTLE = registerItem("nut_butter_bottle", () -> new NutButterBottleItem(((new Item.Properties()).food(Nutrition.NUT_BUTTER_BOTTLE).craftRemainder(Items.GLASS_BOTTLE)))); - public static final RegistryObject NUT_BUTTER_AND_JELLY_SANDWICH = registerConsumable("nut_butter_and_jelly_sandwich", Nutrition.NUT_BUTTER_AND_JELLY_SANDWICH, null, true, false); - public static final RegistryObject CHEESEBURGER = registerItem("cheeseburger", () -> new CheeseburgerItem((new Item.Properties()).food(Nutrition.CHEESEBURGER))); - public static final RegistryObject DELUXE_CHEESEBURGER = registerConsumable("deluxe_cheeseburger", Nutrition.DELUXE_CHEESEBURGER, null, true, false); - public static final RegistryObject CHUNKWICH = registerCompatFood("chunkwich", Nutrition.CHUNKWICH, - Mods.RL); - public static final RegistryObject ROCK_CANDY = registerItem("rock_candy", - () -> new RockCandyItem((new Item.Properties()).food(Nutrition.ROCK_CANDY).craftRemainder(Items.STICK))); - public static final RegistryObject MARSHMALLOW_STICK = registerFood("marshmallow_stick", Nutrition.MARSHMALLOW_STICK, Items.STICK); - public static final RegistryObject COOKED_MARSHMALLOW_STICK = registerFood("cooked_marshmallow_stick", Nutrition.COOKED_MARSHMALLOW_STICK, Items.STICK); - public static final RegistryObject SMORE = registerConsumable("smore", Nutrition.SMORE, null, true, false); - public static final RegistryObject CRAB_RANGOON = registerItem("crab_rangoon", - () -> new ReverseTagItem(new Item.Properties().food(Nutrition.CRAB_RANGOON), DelightfulItemTags.CRAB_MEAT)); - public static final RegistryObject HONEY_GLAZED_WALNUT = registerItem("honey_glazed_walnut", - () -> new ReverseTagItem(new Item.Properties().food(Nutrition.HONEY_GLAZED_WALNUT), DelightfulItemTags.NUTS_WALNUT)); - public static final RegistryObject VENISON_CHOPS = registerItem("venison_chops", - () -> new VenisonItem(new Item.Properties().food(Nutrition.VENISON_CHOPS))); - public static final RegistryObject COOKED_VENISON_CHOPS = registerItem("cooked_venison_chops", - () -> new VenisonItem(new Item.Properties().food(Nutrition.COOKED_VENISON_CHOPS))); - public static final RegistryObject RAW_GOAT = registerItem("raw_goat", - () -> new GoatMeatItem(new Item.Properties().food(Nutrition.RAW_GOAT))); - public static final RegistryObject COOKED_GOAT = registerItem("cooked_goat", - () -> new GoatMeatItem(new Item.Properties().food(Nutrition.COOKED_GOAT))); - public static final RegistryObject MINI_MELON = registerItem("mini_melon", () -> - new BlockItem(DelightfulBlocks.MINI_MELON.get(), ModItems.basicItem())); - public static final RegistryObject CANTALOUPE = registerItem("cantaloupe", () -> - new BlockItem(DelightfulBlocks.CANTALOUPE.get(), ModItems.basicItem())); - public static final RegistryObject CANTALOUPE_SEEDS = registerItem("cantaloupe_seeds", - () -> new ItemNameBlockItem(DelightfulBlocks.CANTALOUPE_PLANT.get(), ModItems.basicItem())); - public static final RegistryObject CANTALOUPE_SLICE = registerFood("cantaloupe_slice", Nutrition.CANTALOUPE_SLICE); - public static final RegistryObject CANTALOUPE_BREAD = registerConsumable("cantaloupe_bread", Nutrition.CANTALOUPE_BREAD, null, true, false); - public static final RegistryObject WRAPPED_CANTALOUPE = registerConsumable("wrapped_cantaloupe", Nutrition.WRAPPED_CANTALOUPE, null, true, false); - public static final RegistryObject CANTALOUPE_POPSICLE = registerConsumable("cantaloupe_popsicle", Nutrition.CANTALOUPE_POPSICLE, Items.STICK, true, false); - public static final RegistryObject STUFFED_CANTALOUPE_BLOCK = registerItem("stuffed_cantaloupe_block", - () -> new BlockItem(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get(), ModItems.basicItem().stacksTo(1))); - public static final RegistryObject STUFFED_CANTALOUPE = registerConsumable("stuffed_cantaloupe", Nutrition.STUFFED_CANTALOUPE, Items.BOWL, true, false); - - public static final RegistryObject SALMONBERRY_GUMMY = registerItem("salmonberry_gummy", - () -> new GummyItem((new Item.Properties()).food(Nutrition.SALMONBERRY_GUMMY))); - public static final RegistryObject MATCHA_GUMMY = registerItem("matcha_gummy", - () -> new GummyItem((new Item.Properties()).food(Nutrition.MATCHA_GUMMY))); - public static final RegistryObject CANTALOUPE_GUMMY = registerItem("cantaloupe_gummy", - () -> new GummyItem((new Item.Properties()).food(Nutrition.CANTALOUPE_GUMMY))); - - // Registers food, optional craftRemainder - public static RegistryObject registerFood(String name, FoodProperties food, Item... remainder) { - if (remainder.length > 0) { - if (remainder[0].equals(Items.BOWL)) { - return registerItem(name, - () -> new BowlFoodItem((new Item.Properties()).food(food).craftRemainder(Items.BOWL))); - } else { - return registerConsumable(name, food, remainder[0], false, false); - } - } - return registerItem(name, () -> new DItem((new Item.Properties()).food(food))); - } - - public static RegistryObject registerConsumable(String name, FoodProperties food, @Nullable Item remainder, boolean hasFoodEffectTooltip, boolean hasCustomTooltip) { - return registerItem(name, - () -> new ConsumableItem((new Item.Properties()).food(food).craftRemainder(remainder), hasFoodEffectTooltip, hasCustomTooltip)); - } - - public static RegistryObject registerCompatPieSlice(String name, FoodProperties food, String modid) { - return registerItem(name, () -> new CompatItem((new Item.Properties().food(food)), true, modid)); - } - - public static RegistryObject registerCompatFood(String name, FoodProperties food, String modid) { - return registerItem(name, () -> new CompatItem((new Item.Properties().food(food)), modid)); - } - - public static RegistryObject registerItem(String name, Supplier item) { - return ITEMS.register(name, item); - } - - public static TagKey ingot(String name) { - return DelightfulItemTags.forge("ingots/" + name); - } - - public static TagKey gem(String name) { - return DelightfulItemTags.forge("gems/" + name); - } - - public static Ingredient getIngot(String name) { - return Ingredient.of(ingot(name)); - } - - public static Ingredient getGem(String name) { - return Ingredient.of(gem(name)); - } - - public static void create(IEventBus bus) { - ITEMS.register(bus); - } + public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Delightful.MODID); + + public static final RegistryObject QUARTZ_CABINET = registerItem("quartz_cabinet", + () -> new BlockItem(DelightfulBlocks.QUARTZ_CABINET.get(), ModItems.basicItem())); + public static final RegistryObject BASALT_CABINET = registerItem("basalt_cabinet", + () -> new BlockItem(DelightfulBlocks.BASALT_CABINET.get(), ModItems.basicItem())); + + public static final RegistryObject SALMONBERRY_SACK = registerItem("salmonberry_sack", () -> + new BlockItem(DelightfulBlocks.SALMONBERRY_SACK.get(), ModItems.basicItem())); + public static final RegistryObject ACORN_SACK = registerItem("acorn_sack", () -> + new BlockItem(DelightfulBlocks.ACORN_SACK.get(), ModItems.basicItem())); + public static final RegistryObject BLUEBERRY_SACK = registerItem("blueberry_sack", () -> + new CompatBlockItem(DelightfulBlocks.BLUEBERRY_SACK.get(), (new Item.Properties()), Mods.BWG, Mods.WB, Mods.AE)); + public static final RegistryObject MENDOSTEEN_CRATE = registerItem("mendosteen_crate", () -> + new CompatBlockItem(DelightfulBlocks.MENDOSTEEN_CRATE.get(), (new Item.Properties()), Mods.AN)); + public static final RegistryObject BASTION_FRUIT_CRATE = registerItem("bastion_fruit_crate", () -> + new CompatBlockItem(DelightfulBlocks.BASTION_FRUIT_CRATE.get(), (new Item.Properties()), Mods.AN)); + public static final RegistryObject FROSTAYA_CRATE = registerItem("frostaya_crate", () -> + new CompatBlockItem(DelightfulBlocks.FROSTAYA_CRATE.get(), (new Item.Properties()), Mods.AN)); + public static final RegistryObject BOMBEGRANATE_CRATE = registerItem("bombegranate_crate", () -> + new CompatBlockItem(DelightfulBlocks.BOMBEGRANATE_CRATE.get(), (new Item.Properties()), Mods.AN)); + public static final RegistryObject GREEN_APPLE_CRATE = registerItem("green_apple_crate", () -> + new CompatBlockItem(DelightfulBlocks.GREEN_APPLE_CRATE.get(), (new Item.Properties()), Mods.BWG)); + public static final RegistryObject YUCCA_FRUIT_CRATE = registerItem("yucca_fruit_crate", () -> + new CompatBlockItem(DelightfulBlocks.YUCCA_FRUIT_CRATE.get(), (new Item.Properties()), Mods.BWG)); + public static final RegistryObject BAOBAB_FRUIT_CRATE = registerItem("baobab_fruit_crate", () -> + new CompatBlockItem(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get(), (new Item.Properties()), Mods.BWG)); + + public static final RegistryObject MATCHA_ICE_CREAM_BLOCK = registerItem("matcha_ice_cream_block", () -> + new CompatBlockItem(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get(), (new Item.Properties()), Mods.N)); + public static final RegistryObject SALMONBERRY_ICE_CREAM_BLOCK = registerItem("salmonberry_ice_cream_block", () -> + new CompatBlockItem(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get(), (new Item.Properties()), Mods.N)); + + public static final RegistryObject MATCHA_ICE_CREAM = registerItem("matcha_ice_cream", () -> new IceCreamItem((new Item.Properties()).food(Nutrition.MATCHA_ICE_CREAM))); + public static final RegistryObject SALMONBERRY_ICE_CREAM = registerItem("salmonberry_ice_cream", () -> new IceCreamItem((new Item.Properties()).food(Nutrition.SALMONBERRY_ICE_CREAM))); + public static final RegistryObject MATCHA_MILKSHAKE = registerItem("matcha_milkshake", + () -> new ShakeItem(new Item.Properties().food(Nutrition.MATCHA_MILKSHAKE))); + public static final RegistryObject SALMONBERRY_MILKSHAKE = registerItem("salmonberry_milkshake", + () -> new ShakeItem(new Item.Properties().food(Nutrition.SALMONBERRY_MILKSHAKE))); + public static final RegistryObject MATCHA = registerItem("matcha", () -> new MatchaItem(new Item.Properties().food(Nutrition.MATCHA))); + public static final RegistryObject GREEN_TEA_LEAF = registerItem("green_tea_leaf", () -> new GreenTeaLeavesItem(new Item.Properties().food(Nutrition.GREEN_TEA_LEAF))); + public static final RegistryObject SALMONBERRIES = registerFood("salmonberries", Nutrition.SALMONBERRIES); + public static final RegistryObject SALMONBERRY_PIPS = registerItem("salmonberry_pips", + () -> new ItemNameBlockItem(DelightfulBlocks.SALMONBERRY_BUSH.get(), ModItems.basicItem())); + public static final RegistryObject WILD_SALMONBERRIES = registerItem("wild_salmonberries", + () -> new BlockItem(DelightfulBlocks.WILD_SALMONBERRIES.get(), ModItems.basicItem())); + public static final RegistryObject SALMONBERRY_PIE = registerItem("salmonberry_pie", + () -> new BlockItem(DelightfulBlocks.SALMONBERRY_PIE.get(), ModItems.basicItem())); + public static final RegistryObject SALMONBERRY_PIE_SLICE = registerItem("salmonberry_pie_slice", + () -> new DItem((new Item.Properties()).food(Nutrition.SALMONBERRY_PIE_SLICE), true)); + public static final RegistryObject PUMPKIN_PIE_SLICE = registerItem("pumpkin_pie_slice", + () -> new PumpkinPieSliceItem((new Item.Properties()).food(FoodValues.PIE_SLICE))); + public static final RegistryObject SOURCE_BERRY_PIE_SLICE = registerCompatPieSlice(ArsNouveauCompat.pie + "_slice", ArsNouveauCompat.SOURCE_BERRY_PIE_SLICE, + Mods.AN); + public static final RegistryObject GLOOMGOURD_PIE_SLICE = registerCompatPieSlice(UndergardenCompat.pie + "_slice", UndergardenCompat.GLOOMGOURD_PIE_SLICE.get(), + Mods.UG); + public static final RegistryObject BLUEBERRY_PIE_SLICE = registerCompatPieSlice(BWGCompat.blueberry_pie + "_slice", BWGCompat.BLUEBERRY_PIE_SLICE.get(), + Mods.BWG); + public static final RegistryObject GREEN_APPLE_PIE_SLICE = registerCompatPieSlice(BWGCompat.green_apple_pie + "_slice", BWGCompat.GREEN_APPLE_PIE_SLICE.get(), + Mods.BWG); + public static final RegistryObject ANIMAL_FAT = registerFood("animal_fat", Nutrition.ANIMAL_FAT); + public static final RegistryObject ANIMAL_OIL_BOTTLE = registerItem("animal_oil_bottle", + () -> new FurnaceFuelItem((new Item.Properties()).craftRemainder(Items.GLASS_BOTTLE), 3200)); + public static final RegistryObject ACORN = registerFood("acorn", Nutrition.ACORN); + public static final RegistryObject ROASTED_ACORN = registerFood("roasted_acorn", Nutrition.ROASTED_ACORN); + public static final RegistryObject NUT_DOUGH = registerFood("nut_dough", Nutrition.NUT_DOUGH); + public static final RegistryObject CHOPPED_CLOVER = registerItem("chopped_clover", () -> new ReverseTagItem((new Item.Properties()).food(Nutrition.CHOPPED_CLOVER), DelightfulItemTags.CLOVER)); + public static final RegistryObject CACTUS_FLESH = registerFood("cactus_flesh", Nutrition.CACTUS_FLESH); + public static final RegistryObject CACTUS_STEAK = registerFood("cactus_steak", Nutrition.CACTUS_STEAK); + public static final RegistryObject CACTUS_CHILI = registerItem("cactus_chili", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.CACTUS_CHILI).stacksTo(16).craftRemainder(Items.BOWL), true)); + public static final RegistryObject CACTUS_SOUP = registerItem("cactus_soup", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.CACTUS_SOUP).stacksTo(16).craftRemainder(Items.BOWL), true)); + public static final RegistryObject CACTUS_SOUP_CUP = registerItem("cactus_soup_cup", () -> new CupItem((new Item.Properties()).food(Nutrition.CACTUS_SOUP_CUP), true, false)); + public static final RegistryObject FIELD_SALAD = registerItem("field_salad", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.FIELD_SALAD).stacksTo(16).craftRemainder(Items.BOWL), true)); + public static final RegistryObject COCONUT_CURRY = registerItem("coconut_curry", + () -> new CoconutCurryItem((new Item.Properties()).food(Nutrition.COCONUT_CURRY).stacksTo(16).craftRemainder(Items.BOWL))); + public static final RegistryObject SINIGANG = registerItem("sinigang", () -> new ConsumableItem((new Item.Properties()).food(Nutrition.SINIGANG).craftRemainder(Items.BOWL).stacksTo(16), true, false)); + public static final RegistryObject AZALEA_TEA = registerItem("azalea_tea", + () -> new AzaleaTeaItem((new Item.Properties()).food(Nutrition.AZALEA_TEA).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false)); + public static final RegistryObject LAVENDER_TEA = registerItem("lavender_tea", + () -> new LavenderTeaItem((new Item.Properties()).food(Nutrition.LAVENDER_TEA).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false)); + public static final RegistryObject PRICKLY_PEAR_JUICE = registerItem("prickly_pear_juice", () -> new CompatDrinkItem((new Item.Properties()).food(Nutrition.PRICKLY_PEAR_JUICE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 0.0F, true, false, Mods.ECO)); + public static final RegistryObject ENDER_NECTAR = registerItem("ender_nectar", () -> new EnderNectarItem((new Item.Properties()).food(Nutrition.ENDER_NECTAR).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16))); + public static final RegistryObject MATCHA_LATTE = registerItem("matcha_latte", () -> new DrinkItem((new Item.Properties()).food(Nutrition.MATCHA_LATTE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 2.0F, true, true)); + public static final RegistryObject BERRY_MATCHA_LATTE = registerItem("berry_matcha_latte", () -> new DrinkItem((new Item.Properties()).food(Nutrition.BERRY_MATCHA_LATTE).craftRemainder(Items.GLASS_BOTTLE).stacksTo(16), 2.0F, true, true)); + public static final RegistryObject JELLY_BOTTLE = registerItem("jelly_bottle", () -> new JamJarItem((new Item.Properties()).food(Nutrition.JELLY_BOTTLE).craftRemainder(Items.GLASS_BOTTLE), false, false)); + public static final RegistryObject GLOW_JELLY_BOTTLE = registerItem("glow_jelly_bottle", () -> new JamJarItem((new Item.Properties()).food(Nutrition.GLOW_JELLY_BOTTLE).craftRemainder(Items.GLASS_BOTTLE), true, false)); + public static final RegistryObject NUT_BUTTER_BOTTLE = registerItem("nut_butter_bottle", () -> new NutButterBottleItem(((new Item.Properties()).food(Nutrition.NUT_BUTTER_BOTTLE).craftRemainder(Items.GLASS_BOTTLE)))); + public static final RegistryObject NUT_BUTTER_AND_JELLY_SANDWICH = registerConsumable("nut_butter_and_jelly_sandwich", Nutrition.NUT_BUTTER_AND_JELLY_SANDWICH, null, true, false); + public static final RegistryObject CHEESEBURGER = registerItem("cheeseburger", () -> new CheeseburgerItem((new Item.Properties()).food(Nutrition.CHEESEBURGER))); + public static final RegistryObject DELUXE_CHEESEBURGER = registerConsumable("deluxe_cheeseburger", Nutrition.DELUXE_CHEESEBURGER, null, true, false); + public static final RegistryObject CHUNKWICH = registerCompatFood("chunkwich", Nutrition.CHUNKWICH, + Mods.RL); + public static final RegistryObject ROCK_CANDY = registerItem("rock_candy", + () -> new RockCandyItem((new Item.Properties()).food(Nutrition.ROCK_CANDY).craftRemainder(Items.STICK))); + public static final RegistryObject MARSHMALLOW_STICK = registerFood("marshmallow_stick", Nutrition.MARSHMALLOW_STICK, Items.STICK); + public static final RegistryObject COOKED_MARSHMALLOW_STICK = registerFood("cooked_marshmallow_stick", Nutrition.COOKED_MARSHMALLOW_STICK, Items.STICK); + public static final RegistryObject SMORE = registerConsumable("smore", Nutrition.SMORE, null, true, false); + public static final RegistryObject CRAB_RANGOON = registerItem("crab_rangoon", + () -> new ReverseTagItem(new Item.Properties().food(Nutrition.CRAB_RANGOON), DelightfulItemTags.CRAB_MEAT)); + public static final RegistryObject HONEY_GLAZED_WALNUT = registerItem("honey_glazed_walnut", + () -> new ReverseTagItem(new Item.Properties().food(Nutrition.HONEY_GLAZED_WALNUT), DelightfulItemTags.NUTS_WALNUT)); + public static final RegistryObject VENISON_CHOPS = registerItem("venison_chops", + () -> new VenisonItem(new Item.Properties().food(Nutrition.VENISON_CHOPS))); + public static final RegistryObject COOKED_VENISON_CHOPS = registerItem("cooked_venison_chops", + () -> new VenisonItem(new Item.Properties().food(Nutrition.COOKED_VENISON_CHOPS))); + public static final RegistryObject RAW_GOAT = registerItem("raw_goat", + () -> new GoatMeatItem(new Item.Properties().food(Nutrition.RAW_GOAT))); + public static final RegistryObject COOKED_GOAT = registerItem("cooked_goat", + () -> new GoatMeatItem(new Item.Properties().food(Nutrition.COOKED_GOAT))); + public static final RegistryObject MINI_MELON = registerItem("mini_melon", () -> + new BlockItem(DelightfulBlocks.MINI_MELON.get(), ModItems.basicItem())); + public static final RegistryObject CANTALOUPE = registerItem("cantaloupe", () -> + new BlockItem(DelightfulBlocks.CANTALOUPE.get(), ModItems.basicItem())); + public static final RegistryObject CANTALOUPE_SEEDS = registerItem("cantaloupe_seeds", + () -> new ItemNameBlockItem(DelightfulBlocks.CANTALOUPE_PLANT.get(), ModItems.basicItem())); + public static final RegistryObject CANTALOUPE_SLICE = registerFood("cantaloupe_slice", Nutrition.CANTALOUPE_SLICE); + public static final RegistryObject CANTALOUPE_BREAD = registerConsumable("cantaloupe_bread", Nutrition.CANTALOUPE_BREAD, null, true, false); + public static final RegistryObject WRAPPED_CANTALOUPE = registerConsumable("wrapped_cantaloupe", Nutrition.WRAPPED_CANTALOUPE, null, true, false); + public static final RegistryObject CANTALOUPE_POPSICLE = registerConsumable("cantaloupe_popsicle", Nutrition.CANTALOUPE_POPSICLE, Items.STICK, true, false); + public static final RegistryObject STUFFED_CANTALOUPE_BLOCK = registerItem("stuffed_cantaloupe_block", + () -> new BlockItem(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get(), ModItems.basicItem().stacksTo(1))); + public static final RegistryObject STUFFED_CANTALOUPE = registerConsumable("stuffed_cantaloupe", Nutrition.STUFFED_CANTALOUPE, Items.BOWL, true, false); + + public static final RegistryObject SALMONBERRY_GUMMY = registerItem("salmonberry_gummy", + () -> new GummyItem((new Item.Properties()).food(Nutrition.SALMONBERRY_GUMMY))); + public static final RegistryObject MATCHA_GUMMY = registerItem("matcha_gummy", + () -> new GummyItem((new Item.Properties()).food(Nutrition.MATCHA_GUMMY))); + public static final RegistryObject CANTALOUPE_GUMMY = registerItem("cantaloupe_gummy", + () -> new GummyItem((new Item.Properties()).food(Nutrition.CANTALOUPE_GUMMY))); + + // Registers food, optional craftRemainder + public static RegistryObject registerFood(String name, FoodProperties food, Item... remainder) { + if (remainder.length > 0) { + if (remainder[0].equals(Items.BOWL)) { + return registerItem(name, + () -> new BowlFoodItem((new Item.Properties()).food(food).craftRemainder(Items.BOWL))); + } else { + return registerConsumable(name, food, remainder[0], false, false); + } + } + return registerItem(name, () -> new DItem((new Item.Properties()).food(food))); + } + + public static RegistryObject registerConsumable(String name, FoodProperties food, @Nullable Item remainder, boolean hasFoodEffectTooltip, boolean hasCustomTooltip) { + return registerItem(name, + () -> new ConsumableItem((new Item.Properties()).food(food).craftRemainder(remainder), hasFoodEffectTooltip, hasCustomTooltip)); + } + + public static RegistryObject registerCompatPieSlice(String name, FoodProperties food, String modid) { + return registerItem(name, () -> new CompatItem((new Item.Properties().food(food)), true, modid)); + } + + public static RegistryObject registerCompatFood(String name, FoodProperties food, String modid) { + return registerItem(name, () -> new CompatItem((new Item.Properties().food(food)), modid)); + } + + public static RegistryObject registerItem(String name, Supplier item) { + return ITEMS.register(name, item); + } + + public static TagKey ingot(String name) { + return DelightfulItemTags.forge("ingots/" + name); + } + + public static TagKey gem(String name) { + return DelightfulItemTags.forge("gems/" + name); + } + + public static Ingredient getIngot(String name) { + return Ingredient.of(ingot(name)); + } + + public static Ingredient getGem(String name) { + return Ingredient.of(gem(name)); + } + + public static void create(IEventBus bus) { + ITEMS.register(bus); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/DelightfulTiers.java b/src/main/java/net/brnbrd/delightful/common/item/DelightfulTiers.java index 39fffb1a..e965f828 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/DelightfulTiers.java +++ b/src/main/java/net/brnbrd/delightful/common/item/DelightfulTiers.java @@ -11,129 +11,129 @@ import java.util.Locale; public enum DelightfulTiers implements Tier { - BONE(1, 190, 5F, 1.5F, 9, Ingredient.of(Tags.Items.BONES)), - AMETHYST(2, 44, 15F, 0.5F, 1, Ingredient.of(Tags.Items.GEMS_AMETHYST)), - EMERALD(2, 250, 14F, 3.5F, 24, Ingredient.of(Tags.Items.GEMS_EMERALD)), - COPPER(2, 150, 5F, 1.5F, 14, DelightfulItems.getIngot("copper")), - TIN(1, 120, 13F, 1.5F, 18, DelightfulItems.getIngot("tin")), - STEEL(2, 484, 6.5F, 2.5F, 16, DelightfulItems.getIngot("steel")), - SILVER(2, 484, 6F, 2F, 16, DelightfulItems.getIngot("silver")), - BRASS(2, 484, 6F, 2.5F, 16, DelightfulItems.getIngot("brass")), - ENDERITE(5, 2401, 10F, 5F, 15, DelightfulItems.getIngot("enderite")), - OBSIDIAN_INFUSED_ENDERITE(5, 2771, 11F, 6F, 15, DelightfulItems.getIngot("obsidian_infused_enderite")), - BRONZE(2, 375, 3F, 2F, 10, DelightfulItems.getIngot("bronze")), - OSMIUM(3, 1024, 4F, 4F, 14, DelightfulItems.getIngot("osmium")), - REFINED_GLOWSTONE(2, 384, 15F, 2F, 20, DelightfulItems.getIngot("refined_glowstone")), - REFINED_OBSIDIAN(6, 4096, 12F, 8F, 18, DelightfulItems.getIngot("refined_obsidian")), - LAPIS_LAZULI(1, 128, 4F, 1F, 32, DelightfulItems.getGem("lapis")), - LARGE_AMETHYST(4, 2625, 12F, 4F, 35, DelightfulItems.getGem("large_amethyst")), - BLACK_OPAL(5, 5250, 16F, 5F, 15, DelightfulItems.getGem("black_opal")), - NETHERITE_OPAL(6, 6300, 16F, 6F, 20, DelightfulItems.getGem("black_opal")), - CONSTANTAN(2, 250, 5.5F, 2F, 10, DelightfulItems.getIngot("constantan")), - ELECTRUM(2, 96, 13F, 2F, 28, DelightfulItems.getIngot("electrum")), - INVAR(2, 300, 7F, 2.5F, 13, DelightfulItems.getIngot("invar")), - LEAD(1, 130, 12F, 1.5F, 16, DelightfulItems.getIngot("lead")), - NICKEL(2, 225, 7F, 2.5F, 12, DelightfulItems.getIngot("nickel")), - IRONWOOD(2, 512, 6.5F, 2, 25, DelightfulItems.getIngot("ironwood")), - FIERY(4, 1024, 9F, 4, 10, DelightfulItems.getIngot("fiery")), - STEELEAF(3, 131, 8F, 3, 9, DelightfulItems.getIngot("steeleaf")), - KNIGHTMETAL(3, 512, 8F, 3, 8, DelightfulItems.getIngot("knightmetal")), - LIVING(2, 192, 6F, 2F, 18, Ingredient.EMPTY), - DRACO_ARCANUS(4, 2661, 12F, 7F, 20, Ingredient.of(DelightfulItemTags.DRAGON_SCALE)), - MYTHRIL(Tiers.IRON.getLevel(), 800, 8F, 3F, 12, DelightfulItems.getIngot("mythril")), - ADAMANTIUM(Tiers.IRON.getLevel(), 1150, 14F, 3F, 3, DelightfulItems.getIngot("adamantium")), - ONYX(Tiers.NETHERITE.getLevel(), 3280, 10F, 5F, 15, DelightfulItems.getIngot("onyx")), - THYRIUM(Tiers.DIAMOND.getLevel(), 2000, 22F, 6F, 28, DelightfulItems.getIngot("thyrium")), - SINISITE(5, 4100, 18F, 8F, 11, DelightfulItems.getIngot("sinisite")), - ALLTHEMODIUM(5, 15000, 10, 11F, 85, Ingredient.of(DelightfulItemTags.PLATES_ALLTHEMODIUM)), - WARDEN(4, 2464, 11F, 7F, 21, Ingredient.of(DelightfulItemTags.REINFORCED_ECHO_SHARD)), - ZINC(2, 250, 7F, 2F, 11, Ingredient.of(DelightfulItemTags.INGOTS_ZINC)), - GILDED_QUARTZ(3, 1644, 9F, 4F, 14, Ingredient.of(DelightfulItemTags.POLISHED_ROSE_QUARTZ)), - EXPERIENCE(2, 270, 7F, 1.5F, 800, Ingredient.of(DelightfulItemTags.HEAP_EXPERIENCE)), - KIWANO(2, 250, 6F, 2F, 14, Ingredient.of(DelightfulItemTags.KIWANO_PEEL)), - LEAF(1, 16, 20F, 4F, 14, Ingredient.of(DelightfulItemTags.SHARP_LEAF)), - BLAZING(3, 450, 12F, 2.5F, 2, Ingredient.of(Tags.Items.INGOTS_GOLD)), - ADAMANTITE(4, 0, 8F, 3.5F, 15, DelightfulItems.getIngot("adamantite")), - CRYSTALLINE(2, 183, 1F, 3.5F, 11, Ingredient.of(DelightfulItemTags.CRYSTAL_SPIKE_TIPS)), - ROSE_GOLD(2, 900, 9F, 2F, 17, Ingredient.of(Tags.Items.INGOTS_COPPER)), - GILDED_NETHERITE(4, 2031, 10F, 4F, 20, Ingredient.of(Tags.Items.INGOTS_NETHERITE)), - SOUL_STEEL(3, 200, 9F, 3.5F, 25, Ingredient.EMPTY), - NECRONIUM(3, 956, 7F, 2F, 2, DelightfulItems.getIngot("necronium")), - CLOGGRUM(2, 286, 6.0F, 3.0F, 8, DelightfulItems.getIngot("cloggrum")), - FROSTSTEEL(2, 575, 7.0F, 2.0F, 20, DelightfulItems.getIngot("froststeel")), - UTHERIUM(3, 1279, 8.5F, 3.5F, 17, DelightfulItems.getIngot("utherium")), - FORGOTTEN(4, 1876, 8.0F, 3.0F, 2, DelightfulItems.getIngot("forgotten_metal")), - SKYROOT(0, 59, 2.0F, 0.0F, 15, Ingredient.of(Util.it(Mods.AE, "skyroot_repairing"))), - HOLYSTONE(1, 131, 4.0F, 1.0F, 5, Ingredient.of(Util.it(Mods.AE, "holystone_repairing"))), - ZANITE(2, 250, 6.0F, 2.0F, 14, Ingredient.of(Util.it(Mods.AE, "zanite_repairing"))), - GRAVITITE(3, 1561, 8.0F, 3.0F, 10, Ingredient.of(Util.it(Mods.AE, "gravitite_repairing"))), - PHOENIX(3, 1561, 8.0F, 4.0F, 12, Ingredient.EMPTY), - VERIDIUM(2, 750, 2.25F, 1.0F, 0, Ingredient.of(DelightfulItemTags.INGOTS_VERIDIUM)), - INFUSED_VERIDIUM(2, 750, 7.0F, 1.0F, 0, Ingredient.of(DelightfulItemTags.INGOTS_VERIDIUM)), - VALKYRUM(5, 2031, 9.0F, 4.0F, 15, Ingredient.of(Util.it("ancient_aether", "valkyrum_repairing"))), - NETHER_QUARTZ( - Tiers.IRON.getLevel(), - Tiers.IRON.getUses(), - Tiers.IRON.getSpeed(), - Tiers.IRON.getAttackDamageBonus(), - Tiers.IRON.getEnchantmentValue(), - Ingredient.of(Tags.Items.GEMS_QUARTZ)), - CERTUS_QUARTZ( - Tiers.IRON.getLevel(), - Tiers.IRON.getUses(), - Tiers.IRON.getSpeed(), - Tiers.IRON.getAttackDamageBonus(), - Tiers.IRON.getEnchantmentValue(), - Ingredient.of(DelightfulItemTags.CERTUS_QUARTZ)), - FLUIX( - Tiers.IRON.getLevel(), - Tiers.IRON.getUses() * 3, - Tiers.IRON.getSpeed() * 1.2F, - Tiers.IRON.getAttackDamageBonus() * 1.2F, - Tiers.IRON.getEnchantmentValue(), - Ingredient.of(DelightfulItemTags.FLUIX_CRYSTAL)); + BONE(1, 190, 5F, 1.5F, 9, Ingredient.of(Tags.Items.BONES)), + AMETHYST(2, 44, 15F, 0.5F, 1, Ingredient.of(Tags.Items.GEMS_AMETHYST)), + EMERALD(2, 250, 14F, 3.5F, 24, Ingredient.of(Tags.Items.GEMS_EMERALD)), + COPPER(2, 150, 5F, 1.5F, 14, DelightfulItems.getIngot("copper")), + TIN(1, 120, 13F, 1.5F, 18, DelightfulItems.getIngot("tin")), + STEEL(2, 484, 6.5F, 2.5F, 16, DelightfulItems.getIngot("steel")), + SILVER(2, 484, 6F, 2F, 16, DelightfulItems.getIngot("silver")), + BRASS(2, 484, 6F, 2.5F, 16, DelightfulItems.getIngot("brass")), + ENDERITE(5, 2401, 10F, 5F, 15, DelightfulItems.getIngot("enderite")), + OBSIDIAN_INFUSED_ENDERITE(5, 2771, 11F, 6F, 15, DelightfulItems.getIngot("obsidian_infused_enderite")), + BRONZE(2, 375, 3F, 2F, 10, DelightfulItems.getIngot("bronze")), + OSMIUM(3, 1024, 4F, 4F, 14, DelightfulItems.getIngot("osmium")), + REFINED_GLOWSTONE(2, 384, 15F, 2F, 20, DelightfulItems.getIngot("refined_glowstone")), + REFINED_OBSIDIAN(6, 4096, 12F, 8F, 18, DelightfulItems.getIngot("refined_obsidian")), + LAPIS_LAZULI(1, 128, 4F, 1F, 32, DelightfulItems.getGem("lapis")), + LARGE_AMETHYST(4, 2625, 12F, 4F, 35, DelightfulItems.getGem("large_amethyst")), + BLACK_OPAL(5, 5250, 16F, 5F, 15, DelightfulItems.getGem("black_opal")), + NETHERITE_OPAL(6, 6300, 16F, 6F, 20, DelightfulItems.getGem("black_opal")), + CONSTANTAN(2, 250, 5.5F, 2F, 10, DelightfulItems.getIngot("constantan")), + ELECTRUM(2, 96, 13F, 2F, 28, DelightfulItems.getIngot("electrum")), + INVAR(2, 300, 7F, 2.5F, 13, DelightfulItems.getIngot("invar")), + LEAD(1, 130, 12F, 1.5F, 16, DelightfulItems.getIngot("lead")), + NICKEL(2, 225, 7F, 2.5F, 12, DelightfulItems.getIngot("nickel")), + IRONWOOD(2, 512, 6.5F, 2, 25, DelightfulItems.getIngot("ironwood")), + FIERY(4, 1024, 9F, 4, 10, DelightfulItems.getIngot("fiery")), + STEELEAF(3, 131, 8F, 3, 9, DelightfulItems.getIngot("steeleaf")), + KNIGHTMETAL(3, 512, 8F, 3, 8, DelightfulItems.getIngot("knightmetal")), + LIVING(2, 192, 6F, 2F, 18, Ingredient.EMPTY), + DRACO_ARCANUS(4, 2661, 12F, 7F, 20, Ingredient.of(DelightfulItemTags.DRAGON_SCALE)), + MYTHRIL(Tiers.IRON.getLevel(), 800, 8F, 3F, 12, DelightfulItems.getIngot("mythril")), + ADAMANTIUM(Tiers.IRON.getLevel(), 1150, 14F, 3F, 3, DelightfulItems.getIngot("adamantium")), + ONYX(Tiers.NETHERITE.getLevel(), 3280, 10F, 5F, 15, DelightfulItems.getIngot("onyx")), + THYRIUM(Tiers.DIAMOND.getLevel(), 2000, 22F, 6F, 28, DelightfulItems.getIngot("thyrium")), + SINISITE(5, 4100, 18F, 8F, 11, DelightfulItems.getIngot("sinisite")), + ALLTHEMODIUM(5, 15000, 10, 11F, 85, Ingredient.of(DelightfulItemTags.PLATES_ALLTHEMODIUM)), + WARDEN(4, 2464, 11F, 7F, 21, Ingredient.of(DelightfulItemTags.REINFORCED_ECHO_SHARD)), + ZINC(2, 250, 7F, 2F, 11, Ingredient.of(DelightfulItemTags.INGOTS_ZINC)), + GILDED_QUARTZ(3, 1644, 9F, 4F, 14, Ingredient.of(DelightfulItemTags.POLISHED_ROSE_QUARTZ)), + EXPERIENCE(2, 270, 7F, 1.5F, 800, Ingredient.of(DelightfulItemTags.HEAP_EXPERIENCE)), + KIWANO(2, 250, 6F, 2F, 14, Ingredient.of(DelightfulItemTags.KIWANO_PEEL)), + LEAF(1, 16, 20F, 4F, 14, Ingredient.of(DelightfulItemTags.SHARP_LEAF)), + BLAZING(3, 450, 12F, 2.5F, 2, Ingredient.of(Tags.Items.INGOTS_GOLD)), + ADAMANTITE(4, 0, 8F, 3.5F, 15, DelightfulItems.getIngot("adamantite")), + CRYSTALLINE(2, 183, 1F, 3.5F, 11, Ingredient.of(DelightfulItemTags.CRYSTAL_SPIKE_TIPS)), + ROSE_GOLD(2, 900, 9F, 2F, 17, Ingredient.of(Tags.Items.INGOTS_COPPER)), + GILDED_NETHERITE(4, 2031, 10F, 4F, 20, Ingredient.of(Tags.Items.INGOTS_NETHERITE)), + SOUL_STEEL(3, 200, 9F, 3.5F, 25, Ingredient.EMPTY), + NECRONIUM(3, 956, 7F, 2F, 2, DelightfulItems.getIngot("necronium")), + CLOGGRUM(2, 286, 6.0F, 3.0F, 8, DelightfulItems.getIngot("cloggrum")), + FROSTSTEEL(2, 575, 7.0F, 2.0F, 20, DelightfulItems.getIngot("froststeel")), + UTHERIUM(3, 1279, 8.5F, 3.5F, 17, DelightfulItems.getIngot("utherium")), + FORGOTTEN(4, 1876, 8.0F, 3.0F, 2, DelightfulItems.getIngot("forgotten_metal")), + SKYROOT(0, 59, 2.0F, 0.0F, 15, Ingredient.of(Util.it(Mods.AE, "skyroot_repairing"))), + HOLYSTONE(1, 131, 4.0F, 1.0F, 5, Ingredient.of(Util.it(Mods.AE, "holystone_repairing"))), + ZANITE(2, 250, 6.0F, 2.0F, 14, Ingredient.of(Util.it(Mods.AE, "zanite_repairing"))), + GRAVITITE(3, 1561, 8.0F, 3.0F, 10, Ingredient.of(Util.it(Mods.AE, "gravitite_repairing"))), + PHOENIX(3, 1561, 8.0F, 4.0F, 12, Ingredient.EMPTY), + VERIDIUM(2, 750, 2.25F, 1.0F, 0, Ingredient.of(DelightfulItemTags.INGOTS_VERIDIUM)), + INFUSED_VERIDIUM(2, 750, 7.0F, 1.0F, 0, Ingredient.of(DelightfulItemTags.INGOTS_VERIDIUM)), + VALKYRUM(5, 2031, 9.0F, 4.0F, 15, Ingredient.of(Util.it("ancient_aether", "valkyrum_repairing"))), + NETHER_QUARTZ( + Tiers.IRON.getLevel(), + Tiers.IRON.getUses(), + Tiers.IRON.getSpeed(), + Tiers.IRON.getAttackDamageBonus(), + Tiers.IRON.getEnchantmentValue(), + Ingredient.of(Tags.Items.GEMS_QUARTZ)), + CERTUS_QUARTZ( + Tiers.IRON.getLevel(), + Tiers.IRON.getUses(), + Tiers.IRON.getSpeed(), + Tiers.IRON.getAttackDamageBonus(), + Tiers.IRON.getEnchantmentValue(), + Ingredient.of(DelightfulItemTags.CERTUS_QUARTZ)), + FLUIX( + Tiers.IRON.getLevel(), + Tiers.IRON.getUses() * 3, + Tiers.IRON.getSpeed() * 1.2F, + Tiers.IRON.getAttackDamageBonus() * 1.2F, + Tiers.IRON.getEnchantmentValue(), + Ingredient.of(DelightfulItemTags.FLUIX_CRYSTAL)); - private final int level; - private final int uses; - private final float speed; - private final float damage; - private final int enchantmentValue; - private final Ingredient repairIngredient; + private final int level; + private final int uses; + private final float speed; + private final float damage; + private final int enchantmentValue; + private final Ingredient repairIngredient; - DelightfulTiers(int level, int uses, float speed, float damage, int enchantmentValue, Ingredient repairIngredient) { - this.level = level; - this.uses = uses; - this.speed = speed; - this.damage = damage; - this.enchantmentValue = enchantmentValue; - this.repairIngredient = repairIngredient; - } + DelightfulTiers(int level, int uses, float speed, float damage, int enchantmentValue, Ingredient repairIngredient) { + this.level = level; + this.uses = uses; + this.speed = speed; + this.damage = damage; + this.enchantmentValue = enchantmentValue; + this.repairIngredient = repairIngredient; + } - public int getLevel() { - return this.level; - } + public static Tier get(String name) { + return valueOf(name.toUpperCase(Locale.ROOT)); + } - public int getUses() { - return this.uses; - } + public int getLevel() { + return this.level; + } - public float getSpeed() { - return this.speed; - } + public int getUses() { + return this.uses; + } - public float getAttackDamageBonus() { - return this.damage; - } + public float getSpeed() { + return this.speed; + } - public int getEnchantmentValue() { - return this.enchantmentValue; - } + public float getAttackDamageBonus() { + return this.damage; + } - public @NotNull Ingredient getRepairIngredient() { - return this.repairIngredient; - } + public int getEnchantmentValue() { + return this.enchantmentValue; + } - public static Tier get(String name) { - return valueOf(name.toUpperCase(Locale.ROOT)); - } + public @NotNull Ingredient getRepairIngredient() { + return this.repairIngredient; + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/FurnaceFuelItem.java b/src/main/java/net/brnbrd/delightful/common/item/FurnaceFuelItem.java index a0c99d69..2770a024 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/FurnaceFuelItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/FurnaceFuelItem.java @@ -17,57 +17,57 @@ import java.util.List; public class FurnaceFuelItem extends DItem { - private final int fuelTime; + private final int fuelTime; - public FurnaceFuelItem(Properties pProperties, int fuelTime) { - super(pProperties); - this.fuelTime = fuelTime; - } + public FurnaceFuelItem(Properties pProperties, int fuelTime) { + super(pProperties); + this.fuelTime = fuelTime; + } - @Override - public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { - if (this.enabled()) { - comps.add(Component.translatable("tooltip.sneak_right").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.UNDERLINE)); - comps.add( - Component.literal(String.valueOf(this.fuelTime / 20)).withStyle(ChatFormatting.YELLOW) - .append(Component.translatable("tooltip.furnace_fuel_burn_time").withStyle(ChatFormatting.WHITE)) - ); - } - super.appendHoverText(stack, level, comps, pIsAdvanced); - } + public static InteractionResult useFuel(ItemStack stack, BlockEntity entity, Player player) { + if ( + stack.getItem() instanceof FurnaceFuelItem fuel && + entity instanceof AbstractFurnaceBlockEntity furnace + ) { + ContainerData data = furnace.dataAccess; + int newTime = data.get(0) + fuel.fuelTime + 1; + data.set(0, newTime); + data.set(1, newTime); + furnace.setChanged(); + shrinkAdd(player, stack); + return InteractionResult.CONSUME_PARTIAL; + } + return InteractionResult.FAIL; + } - @Override - public @NotNull InteractionResult useOn(UseOnContext con) { - return useFuel(con.getItemInHand(), - con.getLevel().getExistingBlockEntity(con.getClickedPos()), - con.getPlayer()); - } + private static void shrinkAdd(Player p, ItemStack i) { + if (i.hasCraftingRemainingItem()) { + p.addItem(i.getCraftingRemainingItem()); + } + i.shrink(1); + } - public static InteractionResult useFuel(ItemStack stack, BlockEntity entity, Player player) { - if ( - stack.getItem() instanceof FurnaceFuelItem fuel && - entity instanceof AbstractFurnaceBlockEntity furnace - ) { - ContainerData data = furnace.dataAccess; - int newTime = data.get(0) + fuel.fuelTime + 1; - data.set(0, newTime); - data.set(1, newTime); - furnace.setChanged(); - shrinkAdd(player, stack); - return InteractionResult.CONSUME_PARTIAL; - } - return InteractionResult.FAIL; - } + @Override + public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { + if (this.enabled()) { + comps.add(Component.translatable("tooltip.sneak_right").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.UNDERLINE)); + comps.add( + Component.literal(String.valueOf(this.fuelTime / 20)).withStyle(ChatFormatting.YELLOW) + .append(Component.translatable("tooltip.furnace_fuel_burn_time").withStyle(ChatFormatting.WHITE)) + ); + } + super.appendHoverText(stack, level, comps, pIsAdvanced); + } - private static void shrinkAdd(Player p, ItemStack i) { - if (i.hasCraftingRemainingItem()) { - p.addItem(i.getCraftingRemainingItem()); - } - i.shrink(1); - } + @Override + public @NotNull InteractionResult useOn(UseOnContext con) { + return useFuel(con.getItemInHand(), + con.getLevel().getExistingBlockEntity(con.getClickedPos()), + con.getPlayer()); + } - @Override - public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { - return this.fuelTime; - } -} + @Override + public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { + return this.fuelTime; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/ICompat.java b/src/main/java/net/brnbrd/delightful/common/item/ICompat.java index ec133c64..05cabd54 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/ICompat.java +++ b/src/main/java/net/brnbrd/delightful/common/item/ICompat.java @@ -7,16 +7,16 @@ import java.util.List; public interface ICompat extends IConfigured { - enum Strategy { AND, OR } default Strategy getStrategy() { return Strategy.OR; } + String[] getModid(); default boolean isLoaded() { return (this.getStrategy() == Strategy.AND) ? - Mods.loaded(this.getModid()) : - Mods.orLoaded(this.getModid()); + Mods.loaded(this.getModid()) : + Mods.orLoaded(this.getModid()); } @Override @@ -33,4 +33,6 @@ default boolean enabledText(List comps) { } return IConfigured.super.enabledText(comps); } -} + + enum Strategy {AND, OR} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/IConfigured.java b/src/main/java/net/brnbrd/delightful/common/item/IConfigured.java index 0b457dfe..542cc691 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/IConfigured.java +++ b/src/main/java/net/brnbrd/delightful/common/item/IConfigured.java @@ -9,19 +9,19 @@ public interface IConfigured extends ItemLike { - default String[] getConflicts() { - return new String[0]; - } + default String[] getConflicts() { + return new String[0]; + } - default boolean enabled() { - return Util.enabled(this.asItem()) && !Mods.orLoaded(this.getConflicts()); - } + default boolean enabled() { + return Util.enabled(this.asItem()) && !Mods.orLoaded(this.getConflicts()); + } - default boolean enabledText(List comps) { - if (!this.enabled()) { - comps.add(Component.translatable("tooltip.config_disabled").withStyle(ChatFormatting.UNDERLINE)); - return false; - } - return true; - } -} + default boolean enabledText(List comps) { + if (!this.enabled()) { + comps.add(Component.translatable("tooltip.config_disabled").withStyle(ChatFormatting.UNDERLINE)); + return false; + } + return true; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/TagItem.java b/src/main/java/net/brnbrd/delightful/common/item/TagItem.java index 722477e0..cc769d26 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/TagItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/TagItem.java @@ -10,7 +10,6 @@ import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; - import java.util.List; // Item is enabled if tag is empty @@ -30,8 +29,8 @@ public boolean enabled() { public boolean isTag() { var tags = ForgeRegistries.ITEMS.tags(); return tags != null && ( - !tags.isKnownTagName(this.tag) || - (tags.isKnownTagName(this.tag) && tags.getTag(this.tag).isEmpty()) + !tags.isKnownTagName(this.tag) || + (tags.isKnownTagName(this.tag) && tags.getTag(this.tag).isEmpty()) ); } diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/CheeseburgerItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/CheeseburgerItem.java index db7641df..387ee68f 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/CheeseburgerItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/CheeseburgerItem.java @@ -9,6 +9,6 @@ public CheeseburgerItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{ Mods.VD }; + return new String[]{Mods.VD}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/CompatConsumableItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/CompatConsumableItem.java index 5aaed596..79c735c2 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/CompatConsumableItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/CompatConsumableItem.java @@ -5,9 +5,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import java.util.List; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.List; public class CompatConsumableItem extends DConsumableItem implements ICompat { private final String[] modid; @@ -28,4 +28,4 @@ public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @No super.appendHoverText(stack, level, comps, pIsAdvanced); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/DrinkItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/DrinkItem.java index 0b7725d4..e613c8f9 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/DrinkItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/DrinkItem.java @@ -17,41 +17,41 @@ import vectorwing.farmersdelight.common.item.DrinkableItem; public class DrinkItem extends DrinkableItem implements IConfigured { - private final float heal; + private final float heal; - public DrinkItem(Item.Properties properties, float heal, boolean hasPotionEffectTooltip, boolean hasCustomTooltip) { - super(properties, hasPotionEffectTooltip, hasCustomTooltip); - this.heal = heal; - } + public DrinkItem(Item.Properties properties, float heal, boolean hasPotionEffectTooltip, boolean hasCustomTooltip) { + super(properties, hasPotionEffectTooltip, hasCustomTooltip); + this.heal = heal; + } - @Override - public @NotNull ItemStack finishUsingItem(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity entity) { - super.finishUsingItem(stack, worldIn, entity); - if (entity instanceof ServerPlayer serverPlayer) { - CriteriaTriggers.CONSUME_ITEM.trigger(serverPlayer, stack); - serverPlayer.awardStat(Stats.ITEM_USED.get(this)); - } - if (stack.isEmpty()) { - return new ItemStack(Items.GLASS_BOTTLE); - } else { - if (entity instanceof Player player && !player.getAbilities().instabuild) { - ItemStack itemstack = new ItemStack(Items.GLASS_BOTTLE); - if (!player.getInventory().add(itemstack)) { - player.drop(itemstack, false); - } - } - return stack; - } - } + @Override + public @NotNull ItemStack finishUsingItem(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity entity) { + super.finishUsingItem(stack, worldIn, entity); + if (entity instanceof ServerPlayer serverPlayer) { + CriteriaTriggers.CONSUME_ITEM.trigger(serverPlayer, stack); + serverPlayer.awardStat(Stats.ITEM_USED.get(this)); + } + if (stack.isEmpty()) { + return new ItemStack(Items.GLASS_BOTTLE); + } else { + if (entity instanceof Player player && !player.getAbilities().instabuild) { + ItemStack itemstack = new ItemStack(Items.GLASS_BOTTLE); + if (!player.getInventory().add(itemstack)) { + player.drop(itemstack, false); + } + } + return stack; + } + } - @Override - public void affectConsumer(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity consumer) { - if (this.heal > 0.0F) consumer.heal(this.heal); - super.affectConsumer(stack, worldIn, consumer); - } + @Override + public void affectConsumer(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity consumer) { + if (this.heal > 0.0F) consumer.heal(this.heal); + super.affectConsumer(stack, worldIn, consumer); + } - @Override - public @NotNull InteractionResultHolder use(@NotNull Level world, @NotNull Player player, @NotNull InteractionHand hand) { - return ItemUtils.startUsingInstantly(world, player, hand); - } -} + @Override + public @NotNull InteractionResultHolder use(@NotNull Level world, @NotNull Player player, @NotNull InteractionHand hand) { + return ItemUtils.startUsingInstantly(world, player, hand); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/EnderNectarItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/EnderNectarItem.java index 0a0e8ad8..8d912f18 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/EnderNectarItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/EnderNectarItem.java @@ -15,23 +15,23 @@ import org.jetbrains.annotations.NotNull; public class EnderNectarItem extends DrinkItem { - public EnderNectarItem(Properties properties) { - super(properties, 0.0F, false, true); - } + public EnderNectarItem(Properties properties) { + super(properties, 0.0F, false, true); + } - @Override - public void affectConsumer(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity consumer) { - super.affectConsumer(stack, worldIn, consumer); - if (consumer instanceof ServerPlayer player) { - NetworkHooks.openScreen(player, new SimpleMenuProvider((i, inv, p) -> - new ChestMenu(MenuType.GENERIC_9x3, i, inv, p.getEnderChestInventory(), 3) { - @Override - public boolean stillValid(@NotNull Player pPlayer) { - return true; - } - }, Component.translatable("container.enderchest"))); - player.awardStat(Stats.OPEN_ENDERCHEST); - PiglinAi.angerNearbyPiglins(player, true); - } - } -} + @Override + public void affectConsumer(@NotNull ItemStack stack, @NotNull Level worldIn, @NotNull LivingEntity consumer) { + super.affectConsumer(stack, worldIn, consumer); + if (consumer instanceof ServerPlayer player) { + NetworkHooks.openScreen(player, new SimpleMenuProvider((i, inv, p) -> + new ChestMenu(MenuType.GENERIC_9x3, i, inv, p.getEnderChestInventory(), 3) { + @Override + public boolean stillValid(@NotNull Player pPlayer) { + return true; + } + }, Component.translatable("container.enderchest"))); + player.awardStat(Stats.OPEN_ENDERCHEST); + PiglinAi.angerNearbyPiglins(player, true); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/GreenTeaLeavesItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/GreenTeaLeavesItem.java index b8f241b5..2af22f3a 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/GreenTeaLeavesItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/GreenTeaLeavesItem.java @@ -9,6 +9,6 @@ public GreenTeaLeavesItem(Properties prop) { @Override public String[] getConflicts() { - return new String[]{ Mods.FR, Mods.YH, "croptopia" }; + return new String[]{Mods.FR, Mods.YH, "croptopia"}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/IceCreamItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/IceCreamItem.java index 2926a91b..9382c185 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/IceCreamItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/IceCreamItem.java @@ -17,7 +17,7 @@ public IceCreamItem(Properties properties) { public @NotNull ItemStack finishUsingItem(@NotNull ItemStack stack, @NotNull Level level, LivingEntity entity) { entity.setTicksFrozen(entity.getTicksFrozen() + 200); return (entity instanceof Player p && p.getAbilities().instabuild) ? - super.finishUsingItem(stack, level, entity) : - new ItemStack(Items.BOWL); + super.finishUsingItem(stack, level, entity) : + new ItemStack(Items.BOWL); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/JamJarItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/JamJarItem.java index 339af14a..ceebb3af 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/JamJarItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/JamJarItem.java @@ -9,6 +9,6 @@ public JamJarItem(Properties properties, boolean hasPotionEffectTooltip, boolean @Override public String[] getConflicts() { - return new String[]{ Mods.FRD }; + return new String[]{Mods.FRD}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/NutButterBottleItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/NutButterBottleItem.java index 4a1b5daf..884fb0fc 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/NutButterBottleItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/NutButterBottleItem.java @@ -9,6 +9,6 @@ public NutButterBottleItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{Mods.VD }; + return new String[]{Mods.VD}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/Nutrition.java b/src/main/java/net/brnbrd/delightful/common/item/food/Nutrition.java index 0c7e56a8..5f42ddb3 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/Nutrition.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/Nutrition.java @@ -7,112 +7,112 @@ import vectorwing.farmersdelight.common.registry.ModEffects; public class Nutrition { - public static final FoodProperties CHEESEBURGER = (new FoodProperties.Builder()).nutrition(13).saturationMod(0.8F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 600, 0), 1.0F).build(); - public static final FoodProperties DELUXE_CHEESEBURGER = (new FoodProperties.Builder()).nutrition(16).saturationMod(1.0F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 4800, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 1200, 0), 1.0F).build(); - public static final FoodProperties MARSHMALLOW_STICK = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.3F).build(); - public static final FoodProperties COOKED_MARSHMALLOW_STICK = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.4F).build(); - public static final FoodProperties SMORE = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.5F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 3600, 0), 1.0F).build(); - public static final FoodProperties CRAB_RANGOON = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.4F).build(); - public static final FoodProperties CHUNKWICH = (new FoodProperties.Builder()).nutrition(11).saturationMod(0.4F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F).build(); - public static final FoodProperties JELLY_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F).build(); - public static final FoodProperties GLOW_JELLY_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F) - .effect(() -> new MobEffectInstance(MobEffects.GLOWING, 900, 0), 1.0F).build(); - public static final FoodProperties NUT_BUTTER_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F).build(); - public static final FoodProperties NUT_BUTTER_AND_JELLY_SANDWICH = (new FoodProperties.Builder()).nutrition(11).saturationMod(0.65F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 3600, 0), 1.0F).build(); - public static final FoodProperties HONEY_GLAZED_WALNUT = (new FoodProperties.Builder()).nutrition(6).saturationMod(1.0F).build(); - public static final FoodProperties ACORN = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.1F) - .effect(() -> new MobEffectInstance(MobEffects.HUNGER, 200, 0), 1.0F).build(); - public static final FoodProperties ROASTED_ACORN = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.5F).build(); - public static final FoodProperties NUT_DOUGH = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.3F) - .effect(() -> new MobEffectInstance(MobEffects.HUNGER, 600, 0), 0.3F).build(); - public static final FoodProperties GREEN_TEA_LEAF = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.2F) - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 60, 0), 1.0F).build(); - public static final FoodProperties MATCHA = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.4F) - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 100, 0), 1.0F).build(); - public static final FoodProperties ANIMAL_FAT = (new FoodProperties.Builder()).nutrition(1).saturationMod(2.0F).alwaysEat().fast().build(); - public static final FoodProperties CHOPPED_CLOVER = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.35F).fast().build(); - public static final FoodProperties CACTUS_FLESH = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).build(); - public static final FoodProperties CACTUS_STEAK = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.5F).build(); - public static final FoodProperties CACTUS_CHILI = (new FoodProperties.Builder()).nutrition(10).saturationMod(0.85F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 3600, 0), 1.0F) - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 3600, 0), 1.0F).build(); - public static final FoodProperties CACTUS_SOUP = (new FoodProperties.Builder()).nutrition(12).saturationMod(0.8F) - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 3600, 0), 1.0F).build(); - public static final FoodProperties CACTUS_SOUP_CUP = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.75F) - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 1800, 0), 1.0F).build(); - public static final FoodProperties FIELD_SALAD = (new FoodProperties.Builder()).nutrition(10).saturationMod(0.55F) - .effect(() -> new MobEffectInstance(MobEffects.REGENERATION, 100, 0), 1.0F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F).build(); - public static final FoodProperties ROCK_CANDY = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.2F).fast() - .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 120, 0), 1.0F).build(); - public static final FoodProperties VENISON_CHOPS = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.3F).meat().fast().build(); - public static final FoodProperties COOKED_VENISON_CHOPS = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.8F).meat().fast().build(); - public static final FoodProperties RAW_GOAT = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.3F).meat().build(); - public static final FoodProperties COOKED_GOAT = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.8F).meat().build(); - public static final FoodProperties CANTALOUPE_SLICE = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.8F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 200, 0), 1.0F).build(); - public static final FoodProperties CANTALOUPE_BREAD = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.35F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 0), 1.0F).build(); - public static final FoodProperties WRAPPED_CANTALOUPE = (new FoodProperties.Builder()).nutrition(8).saturationMod(0.95F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 0), 1.0F).build(); - public static final FoodProperties CANTALOUPE_POPSICLE = (new FoodProperties.Builder()) - .nutrition(3).saturationMod(0.2F).fast().alwaysEat() - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 600, 0), 1.0F).build(); - public static final FoodProperties STUFFED_CANTALOUPE = (new FoodProperties.Builder()).nutrition(14).saturationMod(0.75F) - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 4800, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 600, 1), 1.0F).build(); - public static final FoodProperties COCONUT_CURRY = (new FoodProperties.Builder()).nutrition(15).saturationMod(0.9F) - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 6000, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 0), 1.0F).build(); - public static final FoodProperties SINIGANG = (new FoodProperties.Builder()).nutrition(15).saturationMod(0.9F) - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 6000, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.FIRE_RESISTANCE, 600, 0), 1.0F).build(); - public static final FoodProperties ENDER_NECTAR = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.1F).alwaysEat() - .effect(() -> new MobEffectInstance(MobEffects.BLINDNESS, 60, 0), 1.0F).build(); - public static final FoodProperties PRICKLY_PEAR_JUICE = (new FoodProperties.Builder()) - .effect(() -> new MobEffectInstance(MobEffects.SATURATION, 400, 0), 1.0F).build(); - public static final FoodProperties LAVENDER_TEA = (new FoodProperties.Builder()).alwaysEat() - .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 600, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); - public static final FoodProperties AZALEA_TEA = (new FoodProperties.Builder()).alwaysEat() - .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 900, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); - public static final FoodProperties MATCHA_LATTE = (new FoodProperties.Builder()).alwaysEat().nutrition(6).saturationMod(0.5F) - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 400, 1), 1.0F).build(); - public static final FoodProperties BERRY_MATCHA_LATTE = (new FoodProperties.Builder()).alwaysEat().nutrition(8).saturationMod(0.65F) - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 500, 1), 1.0F).build(); - public static final FoodProperties MATCHA_ICE_CREAM = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.5F) - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 500, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 400, 0), 1.0F).build(); - public static final FoodProperties MATCHA_MILKSHAKE = (new FoodProperties.Builder()) - .nutrition(2).saturationMod(1.6F).alwaysEat() - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 200, 0), 1.0F) - .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); - public static final FoodProperties SALMONBERRY_ICE_CREAM = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.4F) - .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 1200), 1.0F).build(); - public static final FoodProperties SALMONBERRY_MILKSHAKE = (new FoodProperties.Builder()) - .nutrition(2).saturationMod(1.5F).alwaysEat() - .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 600), 1.0F).build(); - public static final FoodProperties SALMONBERRIES = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.6F) - .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 100, 0), 1.0F).build(); - public static final FoodProperties SALMONBERRY_PIE_SLICE = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() - .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 600, 0), 1.0F).build(); - public static final FoodProperties SALMONBERRY_GUMMY = (new FoodProperties.Builder()) - .nutrition(2).saturationMod(0.0F).alwaysEat() - .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 400, 0), 1.0F).build(); - public static final FoodProperties MATCHA_GUMMY = (new FoodProperties.Builder()) - .nutrition(2).saturationMod(0.0F).alwaysEat() - .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F).build(); - public static final FoodProperties CANTALOUPE_GUMMY = (new FoodProperties.Builder()) - .nutrition(2).saturationMod(0.0F).alwaysEat() - .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 1), 1.0F).build(); + public static final FoodProperties CHEESEBURGER = (new FoodProperties.Builder()).nutrition(13).saturationMod(0.8F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 600, 0), 1.0F).build(); + public static final FoodProperties DELUXE_CHEESEBURGER = (new FoodProperties.Builder()).nutrition(16).saturationMod(1.0F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 4800, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 1200, 0), 1.0F).build(); + public static final FoodProperties MARSHMALLOW_STICK = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.3F).build(); + public static final FoodProperties COOKED_MARSHMALLOW_STICK = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.4F).build(); + public static final FoodProperties SMORE = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.5F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 3600, 0), 1.0F).build(); + public static final FoodProperties CRAB_RANGOON = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.4F).build(); + public static final FoodProperties CHUNKWICH = (new FoodProperties.Builder()).nutrition(11).saturationMod(0.4F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F).build(); + public static final FoodProperties JELLY_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F).build(); + public static final FoodProperties GLOW_JELLY_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F) + .effect(() -> new MobEffectInstance(MobEffects.GLOWING, 900, 0), 1.0F).build(); + public static final FoodProperties NUT_BUTTER_BOTTLE = (new FoodProperties.Builder()).nutrition(5).saturationMod(0.3F).build(); + public static final FoodProperties NUT_BUTTER_AND_JELLY_SANDWICH = (new FoodProperties.Builder()).nutrition(11).saturationMod(0.65F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 3600, 0), 1.0F).build(); + public static final FoodProperties HONEY_GLAZED_WALNUT = (new FoodProperties.Builder()).nutrition(6).saturationMod(1.0F).build(); + public static final FoodProperties ACORN = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.1F) + .effect(() -> new MobEffectInstance(MobEffects.HUNGER, 200, 0), 1.0F).build(); + public static final FoodProperties ROASTED_ACORN = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.5F).build(); + public static final FoodProperties NUT_DOUGH = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.3F) + .effect(() -> new MobEffectInstance(MobEffects.HUNGER, 600, 0), 0.3F).build(); + public static final FoodProperties GREEN_TEA_LEAF = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.2F) + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 60, 0), 1.0F).build(); + public static final FoodProperties MATCHA = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.4F) + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 100, 0), 1.0F).build(); + public static final FoodProperties ANIMAL_FAT = (new FoodProperties.Builder()).nutrition(1).saturationMod(2.0F).alwaysEat().fast().build(); + public static final FoodProperties CHOPPED_CLOVER = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.35F).fast().build(); + public static final FoodProperties CACTUS_FLESH = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).build(); + public static final FoodProperties CACTUS_STEAK = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.5F).build(); + public static final FoodProperties CACTUS_CHILI = (new FoodProperties.Builder()).nutrition(10).saturationMod(0.85F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_BOOST, 3600, 0), 1.0F) + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 3600, 0), 1.0F).build(); + public static final FoodProperties CACTUS_SOUP = (new FoodProperties.Builder()).nutrition(12).saturationMod(0.8F) + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 3600, 0), 1.0F).build(); + public static final FoodProperties CACTUS_SOUP_CUP = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.75F) + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 1800, 0), 1.0F).build(); + public static final FoodProperties FIELD_SALAD = (new FoodProperties.Builder()).nutrition(10).saturationMod(0.55F) + .effect(() -> new MobEffectInstance(MobEffects.REGENERATION, 100, 0), 1.0F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 600, 0), 1.0F).build(); + public static final FoodProperties ROCK_CANDY = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.2F).fast() + .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 120, 0), 1.0F).build(); + public static final FoodProperties VENISON_CHOPS = (new FoodProperties.Builder()).nutrition(1).saturationMod(0.3F).meat().fast().build(); + public static final FoodProperties COOKED_VENISON_CHOPS = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.8F).meat().fast().build(); + public static final FoodProperties RAW_GOAT = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.3F).meat().build(); + public static final FoodProperties COOKED_GOAT = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.8F).meat().build(); + public static final FoodProperties CANTALOUPE_SLICE = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.8F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 200, 0), 1.0F).build(); + public static final FoodProperties CANTALOUPE_BREAD = (new FoodProperties.Builder()).nutrition(9).saturationMod(0.35F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 0), 1.0F).build(); + public static final FoodProperties WRAPPED_CANTALOUPE = (new FoodProperties.Builder()).nutrition(8).saturationMod(0.95F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 0), 1.0F).build(); + public static final FoodProperties CANTALOUPE_POPSICLE = (new FoodProperties.Builder()) + .nutrition(3).saturationMod(0.2F).fast().alwaysEat() + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 600, 0), 1.0F).build(); + public static final FoodProperties STUFFED_CANTALOUPE = (new FoodProperties.Builder()).nutrition(14).saturationMod(0.75F) + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 4800, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 600, 1), 1.0F).build(); + public static final FoodProperties COCONUT_CURRY = (new FoodProperties.Builder()).nutrition(15).saturationMod(0.9F) + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 6000, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 0), 1.0F).build(); + public static final FoodProperties SINIGANG = (new FoodProperties.Builder()).nutrition(15).saturationMod(0.9F) + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 6000, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.FIRE_RESISTANCE, 600, 0), 1.0F).build(); + public static final FoodProperties ENDER_NECTAR = (new FoodProperties.Builder()).nutrition(4).saturationMod(0.1F).alwaysEat() + .effect(() -> new MobEffectInstance(MobEffects.BLINDNESS, 60, 0), 1.0F).build(); + public static final FoodProperties PRICKLY_PEAR_JUICE = (new FoodProperties.Builder()) + .effect(() -> new MobEffectInstance(MobEffects.SATURATION, 400, 0), 1.0F).build(); + public static final FoodProperties LAVENDER_TEA = (new FoodProperties.Builder()).alwaysEat() + .effect(() -> new MobEffectInstance(ModEffects.COMFORT.get(), 600, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); + public static final FoodProperties AZALEA_TEA = (new FoodProperties.Builder()).alwaysEat() + .effect(() -> new MobEffectInstance(ModEffects.NOURISHMENT.get(), 900, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); + public static final FoodProperties MATCHA_LATTE = (new FoodProperties.Builder()).alwaysEat().nutrition(6).saturationMod(0.5F) + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 400, 1), 1.0F).build(); + public static final FoodProperties BERRY_MATCHA_LATTE = (new FoodProperties.Builder()).alwaysEat().nutrition(8).saturationMod(0.65F) + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 500, 1), 1.0F).build(); + public static final FoodProperties MATCHA_ICE_CREAM = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.5F) + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 500, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 400, 0), 1.0F).build(); + public static final FoodProperties MATCHA_MILKSHAKE = (new FoodProperties.Builder()) + .nutrition(2).saturationMod(1.6F).alwaysEat() + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 200, 0), 1.0F) + .effect(() -> new MobEffectInstance(Mods.getCaffeinated().get(), 300, 0), 1.0F).build(); + public static final FoodProperties SALMONBERRY_ICE_CREAM = (new FoodProperties.Builder()).nutrition(6).saturationMod(0.4F) + .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 1200), 1.0F).build(); + public static final FoodProperties SALMONBERRY_MILKSHAKE = (new FoodProperties.Builder()) + .nutrition(2).saturationMod(1.5F).alwaysEat() + .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 600), 1.0F).build(); + public static final FoodProperties SALMONBERRIES = (new FoodProperties.Builder()).nutrition(2).saturationMod(0.6F) + .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 100, 0), 1.0F).build(); + public static final FoodProperties SALMONBERRY_PIE_SLICE = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() + .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 600, 0), 1.0F).build(); + public static final FoodProperties SALMONBERRY_GUMMY = (new FoodProperties.Builder()) + .nutrition(2).saturationMod(0.0F).alwaysEat() + .effect(() -> new MobEffectInstance(MobEffects.WATER_BREATHING, 400, 0), 1.0F).build(); + public static final FoodProperties MATCHA_GUMMY = (new FoodProperties.Builder()) + .nutrition(2).saturationMod(0.0F).alwaysEat() + .effect(() -> new MobEffectInstance(Mods.getGreenTeaEffect().get(), 400, 0), 1.0F).build(); + public static final FoodProperties CANTALOUPE_GUMMY = (new FoodProperties.Builder()) + .nutrition(2).saturationMod(0.0F).alwaysEat() + .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 1), 1.0F).build(); } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/food/PumpkinPieSliceItem.java b/src/main/java/net/brnbrd/delightful/common/item/food/PumpkinPieSliceItem.java index 29d25eba..4a594f16 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/food/PumpkinPieSliceItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/food/PumpkinPieSliceItem.java @@ -9,6 +9,6 @@ public PumpkinPieSliceItem(Properties prop) { @Override public String[] getConflicts() { - return new String[]{ "create_central_kitchen" }; + return new String[]{"create_central_kitchen"}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/CompatKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/CompatKnifeItem.java index 47b8fa5f..b1df67f1 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/CompatKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/CompatKnifeItem.java @@ -4,51 +4,54 @@ import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; import net.minecraft.tags.TagKey; -import net.minecraft.world.item.*; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import java.util.List; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.List; public class CompatKnifeItem extends DelightfulKnifeItem implements ICompat { - private final String[] modid; - private final ChatFormatting[] formatting; - - public CompatKnifeItem(String modid, @Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { - super(tag, tier, properties); - this.modid = new String[] { modid }; - this.formatting = formatting; - } - - public CompatKnifeItem(String[] modid, @Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { - super(tag, tier, properties); - this.modid = modid; - this.formatting = formatting; - } - - - @Override - public String[] getModid() { - return this.modid; - } - - @Override - public boolean enabled() { - return ICompat.super.enabled() && this.isTag(); - } - - @Override - public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { - super.appendHoverText(stack, level, comps, pIsAdvanced); - if (this.enabled() && !this.getTools().isEmpty()) { - comps.addAll(this.getTools()); - } - } - - @Override - public @NotNull Component getName(@NotNull ItemStack stack) { - Component name = super.getName(stack); - return (this.enabled() && this.formatting.length > 0) ? - name.copy().withStyle(this.formatting) : name; - } -} + private final String[] modid; + private final ChatFormatting[] formatting; + + public CompatKnifeItem(String modid, @Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { + super(tag, tier, properties); + this.modid = new String[]{modid}; + this.formatting = formatting; + } + + public CompatKnifeItem(String[] modid, @Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { + super(tag, tier, properties); + this.modid = modid; + this.formatting = formatting; + } + + + @Override + public String[] getModid() { + return this.modid; + } + + @Override + public boolean enabled() { + return ICompat.super.enabled() && this.isTag(); + } + + @Override + public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { + super.appendHoverText(stack, level, comps, pIsAdvanced); + if (this.enabled() && !this.getTools().isEmpty()) { + comps.addAll(this.getTools()); + } + } + + @Override + public @NotNull Component getName(@NotNull ItemStack stack) { + Component name = super.getName(stack); + return (this.enabled() && this.formatting.length > 0) ? + name.copy().withStyle(this.formatting) : name; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/DelightfulKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/DelightfulKnifeItem.java index cc028c0e..1b32b870 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/DelightfulKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/DelightfulKnifeItem.java @@ -7,7 +7,10 @@ import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; import net.minecraft.tags.TagKey; -import net.minecraft.world.item.*; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; @@ -16,88 +19,88 @@ import net.minecraftforge.registries.tags.ITagManager; import org.apache.commons.lang3.tuple.ImmutablePair; import org.codehaus.plexus.util.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import vectorwing.farmersdelight.common.item.KnifeItem; import java.util.Collections; import java.util.List; import java.util.Locale; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; public class DelightfulKnifeItem extends KnifeItem implements IConfigured { - private final TagKey tag; + private final TagKey tag; - public DelightfulKnifeItem(TagKey tag, Tier tier, Properties properties) { - super(tier, 0.5F, -2.0F, properties); - this.tag = tag; - } + public DelightfulKnifeItem(TagKey tag, Tier tier, Properties properties) { + super(tier, 0.5F, -2.0F, properties); + this.tag = tag; + } - @Override - public boolean isValidRepairItem(@NotNull ItemStack pToRepair, @NotNull ItemStack pRepair) { - return this.enabled() && super.isValidRepairItem(pToRepair, pRepair); - } + @Override + public boolean isValidRepairItem(@NotNull ItemStack pToRepair, @NotNull ItemStack pRepair) { + return this.enabled() && super.isValidRepairItem(pToRepair, pRepair); + } - @Override - public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { - if ( - this.enabledText(comps) && - !(this instanceof ICompat) && - Util.enabled(this) && - !this.isTag() && - this.getTag() != null - ) { - comps.add(Component.translatable("tooltip.requires_tag")); - comps.add(Component.literal(this.getTag().location().toString()).withStyle(ChatFormatting.UNDERLINE)); - } - super.appendHoverText(stack, level, comps, pIsAdvanced); - } + @Override + public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, @NotNull List comps, @NotNull TooltipFlag pIsAdvanced) { + if ( + this.enabledText(comps) && + !(this instanceof ICompat) && + Util.enabled(this) && + !this.isTag() && + this.getTag() != null + ) { + comps.add(Component.translatable("tooltip.requires_tag")); + comps.add(Component.literal(this.getTag().location().toString()).withStyle(ChatFormatting.UNDERLINE)); + } + super.appendHoverText(stack, level, comps, pIsAdvanced); + } - @Nullable - public TagKey getTag() { - return this.tag; - } + @Nullable + public TagKey getTag() { + return this.tag; + } - // Returns true if there is an entry within the tag - public boolean isTag() { - TagKey materialTag = this.getTag(); - if (materialTag == null) { - return true; - } - ITagManager tags = ForgeRegistries.ITEMS.tags(); - return ( - tags != null && - tags.isKnownTagName(materialTag) && - !tags.getTag(materialTag).isEmpty() - ); - } + // Returns true if there is an entry within the tag + public boolean isTag() { + TagKey materialTag = this.getTag(); + if (materialTag == null) { + return true; + } + ITagManager tags = ForgeRegistries.ITEMS.tags(); + return ( + tags != null && + tags.isKnownTagName(materialTag) && + !tags.getTag(materialTag).isEmpty() + ); + } - @Override - public boolean enabled() { - return IConfigured.super.enabled() && this.isTag(); - } + @Override + public boolean enabled() { + return IConfigured.super.enabled() && this.isTag(); + } - public Ingredient getRod() { - return Ingredient.of(Tags.Items.RODS_WOODEN); - } + public Ingredient getRod() { + return Ingredient.of(Tags.Items.RODS_WOODEN); + } - public @NotNull ItemStack getCreativeItem() { - return new ItemStack(this); - } + public @NotNull ItemStack getCreativeItem() { + return new ItemStack(this); + } - public ImmutablePair getSmithing() { - return ImmutablePair.nullPair(); - } + public ImmutablePair getSmithing() { + return ImmutablePair.nullPair(); + } - public @Nullable RecipeType getRecipeType() { - return getSmithing().equals(ImmutablePair.nullPair()) ? RecipeType.CRAFTING : RecipeType.SMITHING; - } + public @Nullable RecipeType getRecipeType() { + return getSmithing().equals(ImmutablePair.nullPair()) ? RecipeType.CRAFTING : RecipeType.SMITHING; + } - public String getTranslation() { - return StringUtils.capitaliseAllWords(this.getDescriptionId().toLowerCase(Locale.ROOT) - .replace("item." + Delightful.MODID.toLowerCase(Locale.ROOT) + ".", "").replace("_", " ") - ); - } + public String getTranslation() { + return StringUtils.capitaliseAllWords(this.getDescriptionId().toLowerCase(Locale.ROOT) + .replace("item." + Delightful.MODID.toLowerCase(Locale.ROOT) + ".", "").replace("_", " ") + ); + } - public List getTools() { - return Collections.emptyList(); - } -} + public List getTools() { + return Collections.emptyList(); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/Knives.java b/src/main/java/net/brnbrd/delightful/common/item/knife/Knives.java index 52d35fec..50607795 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/Knives.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/Knives.java @@ -81,7 +81,8 @@ public class Knives extends DelightfulItems { public static final RegistryObject THYRIUM = registerCompatIngotKnife("thyrium", Mods.FUS); public static final RegistryObject SINISITE = registerCompatIngotKnife("sinisite", Mods.FUS); public static final RegistryObject ALLTHEMODIUM = registerItem("allthemodium_knife", () -> new AllthemodiumKnifeItem(props())); - public static final RegistryObject ENDERITE = registerItem("enderite_knife", () -> new EnderiteKnifeItem(props()));public static final RegistryObject DRACO_ARCANUS = registerItem("draco_arcanus_knife", () -> new DracoArcanusKnifeItem(props())); + public static final RegistryObject ENDERITE = registerItem("enderite_knife", () -> new EnderiteKnifeItem(props())); + public static final RegistryObject DRACO_ARCANUS = registerItem("draco_arcanus_knife", () -> new DracoArcanusKnifeItem(props())); public static final RegistryObject OSMIUM = registerCompatIngotKnife("osmium", Mods.MEKT); public static final RegistryObject REFINED_GLOWSTONE = registerCompatIngotKnife("refined_glowstone", Mods.MEKT); public static final RegistryObject REFINED_OBSIDIAN = registerCompatIngotKnife("refined_obsidian", Mods.MEKT); @@ -114,55 +115,55 @@ public class Knives extends DelightfulItems { public static final RegistryObject SKYROOT = registerItem("skyroot_knife", () -> new SkyrootKnifeItem(props())); public static final RegistryObject ZANITE = registerItem("zanite_knife", () -> new ZaniteKnifeItem(props())); public static final RegistryObject PHOENIX = registerItem("phoenix_knife", () -> new PhoenixKnifeItem(props())); - public static final RegistryObject MANASTEEL = registerItem("manasteel_knife",() -> new ManasteelKnifeItem( - props(), - DelightfulItems.ingot("manasteel"), - Mods.loaded(Mods.BTA) ? BotaniaCompat.manasteel().get() : DelightfulTiers.STEEL + public static final RegistryObject MANASTEEL = registerItem("manasteel_knife", () -> new ManasteelKnifeItem( + props(), + DelightfulItems.ingot("manasteel"), + Mods.loaded(Mods.BTA) ? BotaniaCompat.manasteel().get() : DelightfulTiers.STEEL )); public static final RegistryObject ELEMENTIUM = registerItem("elementium_knife", () -> new ElementiumKnifeItem( - props(), - DelightfulItems.ingot("elementium"), - Mods.loaded(Mods.BTA) ? BotaniaCompat.elementium().get() : DelightfulTiers.STEEL + props(), + DelightfulItems.ingot("elementium"), + Mods.loaded(Mods.BTA) ? BotaniaCompat.elementium().get() : DelightfulTiers.STEEL )); public static final RegistryObject TERRA = registerItem("terra_knife", () -> new TerraKnifeItem( - props(), - DelightfulItems.ingot("terrasteel"), - Mods.loaded(Mods.BTA) ? BotaniaCompat.terrasteel().get() : DelightfulTiers.STEEL, - ChatFormatting.YELLOW + props(), + DelightfulItems.ingot("terrasteel"), + Mods.loaded(Mods.BTA) ? BotaniaCompat.terrasteel().get() : DelightfulTiers.STEEL, + ChatFormatting.YELLOW )); public static final RegistryObject ALF = registerItem("alf_knife", () -> new AlfKnifeItem( - props() + props() )); public static final RegistryObject VERIDIUM = registerItem("veridium_knife", - () -> Mods.loaded(Mods.AER) ? - AetherReduxCompat.VERIDIUM.get() : - new DummyKnifeItem(new String[] { Mods.AE, Mods.AER }, - DelightfulItemTags.INGOTS_VERIDIUM, Ingredient.of(DelightfulItemTags.SKYROOT_STICK)) + () -> Mods.loaded(Mods.AER) ? + AetherReduxCompat.VERIDIUM.get() : + new DummyKnifeItem(new String[]{Mods.AE, Mods.AER}, + DelightfulItemTags.INGOTS_VERIDIUM, Ingredient.of(DelightfulItemTags.SKYROOT_STICK)) ); public static final RegistryObject INFUSED_VERIDIUM = registerItem("infused_veridium_knife", - () -> Mods.loaded(Mods.AER) ? - AetherReduxCompat.INFUSED_VERIDIUM.get() : - new DummyKnifeItem(new String[] { Mods.AE, Mods.AER }, - DelightfulItemTags.INGOTS_VERIDIUM, Ingredient.of(DelightfulItemTags.SKYROOT_STICK), false) + () -> Mods.loaded(Mods.AER) ? + AetherReduxCompat.INFUSED_VERIDIUM.get() : + new DummyKnifeItem(new String[]{Mods.AE, Mods.AER}, + DelightfulItemTags.INGOTS_VERIDIUM, Ingredient.of(DelightfulItemTags.SKYROOT_STICK), false) ); public static final RegistryObject SKYJADE = registerItem("skyjade_knife", - () -> Mods.loaded("deep_aether") ? - DeepAetherCompat.SKYJADE.get() : - new DummyKnifeItem(new String[] { Mods.AE, "deep_aether" }, - DelightfulItemTags.GEMS_SKYJADE, Ingredient.of(DelightfulItemTags.SKYROOT_STICK)) + () -> Mods.loaded("deep_aether") ? + DeepAetherCompat.SKYJADE.get() : + new DummyKnifeItem(new String[]{Mods.AE, "deep_aether"}, + DelightfulItemTags.GEMS_SKYJADE, Ingredient.of(DelightfulItemTags.SKYROOT_STICK)) ); public static final RegistryObject STRATUS = registerItem("stratus_knife", - () -> Mods.loaded("deep_aether") ? - DeepAetherCompat.STRATUS.get() : - new DummyStratusKnifeItem(props(), Tiers.IRON) + () -> Mods.loaded("deep_aether") ? + DeepAetherCompat.STRATUS.get() : + new DummyStratusKnifeItem(props(), Tiers.IRON) ); public static final RegistryObject VALKYRUM = registerItem("valkyrum_knife", () -> new ValkyrumKnifeItem(props())); public static final RegistryObject NETHER_QUARTZ = registerItem("nether_quartz_knife", () -> - new CompatKnifeItem(Mods.AE2, Tags.Items.GEMS_QUARTZ, DelightfulTiers.NETHER_QUARTZ, props())); + new CompatKnifeItem(Mods.AE2, Tags.Items.GEMS_QUARTZ, DelightfulTiers.NETHER_QUARTZ, props())); public static final RegistryObject CERTUS_QUARTZ = registerItem("certus_quartz_knife", () -> - new CompatKnifeItem(Mods.AE2, DelightfulItemTags.CERTUS_QUARTZ, DelightfulTiers.CERTUS_QUARTZ, props())); + new CompatKnifeItem(Mods.AE2, DelightfulItemTags.CERTUS_QUARTZ, DelightfulTiers.CERTUS_QUARTZ, props())); public static final RegistryObject FLUIX = registerItem("fluix_knife", () -> - new FluixKnifeItem(props())); + new FluixKnifeItem(props())); public static Item.Properties props() { return (new Item.Properties()); @@ -193,6 +194,7 @@ public static RegistryObject registerKnife(String name, TagKey tag) return registerItem(name + "_knife", () -> new DelightfulKnifeItem(tag, DelightfulTiers.get(name), (new Item.Properties()))); } - public static void create() {} - -} + public static void create() { + } + +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/GildedNetheriteKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/GildedNetheriteKnifeItem.java index 91abe3c4..691079b6 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/GildedNetheriteKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/GildedNetheriteKnifeItem.java @@ -21,8 +21,8 @@ public GildedNetheriteKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(upgrade), - Util.ing(ModItems.NETHERITE_KNIFE) + Ingredient.of(upgrade), + Util.ing(ModItems.NETHERITE_KNIFE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/RoseGoldKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/RoseGoldKnifeItem.java index 7ab4bb41..3c58fa4e 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/RoseGoldKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/additionaladditions/RoseGoldKnifeItem.java @@ -21,8 +21,8 @@ public RoseGoldKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(upgrade), - Util.ing(ModItems.IRON_KNIFE) + Ingredient.of(upgrade), + Util.ing(ModItems.IRON_KNIFE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/ae2/FluixKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/ae2/FluixKnifeItem.java index 4f3853e7..f5485ee4 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/ae2/FluixKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/ae2/FluixKnifeItem.java @@ -27,8 +27,8 @@ public FluixKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return ImmutablePair.of( - Ingredient.of(DelightfulItemTags.FLUIX_UPGRADE_SMITHING_TEMPLATE), - Ingredient.of(DelightfulItemTags.QUARTZ_KNIFE)); + Ingredient.of(DelightfulItemTags.FLUIX_UPGRADE_SMITHING_TEMPLATE), + Ingredient.of(DelightfulItemTags.QUARTZ_KNIFE)); } @Override @@ -43,4 +43,4 @@ public int getEnchantmentLevel(ItemStack stack, Enchantment enchantment) { public List getTools() { return List.of(Component.literal("Always has at least ").append(Enchantments.MOB_LOOTING.getFullname(1))); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/AetherKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/AetherKnifeItem.java index 0fa81148..0b3b9c45 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/AetherKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/AetherKnifeItem.java @@ -12,7 +12,7 @@ public class AetherKnifeItem extends CompatKnifeItem { public AetherKnifeItem(String modid, @Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { - super(new String[]{ modid, Mods.AE }, tag, tier, properties, formatting); + super(new String[]{modid, Mods.AE}, tag, tier, properties, formatting); } public AetherKnifeItem(@Nullable TagKey tag, Tier tier, Properties properties, ChatFormatting... formatting) { @@ -28,4 +28,4 @@ public Strategy getStrategy() { public Ingredient getRod() { return Ingredient.of(DelightfulItemTags.SKYROOT_STICK); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/ZaniteKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/ZaniteKnifeItem.java index ff0d253a..34385f9e 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/ZaniteKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether/ZaniteKnifeItem.java @@ -33,7 +33,7 @@ public Multimap getAttributeModifiers(EquipmentSlo private int calculateIncrease(Multimap map, ItemStack stack) { double baseDamage = 0.0; - for (Iterator it = map.get(Attributes.ATTACK_DAMAGE).stream().iterator(); it.hasNext();) { + for (Iterator it = map.get(Attributes.ATTACK_DAMAGE).stream().iterator(); it.hasNext(); ) { AttributeModifier modifier = it.next(); baseDamage += modifier.getAmount(); } @@ -44,4 +44,4 @@ private int calculateIncrease(Multimap map, ItemSt } return (int) Math.round(boostedDamage); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether_redux/VeridiumKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether_redux/VeridiumKnifeItem.java index e7fcd645..8ac0b835 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether_redux/VeridiumKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/aether_redux/VeridiumKnifeItem.java @@ -16,75 +16,75 @@ import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import net.zepalesque.redux.item.tools.VeridiumItem; +import net.zepalesque.redux.item.util.TooltipUtils; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.function.Consumer; import java.util.function.Supplier; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import net.zepalesque.redux.item.tools.VeridiumItem; -import net.zepalesque.redux.item.util.TooltipUtils; public class VeridiumKnifeItem extends AetherKnifeItem implements VeridiumItem { - private final Supplier uninfused; + private final Supplier uninfused; - public VeridiumKnifeItem(Tier tier, Properties properties, Supplier uninfused) { - super(Mods.AER, DelightfulItems.ingot("veridium"), tier, properties); - this.uninfused = uninfused; - } + public VeridiumKnifeItem(Tier tier, Properties properties, Supplier uninfused) { + super(Mods.AER, DelightfulItems.ingot("veridium"), tier, properties); + this.uninfused = uninfused; + } - @Override - public Item getUninfusedItem(ItemStack stack) { - return this.uninfused.get(); - } + @Override + public Item getUninfusedItem(ItemStack stack) { + return this.uninfused.get(); + } - @Override - public void appendHoverText(ItemStack stack, @Nullable Level level, List tooltips, @NotNull TooltipFlag advanced) { - MutableComponent infusion = Component.translatable("tooltip.aether_redux.infusion_charge", - stack.getTag() == null ? 0 : stack.getTag().getByte(VeridiumItem.NBT_KEY) - ).withStyle(ChatFormatting.GRAY); - tooltips.add(infusion); - Component info = TooltipUtils.TOOLTIP_SHIFT_FOR_INFO.apply(Component.translatable("gui.aether_redux.infusion_info")); - tooltips.add(info); - super.appendHoverText(stack, level, tooltips, advanced); - } + @Override + public void appendHoverText(ItemStack stack, @Nullable Level level, List tooltips, @NotNull TooltipFlag advanced) { + MutableComponent infusion = Component.translatable("tooltip.aether_redux.infusion_charge", + stack.getTag() == null ? 0 : stack.getTag().getByte(VeridiumItem.NBT_KEY) + ).withStyle(ChatFormatting.GRAY); + tooltips.add(infusion); + Component info = TooltipUtils.TOOLTIP_SHIFT_FOR_INFO.apply(Component.translatable("gui.aether_redux.infusion_info")); + tooltips.add(info); + super.appendHoverText(stack, level, tooltips, advanced); + } - @Override - public boolean mineBlock(@NotNull ItemStack stack, @NotNull Level level, @NotNull BlockState state, @NotNull BlockPos pos, @NotNull LivingEntity user) { - // Call the vanilla method do do things like tool damaging - boolean bool = super.mineBlock(stack, level, state, pos, user); - if (!user.level().isClientSide()) { - boolean instaBreak = state.getDestroySpeed(level, pos) <= 0.0F; - // Avoid decreasing infusion on insta-break blocks - if (!instaBreak) { - int amount = stack.isCorrectToolForDrops(state) ? 1 : 2; - ItemStack transform = this.deplete(stack, user, amount); - if (!user.level().isClientSide() && transform != null && transform != stack) { - user.setItemSlot(EquipmentSlot.MAINHAND, transform); - if (user instanceof ServerPlayer sp) { - this.sendSound(sp); - } - } - } - } - return bool; - } + @Override + public boolean mineBlock(@NotNull ItemStack stack, @NotNull Level level, @NotNull BlockState state, @NotNull BlockPos pos, @NotNull LivingEntity user) { + // Call the vanilla method do do things like tool damaging + boolean bool = super.mineBlock(stack, level, state, pos, user); + if (!user.level().isClientSide()) { + boolean instaBreak = state.getDestroySpeed(level, pos) <= 0.0F; + // Avoid decreasing infusion on insta-break blocks + if (!instaBreak) { + int amount = stack.isCorrectToolForDrops(state) ? 1 : 2; + ItemStack transform = this.deplete(stack, user, amount); + if (!user.level().isClientSide() && transform != null && transform != stack) { + user.setItemSlot(EquipmentSlot.MAINHAND, transform); + if (user instanceof ServerPlayer sp) { + this.sendSound(sp); + } + } + } + } + return bool; + } - @Override - public int damageItem(ItemStack stack, int amount, T entity, Consumer onBroken) { - return super.damageItem(stack, amount, entity, onBroken) * VeridiumItem.DURABILITY_DMG_MULTIPLIER; - } + @Override + public int damageItem(ItemStack stack, int amount, T entity, Consumer onBroken) { + return super.damageItem(stack, amount, entity, onBroken) * VeridiumItem.DURABILITY_DMG_MULTIPLIER; + } - public static class Uninfused extends AetherKnifeItem { + public static class Uninfused extends AetherKnifeItem { - public Uninfused(Tier tier, Properties properties) { - super(Mods.AER, DelightfulItems.ingot("veridium"), tier, properties); - } + public Uninfused(Tier tier, Properties properties) { + super(Mods.AER, DelightfulItems.ingot("veridium"), tier, properties); + } - @Override - public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, List tooltips, @NotNull TooltipFlag advanced) { - Component info = TooltipUtils.TOOLTIP_SHIFT_FOR_INFO.apply(Component.translatable("gui.aether_redux.infusion_info")); - tooltips.add(info); - super.appendHoverText(stack, level, tooltips, advanced); - } - } -} + @Override + public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, List tooltips, @NotNull TooltipFlag advanced) { + Component info = TooltipUtils.TOOLTIP_SHIFT_FOR_INFO.apply(Component.translatable("gui.aether_redux.infusion_info")); + tooltips.add(info); + super.appendHoverText(stack, level, tooltips, advanced); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/allthemodium/AllthemodiumKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/allthemodium/AllthemodiumKnifeItem.java index 90cfd148..d87e27b9 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/allthemodium/AllthemodiumKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/allthemodium/AllthemodiumKnifeItem.java @@ -20,7 +20,7 @@ public AllthemodiumKnifeItem(Properties properties) { @Override public List getTools() { return List.of( - Component.translatable("indestructible").withStyle(ChatFormatting.GOLD) + Component.translatable("indestructible").withStyle(ChatFormatting.GOLD) ); } @@ -53,4 +53,4 @@ public boolean canBeDepleted() { public boolean isEnchantable(@NotNull ItemStack stack) { return true; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/ManasteelKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/ManasteelKnifeItem.java index 1eba5d88..c842a86b 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/ManasteelKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/ManasteelKnifeItem.java @@ -35,20 +35,20 @@ public int getManaPerDamage() { @Override public int damageItem(ItemStack stack, int amount, T entity, Consumer onBroken) { return enabled() ? - BotaniaCompat.damageItemIfPossible(stack, amount, entity, this.getManaPerDamage()) : - super.damageItem(stack, amount, entity, onBroken); + BotaniaCompat.damageItemIfPossible(stack, amount, entity, this.getManaPerDamage()) : + super.damageItem(stack, amount, entity, onBroken); } @Override public void inventoryTick(@NotNull ItemStack stack, @NotNull Level world, @NotNull Entity entity, int slot, boolean selected) { if ( - enabled() && - !world.isClientSide() && - entity instanceof Player player && - stack.getDamageValue() > 0 && - BotaniaCompat.requestManaExactForTool(stack, player, 2 * this.getManaPerDamage(), true) - ){ + enabled() && + !world.isClientSide() && + entity instanceof Player player && + stack.getDamageValue() > 0 && + BotaniaCompat.requestManaExactForTool(stack, player, 2 * this.getManaPerDamage(), true) + ) { stack.setDamageValue(stack.getDamageValue() - 1); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/TerraKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/TerraKnifeItem.java index 494f00ae..a368d5f4 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/TerraKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/botania/TerraKnifeItem.java @@ -17,10 +17,10 @@ public class TerraKnifeItem extends ManasteelKnifeItem { public TerraKnifeItem(Properties properties, TagKey tag, Tier tier, ChatFormatting... formatting) { super( - properties, - tag, - tier, - formatting + properties, + tag, + tier, + formatting ); if (isLoaded()) { MinecraftForge.EVENT_BUS.addListener(this::onLeftClick); @@ -29,10 +29,10 @@ public TerraKnifeItem(Properties properties, TagKey tag, Tier tier, ChatFo public void onLeftClick(PlayerInteractEvent.LeftClickEmpty e) { if ( - enabled() && - e.getEntity().level().isClientSide() && - !e.getItemStack().isEmpty() && - e.getItemStack().is(this) + enabled() && + e.getEntity().level().isClientSide() && + !e.getItemStack().isEmpty() && + e.getItemStack().is(this) ) { BotaniaCompat.sendServerMessage(); } @@ -40,10 +40,10 @@ public void onLeftClick(PlayerInteractEvent.LeftClickEmpty e) { public void handle(Player p, ItemStack stack, float scale) { if ( - enabled() && - stack.is(this) && - !p.level().isClientSide() && - !p.isSpectator() + enabled() && + stack.is(this) && + !p.level().isClientSide() && + !p.isSpectator() ) { BotaniaCompat.trySpawnBurst(p, stack, this.getManaPerDamage(), scale, this instanceof AlfKnifeItem); } @@ -61,4 +61,4 @@ public boolean hurtEnemy(@NotNull ItemStack stack, @NotNull LivingEntity target, } return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/BlazingKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/BlazingKnifeItem.java index 6736f713..c317f456 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/BlazingKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/BlazingKnifeItem.java @@ -35,8 +35,8 @@ public int damageItem(ItemStack stack, int amount, T en @Override public List getTools() { return List.of( - Component.literal("As hot as an authentic blaze!").withStyle(ChatFormatting.DARK_PURPLE), - Component.literal("Burns the mob the tool hits").withStyle(ChatFormatting.DARK_PURPLE) + Component.literal("As hot as an authentic blaze!").withStyle(ChatFormatting.DARK_PURPLE), + Component.literal("Burns the mob the tool hits").withStyle(ChatFormatting.DARK_PURPLE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/ExperienceKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/ExperienceKnifeItem.java index 5dd9e079..4bb810d9 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/ExperienceKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/create_sa/ExperienceKnifeItem.java @@ -34,8 +34,8 @@ public boolean mineBlock(@NotNull ItemStack pStack, @NotNull Level pLevel, @NotN @Override public List getTools() { return List.of( - Component.literal("This tool gradually crumbles;").withStyle(ChatFormatting.DARK_PURPLE), - Component.literal("if you are lucky it will spawn xp orbs").withStyle(ChatFormatting.DARK_PURPLE) + Component.literal("This tool gradually crumbles;").withStyle(ChatFormatting.DARK_PURPLE), + Component.literal("if you are lucky it will spawn xp orbs").withStyle(ChatFormatting.DARK_PURPLE) ); } @@ -58,4 +58,4 @@ public boolean isRepairable(@NotNull ItemStack stack) { public boolean isValidRepairItem(@NotNull ItemStack pToRepair, @NotNull ItemStack pRepair) { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deep_aether/DummyStratusKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deep_aether/DummyStratusKnifeItem.java index ea272647..2316e91a 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deep_aether/DummyStratusKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deep_aether/DummyStratusKnifeItem.java @@ -3,7 +3,6 @@ import net.brnbrd.delightful.Util; import net.brnbrd.delightful.common.item.knife.Knives; import net.brnbrd.delightful.common.item.knife.compat.aether.AetherKnifeItem; -import net.brnbrd.delightful.compat.Mods; import net.brnbrd.delightful.data.tags.DelightfulItemTags; import net.minecraft.world.item.Tier; import net.minecraft.world.item.crafting.Ingredient; @@ -25,8 +24,8 @@ public DummyStratusKnifeItem(Properties props, Tier tier) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(DelightfulItemTags.STRATUS_UPGRADE), - Util.ing(Knives.GRAVITITE) + Ingredient.of(DelightfulItemTags.STRATUS_UPGRADE), + Util.ing(Knives.GRAVITITE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deeperdarker/WardenKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deeperdarker/WardenKnifeItem.java index 59d40f87..ac7d4166 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deeperdarker/WardenKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/deeperdarker/WardenKnifeItem.java @@ -22,8 +22,8 @@ public WardenKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(upgrade), - Util.ing(ModItems.NETHERITE_KNIFE) + Ingredient.of(upgrade), + Util.ing(ModItems.NETHERITE_KNIFE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/EnderiteKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/EnderiteKnifeItem.java index 206702da..d2998ef5 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/EnderiteKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/EnderiteKnifeItem.java @@ -21,8 +21,8 @@ public EnderiteKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(upgrade), - Util.ing(ModItems.NETHERITE_KNIFE) + Ingredient.of(upgrade), + Util.ing(ModItems.NETHERITE_KNIFE) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/ObsdianInfusedEnderiteKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/ObsdianInfusedEnderiteKnifeItem.java index b5d10f3c..63241463 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/ObsdianInfusedEnderiteKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/lolenderite/ObsdianInfusedEnderiteKnifeItem.java @@ -17,8 +17,8 @@ public ObsdianInfusedEnderiteKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(EnderiteKnifeItem.upgrade), - Util.ing(Knives.ENDERITE) + Ingredient.of(EnderiteKnifeItem.upgrade), + Util.ing(Knives.ENDERITE) ); } @@ -26,4 +26,4 @@ public ImmutablePair getSmithing() { public String getTranslation() { return "Obsidian-Infused Enderite Knife"; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfKnifeItem.java index 177c4ef2..78644b8f 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfKnifeItem.java @@ -36,20 +36,20 @@ public AlfKnifeItem(Properties properties, ChatFormatting... formatting) { @Override public Multimap getAttributeModifiers(@NotNull EquipmentSlot slot, @NotNull ItemStack stack) { return (enabled() && slot == EquipmentSlot.MAINHAND) ? - this.defaultModifiers.get() : - super.getDefaultAttributeModifiers(slot); + this.defaultModifiers.get() : + super.getDefaultAttributeModifiers(slot); } @Override public String[] getModid() { - return new String[] { "mythicbotany" }; + return new String[]{"mythicbotany"}; } @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(Util.it("mythicbotany", "alf_upgrade")), - Util.ing(Knives.TERRA) + Ingredient.of(Util.it("mythicbotany", "alf_upgrade")), + Util.ing(Knives.TERRA) ); } @@ -62,4 +62,4 @@ public int getManaPerDamage() { public boolean isValidRepairItem(@Nonnull ItemStack toRepair, @Nonnull ItemStack repair) { return enabled() && repair.is(DelightfulItems.ingot("alfsteel")); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfsteelTier.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfsteelTier.java index 1f4e4a57..0ca7d7f0 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfsteelTier.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/mythicbotany/AlfsteelTier.java @@ -6,7 +6,6 @@ import net.brnbrd.delightful.compat.Mods; import net.minecraft.world.item.Tier; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraftforge.common.TierSortingRegistry; import org.jetbrains.annotations.NotNull; import java.util.function.Supplier; @@ -44,4 +43,4 @@ public int getEnchantmentValue() { public @NotNull Ingredient getRepairIngredient() { return DelightfulItems.getIngot("alfsteel"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nethers_exoticism/KiwanoKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nethers_exoticism/KiwanoKnifeItem.java index 5510517f..15ec4049 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nethers_exoticism/KiwanoKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nethers_exoticism/KiwanoKnifeItem.java @@ -15,7 +15,7 @@ public KiwanoKnifeItem(Properties properties) { @Override public List getTools() { return List.of( - Component.literal("Burning").withStyle(ChatFormatting.BLUE) + Component.literal("Burning").withStyle(ChatFormatting.BLUE) ); } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nourished_nether/NecroniumKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nourished_nether/NecroniumKnifeItem.java index 2b867032..a3c5b1ad 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nourished_nether/NecroniumKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/nourished_nether/NecroniumKnifeItem.java @@ -23,12 +23,12 @@ public NecroniumKnifeItem(Properties properties) { @Override public List getTools() { return List.of( - Component.literal("Afterlife").withStyle(ChatFormatting.AQUA) + Component.literal("Afterlife").withStyle(ChatFormatting.AQUA) ); } @Override - public boolean hurtEnemy(@NotNull ItemStack stack, @NotNull LivingEntity target, @NotNull LivingEntity attacker) { + public boolean hurtEnemy(@NotNull ItemStack stack, @NotNull LivingEntity target, @NotNull LivingEntity attacker) { ResourceLocation stasis = Util.rl("nourished_nether", "stasis"); if (super.hurtEnemy(stack, target, attacker) && target.getRandom().nextInt(1, 4) == 1) { if (ForgeRegistries.MOB_EFFECTS.containsKey(stasis)) { diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/oresabovediamonds/NetheriteOpalKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/oresabovediamonds/NetheriteOpalKnifeItem.java index 82c8acb6..b6621b02 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/oresabovediamonds/NetheriteOpalKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/oresabovediamonds/NetheriteOpalKnifeItem.java @@ -18,8 +18,8 @@ public NetheriteOpalKnifeItem(Properties properties) { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Util.ing(() -> Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), - Util.ing(Knives.BLACK_OPAL) + Util.ing(() -> Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), + Util.ing(Knives.BLACK_OPAL) ); } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/seeds/LeafKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/seeds/LeafKnifeItem.java index 3036754c..f893416e 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/seeds/LeafKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/seeds/LeafKnifeItem.java @@ -15,7 +15,7 @@ public LeafKnifeItem(Properties properties) { @Override public List getTools() { return List.of( - Component.literal("Very sharp").withStyle(ChatFormatting.GRAY) + Component.literal("Very sharp").withStyle(ChatFormatting.GRAY) ); } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/FieryKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/FieryKnifeItem.java index 0c5d3fcb..3906635e 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/FieryKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/FieryKnifeItem.java @@ -15,34 +15,34 @@ import java.util.List; public class FieryKnifeItem extends CompatKnifeItem { - public FieryKnifeItem(Properties properties) { - super("twilightforest", DelightfulItems.ingot("fiery"), DelightfulTiers.FIERY, properties, ChatFormatting.YELLOW); - } + public FieryKnifeItem(Properties properties) { + super("twilightforest", DelightfulItems.ingot("fiery"), DelightfulTiers.FIERY, properties, ChatFormatting.YELLOW); + } - @Override - public String[] getConflicts() { - return new String[]{"twilightdelight"}; - } + @Override + public String[] getConflicts() { + return new String[]{"twilightdelight"}; + } - @Override - public List getTools() { - return List.of( - Component.translatable("item.twilightforest.fiery_sword.desc").withStyle(ChatFormatting.GRAY) - ); - } + @Override + public List getTools() { + return List.of( + Component.translatable("item.twilightforest.fiery_sword.desc").withStyle(ChatFormatting.GRAY) + ); + } - @Override - public Ingredient getRod() { - return Ingredient.of(Items.BLAZE_ROD); - } + @Override + public Ingredient getRod() { + return Ingredient.of(Items.BLAZE_ROD); + } - @Override - public boolean canApplyAtEnchantingTable(@NotNull ItemStack stack, @NotNull Enchantment enchantment) { - return enchantment != Enchantments.FIRE_ASPECT && super.canApplyAtEnchantingTable(stack, enchantment); - } + @Override + public boolean canApplyAtEnchantingTable(@NotNull ItemStack stack, @NotNull Enchantment enchantment) { + return enchantment != Enchantments.FIRE_ASPECT && super.canApplyAtEnchantingTable(stack, enchantment); + } - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return !EnchantmentHelper.getEnchantments(book).containsKey(Enchantments.FIRE_ASPECT) && super.isBookEnchantable(stack, book); - } -} + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return !EnchantmentHelper.getEnchantments(book).containsKey(Enchantments.FIRE_ASPECT) && super.isBookEnchantable(stack, book); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/IronwoodKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/IronwoodKnifeItem.java index 05c02b6b..1b721933 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/IronwoodKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/IronwoodKnifeItem.java @@ -13,22 +13,22 @@ import vectorwing.farmersdelight.common.registry.ModEnchantments; public class IronwoodKnifeItem extends CompatKnifeItem { - public IronwoodKnifeItem(Item.Properties properties) { - super("twilightforest", DelightfulItems.ingot("ironwood"), DelightfulTiers.IRONWOOD, properties, ChatFormatting.AQUA); - } + public IronwoodKnifeItem(Item.Properties properties) { + super("twilightforest", DelightfulItems.ingot("ironwood"), DelightfulTiers.IRONWOOD, properties, ChatFormatting.AQUA); + } - @Override - public String[] getConflicts() { - return new String[]{"twilightdelight"}; - } + @Override + public String[] getConflicts() { + return new String[]{"twilightdelight"}; + } - @Override - public @Nullable RecipeType getRecipeType() { - return null; - } + @Override + public @Nullable RecipeType getRecipeType() { + return null; + } - @Override - public @NotNull ItemStack getCreativeItem() { - return Util.enchant(super.getCreativeItem(), ModEnchantments.BACKSTABBING.get(), 1); - } -} + @Override + public @NotNull ItemStack getCreativeItem() { + return Util.enchant(super.getCreativeItem(), ModEnchantments.BACKSTABBING.get(), 1); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/KnightmetalKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/KnightmetalKnifeItem.java index f53cb3f1..45878f96 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/KnightmetalKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/KnightmetalKnifeItem.java @@ -45,7 +45,7 @@ private void onHurt(LivingHurtEvent e) { @Override public List getTools() { return List.of( - Component.translatable("item." + Mods.TF + ".knightmetal_sword.desc").withStyle(ChatFormatting.GRAY) + Component.translatable("item." + Mods.TF + ".knightmetal_sword.desc").withStyle(ChatFormatting.GRAY) ); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/SteeleafKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/SteeleafKnifeItem.java index 445b09b1..6c8bc653 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/SteeleafKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/twilightforest/SteeleafKnifeItem.java @@ -12,22 +12,22 @@ import org.jetbrains.annotations.Nullable; public class SteeleafKnifeItem extends CompatKnifeItem { - public SteeleafKnifeItem(Properties properties) { - super("twilightforest", DelightfulItems.ingot("steeleaf"), DelightfulTiers.STEELEAF, properties, ChatFormatting.AQUA); - } + public SteeleafKnifeItem(Properties properties) { + super("twilightforest", DelightfulItems.ingot("steeleaf"), DelightfulTiers.STEELEAF, properties, ChatFormatting.AQUA); + } - @Override - public String[] getConflicts() { - return new String[]{"twilightdelight"}; - } + @Override + public String[] getConflicts() { + return new String[]{"twilightdelight"}; + } - @Override - public @Nullable RecipeType getRecipeType() { - return null; - } + @Override + public @Nullable RecipeType getRecipeType() { + return null; + } - @Override - public @NotNull ItemStack getCreativeItem() { - return Util.enchant(super.getCreativeItem(), Enchantments.SMITE, 2); - } -} + @Override + public @NotNull ItemStack getCreativeItem() { + return Util.enchant(super.getCreativeItem(), Enchantments.SMITE, 2); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/CloggrumKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/CloggrumKnifeItem.java index d88acb9f..74ba9ccc 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/CloggrumKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/CloggrumKnifeItem.java @@ -12,6 +12,6 @@ public CloggrumKnifeItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{ Mods.UGD }; + return new String[]{Mods.UGD}; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/ForgottenKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/ForgottenKnifeItem.java index faba4d89..5c88f310 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/ForgottenKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/ForgottenKnifeItem.java @@ -12,15 +12,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.registries.ForgeRegistries; import org.apache.commons.lang3.tuple.ImmutablePair; -import org.jetbrains.annotations.Nullable; - import java.util.List; public class ForgottenKnifeItem extends CompatKnifeItem { @@ -34,7 +31,7 @@ public ForgottenKnifeItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{ Mods.UGD }; + return new String[]{Mods.UGD}; } @Override @@ -45,18 +42,18 @@ public List getTools() { @Override public ImmutablePair getSmithing() { return new ImmutablePair<>( - Ingredient.of(upgrade), - Util.ing(Knives.CLOGGRUM) + Ingredient.of(upgrade), + Util.ing(Knives.CLOGGRUM) ); } void onHurt(LivingHurtEvent e) { if ( - this.enabled() && - e.getSource().getEntity() instanceof Player player && - player.getMainHandItem().is(this) && - ForgeRegistries.ENTITY_TYPES.getKey(e.getEntity().getType()).getNamespace().equals(Mods.UG) && - e.getEntity().canChangeDimensions() + this.enabled() && + e.getSource().getEntity() instanceof Player player && + player.getMainHandItem().is(this) && + ForgeRegistries.ENTITY_TYPES.getKey(e.getEntity().getType()).getNamespace().equals(Mods.UG) && + e.getEntity().canChangeDimensions() ) { e.setAmount(e.getAmount() * 1.5F); } @@ -65,12 +62,12 @@ void onHurt(LivingHurtEvent e) { void onDig(PlayerEvent.BreakSpeed e) { BlockState state = e.getState(); if ( - this.enabled() && - e.getEntity().getMainHandItem().is(this) && - state != null && - ForgeRegistries.BLOCKS.getKey(state.getBlock()).getNamespace().equals(Mods.UG) + this.enabled() && + e.getEntity().getMainHandItem().is(this) && + state != null && + ForgeRegistries.BLOCKS.getKey(state.getBlock()).getNamespace().equals(Mods.UG) ) { e.setNewSpeed(e.getOriginalSpeed() * 1.5F); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/FroststeelKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/FroststeelKnifeItem.java index 949e841b..3876598b 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/FroststeelKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/FroststeelKnifeItem.java @@ -21,7 +21,7 @@ public FroststeelKnifeItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{ Mods.UGD }; + return new String[]{Mods.UGD}; } @Override @@ -31,11 +31,11 @@ public List getTools() { private void onHurt(LivingHurtEvent e) { if ( - this.enabled() && - e.getSource().getEntity() instanceof Player player && - player.getMainHandItem().is(this) + this.enabled() && + e.getSource().getEntity() instanceof Player player && + player.getMainHandItem().is(this) ) { e.getEntity().addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 600, 1)); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/UtheriumKnifeItem.java b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/UtheriumKnifeItem.java index 1a242d0b..a7d4e7ce 100644 --- a/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/UtheriumKnifeItem.java +++ b/src/main/java/net/brnbrd/delightful/common/item/knife/compat/undergarden/UtheriumKnifeItem.java @@ -23,7 +23,7 @@ public UtheriumKnifeItem(Properties properties) { @Override public String[] getConflicts() { - return new String[]{ Mods.UGD }; + return new String[]{Mods.UGD}; } @Override @@ -33,12 +33,12 @@ public List getTools() { void onHurt(LivingHurtEvent e) { if ( - this.enabled() && - e.getSource().getEntity() instanceof Player player && - player.getMainHandItem().is(this) && - e.getEntity().getType().is(TagKey.create(ForgeRegistries.Keys.ENTITY_TYPES, Util.rl(Mods.UG, "rotspawn"))) + this.enabled() && + e.getSource().getEntity() instanceof Player player && + player.getMainHandItem().is(this) && + e.getEntity().getType().is(TagKey.create(ForgeRegistries.Keys.ENTITY_TYPES, Util.rl(Mods.UG, "rotspawn"))) ) { e.setAmount(e.getAmount() * 1.5F); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/AddItemLootModifier.java b/src/main/java/net/brnbrd/delightful/common/loot/AddItemLootModifier.java index 55256b08..73bded42 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/AddItemLootModifier.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/AddItemLootModifier.java @@ -14,47 +14,47 @@ import org.jetbrains.annotations.NotNull; public class AddItemLootModifier extends LootModifier { - public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst) - .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(g -> g.item)) - .and(Codec.INT.fieldOf("minAmount").forGetter(g -> g.minAmount)) - .and(Codec.INT.fieldOf("maxAmount").forGetter(g -> g.maxAmount)) - .and(Codec.BOOL.fieldOf("unique").forGetter(g -> g.unique)) - .apply(inst, AddItemLootModifier::new)); - protected final Item item; - protected final int minAmount; - protected final int maxAmount; - protected final boolean unique; + public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst) + .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(g -> g.item)) + .and(Codec.INT.fieldOf("minAmount").forGetter(g -> g.minAmount)) + .and(Codec.INT.fieldOf("maxAmount").forGetter(g -> g.maxAmount)) + .and(Codec.BOOL.fieldOf("unique").forGetter(g -> g.unique)) + .apply(inst, AddItemLootModifier::new)); + protected final Item item; + protected final int minAmount; + protected final int maxAmount; + protected final boolean unique; - public AddItemLootModifier(LootItemCondition[] conditions, Item item, int minAmount, int maxAmount, boolean unique) { - super(conditions); - this.item = item; - this.minAmount = minAmount; - this.maxAmount = maxAmount; - this.unique = unique; - } + public AddItemLootModifier(LootItemCondition[] conditions, Item item, int minAmount, int maxAmount, boolean unique) { + super(conditions); + this.item = item; + this.minAmount = minAmount; + this.maxAmount = maxAmount; + this.unique = unique; + } - /** - * Applies the modifier to the generated loot (all loot conditions have already been checked - * and have returned true). - * - * @param generatedLoot the list of ItemStacks that will be dropped, generated by loot tables - * @param context the LootContext, identical to what is passed to loot tables - * @return modified loot drops - */ - @Override - protected @NotNull ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { - if ((this.unique && generatedLoot.stream().anyMatch(stack -> stack.getItem().equals(this.item))) || (this.maxAmount < 1)) { - return generatedLoot; - } - int amount = this.minAmount == this.maxAmount ? this.minAmount : context.getRandom().nextInt(this.maxAmount + 1 - this.minAmount) + this.minAmount; - return (amount >= 1) ? Util.with(generatedLoot, new ItemStack(this.item, amount)) : generatedLoot; - } + /** + * Applies the modifier to the generated loot (all loot conditions have already been checked + * and have returned true). + * + * @param generatedLoot the list of ItemStacks that will be dropped, generated by loot tables + * @param context the LootContext, identical to what is passed to loot tables + * @return modified loot drops + */ + @Override + protected @NotNull ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { + if ((this.unique && generatedLoot.stream().anyMatch(stack -> stack.getItem().equals(this.item))) || (this.maxAmount < 1)) { + return generatedLoot; + } + int amount = this.minAmount == this.maxAmount ? this.minAmount : context.getRandom().nextInt(this.maxAmount + 1 - this.minAmount) + this.minAmount; + return (amount >= 1) ? Util.with(generatedLoot, new ItemStack(this.item, amount)) : generatedLoot; + } - /** - * Returns the registered codec for this modifier - */ - @Override - public Codec codec() { - return DelightfulLootModifiers.ADD_ITEM.get(); - } + /** + * Returns the registered codec for this modifier + */ + @Override + public Codec codec() { + return DelightfulLootModifiers.ADD_ITEM.get(); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/CompatAddItemLootModifier.java b/src/main/java/net/brnbrd/delightful/common/loot/CompatAddItemLootModifier.java index 6867d900..e48415a5 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/CompatAddItemLootModifier.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/CompatAddItemLootModifier.java @@ -13,13 +13,13 @@ public class CompatAddItemLootModifier extends AddItemLootModifier { public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst) - .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(g -> g.item)) - .and(Codec.INT.fieldOf("minAmount").forGetter(g -> g.minAmount)) - .and(Codec.INT.fieldOf("maxAmount").forGetter(g -> g.maxAmount)) - .and(Codec.BOOL.fieldOf("unique").forGetter(g -> g.unique)) - .and(Codec.STRING.fieldOf("modid").forGetter(g -> g.modid)) - .and(Codec.BOOL.fieldOf("enable").forGetter(g -> g.enable)) - .apply(inst, CompatAddItemLootModifier::new)); + .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(g -> g.item)) + .and(Codec.INT.fieldOf("minAmount").forGetter(g -> g.minAmount)) + .and(Codec.INT.fieldOf("maxAmount").forGetter(g -> g.maxAmount)) + .and(Codec.BOOL.fieldOf("unique").forGetter(g -> g.unique)) + .and(Codec.STRING.fieldOf("modid").forGetter(g -> g.modid)) + .and(Codec.BOOL.fieldOf("enable").forGetter(g -> g.enable)) + .apply(inst, CompatAddItemLootModifier::new)); String modid; boolean enable; @@ -36,4 +36,4 @@ public CompatAddItemLootModifier(LootItemCondition[] conditions, Item item, int } return generatedLoot; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/DelightfulLootItemConditions.java b/src/main/java/net/brnbrd/delightful/common/loot/DelightfulLootItemConditions.java index 8a9e764e..9fb94754 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/DelightfulLootItemConditions.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/DelightfulLootItemConditions.java @@ -12,14 +12,14 @@ public class DelightfulLootItemConditions { private static final DeferredRegister LICT = DeferredRegister.create(Registries.LOOT_CONDITION_TYPE, Delightful.MODID); public static final RegistryObject IS_TAG = LICT.register("is_tag", - () -> new LootItemConditionType(new LootItemBlockIsTagCondition.Serializer())); + () -> new LootItemConditionType(new LootItemBlockIsTagCondition.Serializer())); public static final RegistryObject ENABLED = LICT.register("enabled", - () -> new LootItemConditionType(new LootItemEnabledCondition.Serializer())); + () -> new LootItemConditionType(new LootItemEnabledCondition.Serializer())); public static final RegistryObject MOD_LOADED = LICT.register("mod_loaded", - () -> new LootItemConditionType(new LootItemModLoadedCondition.Serializer())); + () -> new LootItemConditionType(new LootItemModLoadedCondition.Serializer())); public static void create(IEventBus bus) { LICT.register(bus); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/LootItemBlockIsTagCondition.java b/src/main/java/net/brnbrd/delightful/common/loot/LootItemBlockIsTagCondition.java index 043a5b4d..08966a98 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/LootItemBlockIsTagCondition.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/LootItemBlockIsTagCondition.java @@ -18,6 +18,7 @@ public class LootItemBlockIsTagCondition implements LootItemCondition { final TagKey tag; + LootItemBlockIsTagCondition(TagKey tag) { this.tag = tag; } @@ -59,4 +60,4 @@ public LootItemBlockIsTagCondition deserialize(@NotNull JsonObject object, @NotN return new LootItemBlockIsTagCondition(BlockTags.create(Util.rl(GsonHelper.getAsString(object, "tag")))); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/LootItemEnabledCondition.java b/src/main/java/net/brnbrd/delightful/common/loot/LootItemEnabledCondition.java index c33e0b9f..1d5e5e9a 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/LootItemEnabledCondition.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/LootItemEnabledCondition.java @@ -13,6 +13,7 @@ public class LootItemEnabledCondition implements LootItemCondition { final String item; + LootItemEnabledCondition(String item) { this.item = item; } @@ -53,4 +54,4 @@ public void serialize(JsonObject object, LootItemEnabledCondition cond, @NotNull return new LootItemEnabledCondition(GsonHelper.getAsString(object, "item")); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/LootItemModLoadedCondition.java b/src/main/java/net/brnbrd/delightful/common/loot/LootItemModLoadedCondition.java index 80a745ca..b4108dce 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/LootItemModLoadedCondition.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/LootItemModLoadedCondition.java @@ -13,6 +13,7 @@ public class LootItemModLoadedCondition implements LootItemCondition { final String modid; + LootItemModLoadedCondition(String modid) { this.modid = modid; } @@ -53,4 +54,4 @@ public void serialize(JsonObject object, LootItemModLoadedCondition cond, @NotNu return new LootItemModLoadedCondition(GsonHelper.getAsString(object, "modid")); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/common/loot/SmeltLootModifier.java b/src/main/java/net/brnbrd/delightful/common/loot/SmeltLootModifier.java index d0da7287..18051af8 100644 --- a/src/main/java/net/brnbrd/delightful/common/loot/SmeltLootModifier.java +++ b/src/main/java/net/brnbrd/delightful/common/loot/SmeltLootModifier.java @@ -19,40 +19,40 @@ //LICENSE: https://github.com/MinecraftForge/MinecraftForge/blob/1.20.x/LICENSE.txt public class SmeltLootModifier extends LootModifier { - public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst).apply(inst, SmeltLootModifier::new)); + public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst).apply(inst, SmeltLootModifier::new)); - public SmeltLootModifier(LootItemCondition[] conditions) { - super(conditions); - } + public SmeltLootModifier(LootItemCondition[] conditions) { + super(conditions); + } - /** - * Applies the modifier to the generated loot (all loot conditions have already been checked - * and have returned true). - * - * @param generatedLoot the list of ItemStacks that will be dropped, generated by loot tables - * @param context the LootContext, identical to what is passed to loot tables - * @return modified loot drops - */ - @Override - protected @NotNull ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { - return generatedLoot.stream().map(stack -> { - var smelted = context.getLevel().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SimpleContainer(stack), context.getLevel()) - .map(recipe -> recipe.getResultItem(context.getLevel().registryAccess())) - .filter(itemStack -> !itemStack.isEmpty()) - .map(itemStack -> ItemHandlerHelper.copyStackWithSize(itemStack, stack.getCount() * itemStack.getCount())) - .orElse(stack); - if (smelted != stack) { - ExperienceOrb.award(context.getLevel(), context.getParam(LootContextParams.ORIGIN), context.getRandom().nextInt(3) + 1); - } - return smelted; - }).collect(ObjectArrayList.toList()); - } + /** + * Applies the modifier to the generated loot (all loot conditions have already been checked + * and have returned true). + * + * @param generatedLoot the list of ItemStacks that will be dropped, generated by loot tables + * @param context the LootContext, identical to what is passed to loot tables + * @return modified loot drops + */ + @Override + protected @NotNull ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { + return generatedLoot.stream().map(stack -> { + var smelted = context.getLevel().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SimpleContainer(stack), context.getLevel()) + .map(recipe -> recipe.getResultItem(context.getLevel().registryAccess())) + .filter(itemStack -> !itemStack.isEmpty()) + .map(itemStack -> ItemHandlerHelper.copyStackWithSize(itemStack, stack.getCount() * itemStack.getCount())) + .orElse(stack); + if (smelted != stack) { + ExperienceOrb.award(context.getLevel(), context.getParam(LootContextParams.ORIGIN), context.getRandom().nextInt(3) + 1); + } + return smelted; + }).collect(ObjectArrayList.toList()); + } - /** - * Returns the registered codec for this modifier - */ - @Override - public Codec codec() { - return DelightfulLootModifiers.SMELT.get(); - } + /** + * Returns the registered codec for this modifier + */ + @Override + public Codec codec() { + return DelightfulLootModifiers.SMELT.get(); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/AetherReduxCompat.java b/src/main/java/net/brnbrd/delightful/compat/AetherReduxCompat.java index 17354bf0..7b07cea2 100644 --- a/src/main/java/net/brnbrd/delightful/compat/AetherReduxCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/AetherReduxCompat.java @@ -2,11 +2,10 @@ import net.brnbrd.delightful.common.item.knife.Knives; import net.brnbrd.delightful.common.item.knife.compat.aether_redux.VeridiumKnifeItem; -import net.minecraft.world.item.Item; import net.zepalesque.redux.item.util.ReduxItemTiers; import java.util.function.Supplier; public class AetherReduxCompat { public static Supplier VERIDIUM = () -> new VeridiumKnifeItem.Uninfused(ReduxItemTiers.VERIDIUM, Knives.props()); public static Supplier INFUSED_VERIDIUM = () -> new VeridiumKnifeItem(ReduxItemTiers.INFUSED_VERIDIUM, Knives.props(), VERIDIUM); -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/AppleSkinEventHandler.java b/src/main/java/net/brnbrd/delightful/compat/AppleSkinEventHandler.java index e6276a25..11c454e2 100644 --- a/src/main/java/net/brnbrd/delightful/compat/AppleSkinEventHandler.java +++ b/src/main/java/net/brnbrd/delightful/compat/AppleSkinEventHandler.java @@ -1,8 +1,8 @@ package net.brnbrd.delightful.compat; +import net.brnbrd.delightful.common.events.pie.Pies; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.brnbrd.delightful.common.events.pie.Pies; import squeek.appleskin.api.event.TooltipOverlayEvent; public class AppleSkinEventHandler { @@ -11,4 +11,4 @@ public class AppleSkinEventHandler { public void onPreTooltipEvent(TooltipOverlayEvent.Pre e) { e.setCanceled(Pies.enabled(e.itemStack)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/ArsNouveauCompat.java b/src/main/java/net/brnbrd/delightful/compat/ArsNouveauCompat.java index 381ff5a2..59da2fca 100644 --- a/src/main/java/net/brnbrd/delightful/compat/ArsNouveauCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/ArsNouveauCompat.java @@ -8,5 +8,5 @@ public class ArsNouveauCompat { public static final String pie = "source_berry_pie"; public static final FoodProperties SOURCE_BERRY_PIE_SLICE = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() - .effect(() -> new MobEffectInstance(Mods.getManaRegen().get(), 300, 1), 1.0F).build(); + .effect(() -> new MobEffectInstance(Mods.getManaRegen().get(), 300, 1), 1.0F).build(); } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/BWGCompat.java b/src/main/java/net/brnbrd/delightful/compat/BWGCompat.java index cc93611c..5afb9cb7 100644 --- a/src/main/java/net/brnbrd/delightful/compat/BWGCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/BWGCompat.java @@ -17,11 +17,11 @@ public class BWGCompat { public static final String green_apple_pie = "green_apple_pie"; public static final Supplier BLUEBERRY_PIE_SLICE = () -> (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() - .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 1), 1.0F) - .build(); + .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 1), 1.0F) + .build(); public static final Supplier GREEN_APPLE_PIE_SLICE = () -> (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() - .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 0), 1.0F) - .effect(() -> new MobEffectInstance(MobEffects.DIG_SPEED, 400, 0), 1.0F) - .build(); -} + .effect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 600, 0), 1.0F) + .effect(() -> new MobEffectInstance(MobEffects.DIG_SPEED, 400, 0), 1.0F) + .build(); +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/BotaniaCompat.java b/src/main/java/net/brnbrd/delightful/compat/BotaniaCompat.java index 8fcc380f..925be35b 100644 --- a/src/main/java/net/brnbrd/delightful/compat/BotaniaCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/BotaniaCompat.java @@ -86,19 +86,19 @@ public static ManaBurstEntity getAlfBurst(Player player, ItemStack stack, int ma public static void trySpawnBurst(Player player, ItemStack stack, int manaPerDamage, float attackStr, boolean alf) { if (attackStr == 1) { ManaBurstEntity burst = alf ? - getAlfBurst(player, stack, manaPerDamage) : getBurst(player, stack, manaPerDamage); + getAlfBurst(player, stack, manaPerDamage) : getBurst(player, stack, manaPerDamage); player.level().addFreshEntity(burst); stack.hurtAndBreak(1, player, p -> p.broadcastBreakEvent(InteractionHand.MAIN_HAND)); player.level().playSound( - null, - player.getX(), - player.getY(), - player.getZ(), - BotaniaSounds.terraBlade, - SoundSource.PLAYERS, - 1F, - 1F + null, + player.getX(), + player.getY(), + player.getZ(), + BotaniaSounds.terraBlade, + SoundSource.PLAYERS, + 1F, + 1F ); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/BotaniaLCP.java b/src/main/java/net/brnbrd/delightful/compat/BotaniaLCP.java index a55a95a3..77ff5e49 100644 --- a/src/main/java/net/brnbrd/delightful/compat/BotaniaLCP.java +++ b/src/main/java/net/brnbrd/delightful/compat/BotaniaLCP.java @@ -11,6 +11,10 @@ public class BotaniaLCP implements BotaniaPacket { public static final BotaniaLCP INSTANCE = new BotaniaLCP(); + public static BotaniaLCP decode(FriendlyByteBuf buf) { + return INSTANCE; + } + public void handle(MinecraftServer server, ServerPlayer player) { // The swing packet will run immediately, so fetch the strength ahead float strengthScale = player.getAttackStrengthScale(0F); @@ -20,10 +24,6 @@ public void handle(MinecraftServer server, ServerPlayer player) { } } - public static BotaniaLCP decode(FriendlyByteBuf buf) { - return INSTANCE; - } - @Override public void encode(FriendlyByteBuf friendlyByteBuf) { @@ -33,4 +33,4 @@ public void encode(FriendlyByteBuf friendlyByteBuf) { public ResourceLocation getFabricId() { return null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/DeepAetherCompat.java b/src/main/java/net/brnbrd/delightful/compat/DeepAetherCompat.java index 13a6ad70..ce8263e9 100644 --- a/src/main/java/net/brnbrd/delightful/compat/DeepAetherCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/DeepAetherCompat.java @@ -1,12 +1,12 @@ package net.brnbrd.delightful.compat; -import java.util.function.Supplier; -import net.minecraft.world.item.Item; import net.brnbrd.delightful.common.item.knife.Knives; import net.brnbrd.delightful.common.item.knife.compat.deep_aether.SkyjadeKnifeItem; import net.brnbrd.delightful.common.item.knife.compat.deep_aether.StratusKnifeItem; +import net.minecraft.world.item.Item; +import java.util.function.Supplier; public class DeepAetherCompat { public static Supplier SKYJADE = () -> new SkyjadeKnifeItem(Knives.props()); public static Supplier STRATUS = () -> new StratusKnifeItem(Knives.props()); -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/JEIPlugin.java b/src/main/java/net/brnbrd/delightful/compat/JEIPlugin.java index 96ab7572..ce3521d5 100644 --- a/src/main/java/net/brnbrd/delightful/compat/JEIPlugin.java +++ b/src/main/java/net/brnbrd/delightful/compat/JEIPlugin.java @@ -19,114 +19,113 @@ import net.minecraft.world.item.Items; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.RegistryObject; +import org.jetbrains.annotations.NotNull; import vectorwing.farmersdelight.common.utility.TextUtils; import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; import java.util.List; -import org.jetbrains.annotations.NotNull; @JeiPlugin @ParametersAreNonnullByDefault @SuppressWarnings("unused") -public class JEIPlugin implements IModPlugin -{ - private static final ResourceLocation ID = Util.rl(Delightful.MODID, "jei_plugin"); +public class JEIPlugin implements IModPlugin { + private static final ResourceLocation ID = Util.rl(Delightful.MODID, "jei_plugin"); - @Override - public void registerRecipes(IRecipeRegistration registration) { - // Hide all disabled items from JEI - List hidden = new ArrayList<>(DelightfulItems.ITEMS.getEntries().stream() - .filter(i -> (i.get() instanceof IConfigured c) ? !c.enabled() : !Util.enabled(i)) // Keep items not enabled - .map(Util::gs).toList()); + @Override + public void registerRecipes(IRecipeRegistration registration) { + // Hide all disabled items from JEI + List hidden = new ArrayList<>(DelightfulItems.ITEMS.getEntries().stream() + .filter(i -> (i.get() instanceof IConfigured c) ? !c.enabled() : !Util.enabled(i)) // Keep items not enabled + .map(Util::gs).toList()); - // Delightful conflicts - this.hide(hidden, Mods.VD, "pb_j"); - this.hide(hidden, Mods.UGD, "gloomgourd_pie_slice"); + // Delightful conflicts + this.hide(hidden, Mods.VD, "pb_j"); + this.hide(hidden, Mods.UGD, "gloomgourd_pie_slice"); - // FD conflicts - this.hide(hidden, Mods.IN, "fried_egg"); - this.hide(hidden, Mods.NA, "cooked_egg"); - this.hide(hidden, Mods.AA, "fried_egg"); + // FD conflicts + this.hide(hidden, Mods.IN, "fried_egg"); + this.hide(hidden, Mods.NA, "cooked_egg"); + this.hide(hidden, Mods.AA, "fried_egg"); - // Other - this.hide(hidden, Mods.AA, "honeyed_apple", Mods.BB); - this.hide(hidden, Mods.MOD, "bread_slice", Mods.SAS); - this.hide(hidden, Mods.MOD, "toast", Mods.SAS); - this.hide(hidden, "cratedelight", "berry_crate", "berry_good"); - this.hide(hidden, "cratedelight", "glowberry_crate", "berry_good"); - this.hide(hidden, "cratedelight", "cod_crate", "crabbersdelight"); - this.hide(hidden, "cratedelight", "salmon_crate", "crabbersdelight"); - this.hide(hidden, "cratedelight", "egg_crate", "incubation"); - this.hide(hidden, "cratedelight", "sugar_bag", "supplementaries"); - this.hide(hidden, "cratedelight", "apple_crate", "fruitsdelight"); + // Other + this.hide(hidden, Mods.AA, "honeyed_apple", Mods.BB); + this.hide(hidden, Mods.MOD, "bread_slice", Mods.SAS); + this.hide(hidden, Mods.MOD, "toast", Mods.SAS); + this.hide(hidden, "cratedelight", "berry_crate", "berry_good"); + this.hide(hidden, "cratedelight", "glowberry_crate", "berry_good"); + this.hide(hidden, "cratedelight", "cod_crate", "crabbersdelight"); + this.hide(hidden, "cratedelight", "salmon_crate", "crabbersdelight"); + this.hide(hidden, "cratedelight", "egg_crate", "incubation"); + this.hide(hidden, "cratedelight", "sugar_bag", "supplementaries"); + this.hide(hidden, "cratedelight", "apple_crate", "fruitsdelight"); - if (hidden.size() > 0) { - registration.getIngredientManager().removeIngredientsAtRuntime(VanillaTypes.ITEM_STACK, hidden); - } + if (hidden.size() > 0) { + registration.getIngredientManager().removeIngredientsAtRuntime(VanillaTypes.ITEM_STACK, hidden); + } - if (!Mods.loaded(Mods.FR)) { - registration.getIngredientManager().removeIngredientsAtRuntime(ForgeTypes.FLUID_STACK, List.of( - new FluidStack(DelightfulFluids.AZALEA_TEA.get(), 1000), - new FluidStack(DelightfulFluids.LAVENDER_TEA.get(), 1000) - )); - } + if (!Mods.loaded(Mods.FR)) { + registration.getIngredientManager().removeIngredientsAtRuntime(ForgeTypes.FLUID_STACK, List.of( + new FluidStack(DelightfulFluids.AZALEA_TEA.get(), 1000), + new FluidStack(DelightfulFluids.LAVENDER_TEA.get(), 1000) + )); + } - // Add Knife translations - DelightfulItems.ITEMS.getEntries().stream() - .map(RegistryObject::get) - .filter(k -> k instanceof DelightfulKnifeItem dk && dk.enabled()) - .map(ItemStack::new) - .forEach(i -> registration.addIngredientInfo(i, VanillaTypes.ITEM_STACK, TextUtils.getTranslation("jei.info.knife"))); + // Add Knife translations + DelightfulItems.ITEMS.getEntries().stream() + .map(RegistryObject::get) + .filter(k -> k instanceof DelightfulKnifeItem dk && dk.enabled()) + .map(ItemStack::new) + .forEach(i -> registration.addIngredientInfo(i, VanillaTypes.ITEM_STACK, TextUtils.getTranslation("jei.info.knife"))); - // Add other descriptions - if (Util.enabled(DelightfulItems.SALMONBERRIES)) { - registration.addIngredientInfo( - List.of(Util.gs(DelightfulItems.SALMONBERRIES), Util.gs(DelightfulItems.WILD_SALMONBERRIES)), - VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".salmonberries.desc") - ); - } - if (((GreenTeaLeavesItem)DelightfulItems.GREEN_TEA_LEAF.get()).enabled()) { - registration.addIngredientInfo(Util.gs(DelightfulItems.GREEN_TEA_LEAF), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".green_tea_leaf.desc")); - } - if (Util.enabled(DelightfulItems.ACORN)) { - registration.addIngredientInfo(Util.gs(DelightfulItems.ACORN), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".acorn.desc")); - } - if (Util.enabled(DelightfulItems.MINI_MELON)) { - registration.addIngredientInfo( - List.of(new ItemStack(Items.MELON_SLICE), Util.gs(DelightfulItems.MINI_MELON)), - VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".mini_melon.desc")); - } - if (Util.enabled(DelightfulItems.CANTALOUPE)) { - registration.addIngredientInfo( - List.of(Util.gs(DelightfulItems.CANTALOUPE_SLICE), Util.gs(DelightfulItems.CANTALOUPE)), - VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".cantaloupe.desc").append(" ").append(Component.translatable(Delightful.MODID + ".sliceable.desc"))); - } - if (Util.enabled(DelightfulItems.CANTALOUPE_SEEDS)) { - registration.addIngredientInfo( - Util.gs(DelightfulItems.CANTALOUPE_SEEDS), - VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".cantaloupe_seeds.desc")); - } - if (Util.enabled(DelightfulItems.ANIMAL_FAT)) { - registration.addIngredientInfo(Util.gs(DelightfulItems.ANIMAL_FAT), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".animal_fat.desc")); - } - if (Util.enabled(DelightfulItems.ANIMAL_OIL_BOTTLE)) { - registration.addIngredientInfo(Util.gs(DelightfulItems.ANIMAL_OIL_BOTTLE), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".animal_oil_bottle.desc")); - } - registration.addIngredientInfo(new ItemStack(Items.MELON), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".sliceable.desc")); - registration.addIngredientInfo(new ItemStack(Items.PUMPKIN), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".sliceable.desc")); - } + // Add other descriptions + if (Util.enabled(DelightfulItems.SALMONBERRIES)) { + registration.addIngredientInfo( + List.of(Util.gs(DelightfulItems.SALMONBERRIES), Util.gs(DelightfulItems.WILD_SALMONBERRIES)), + VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".salmonberries.desc") + ); + } + if (((GreenTeaLeavesItem) DelightfulItems.GREEN_TEA_LEAF.get()).enabled()) { + registration.addIngredientInfo(Util.gs(DelightfulItems.GREEN_TEA_LEAF), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".green_tea_leaf.desc")); + } + if (Util.enabled(DelightfulItems.ACORN)) { + registration.addIngredientInfo(Util.gs(DelightfulItems.ACORN), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".acorn.desc")); + } + if (Util.enabled(DelightfulItems.MINI_MELON)) { + registration.addIngredientInfo( + List.of(new ItemStack(Items.MELON_SLICE), Util.gs(DelightfulItems.MINI_MELON)), + VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".mini_melon.desc")); + } + if (Util.enabled(DelightfulItems.CANTALOUPE)) { + registration.addIngredientInfo( + List.of(Util.gs(DelightfulItems.CANTALOUPE_SLICE), Util.gs(DelightfulItems.CANTALOUPE)), + VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".cantaloupe.desc").append(" ").append(Component.translatable(Delightful.MODID + ".sliceable.desc"))); + } + if (Util.enabled(DelightfulItems.CANTALOUPE_SEEDS)) { + registration.addIngredientInfo( + Util.gs(DelightfulItems.CANTALOUPE_SEEDS), + VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".cantaloupe_seeds.desc")); + } + if (Util.enabled(DelightfulItems.ANIMAL_FAT)) { + registration.addIngredientInfo(Util.gs(DelightfulItems.ANIMAL_FAT), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".animal_fat.desc")); + } + if (Util.enabled(DelightfulItems.ANIMAL_OIL_BOTTLE)) { + registration.addIngredientInfo(Util.gs(DelightfulItems.ANIMAL_OIL_BOTTLE), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".animal_oil_bottle.desc")); + } + registration.addIngredientInfo(new ItemStack(Items.MELON), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".sliceable.desc")); + registration.addIngredientInfo(new ItemStack(Items.PUMPKIN), VanillaTypes.ITEM_STACK, Component.translatable(Delightful.MODID + ".sliceable.desc")); + } - private void hide(List hiddenList, String modid, String item, String... conflicts) { - if (Mods.loaded(modid) && (conflicts.length < 1 || Mods.orLoaded(conflicts))) { - Item found = Util.item(modid, item); - if (found != null) { - hiddenList.add(new ItemStack(found)); - } - } - } + private void hide(List hiddenList, String modid, String item, String... conflicts) { + if (Mods.loaded(modid) && (conflicts.length < 1 || Mods.orLoaded(conflicts))) { + Item found = Util.item(modid, item); + if (found != null) { + hiddenList.add(new ItemStack(found)); + } + } + } - @Override - public @NotNull ResourceLocation getPluginUid() { - return ID; - } + @Override + public @NotNull ResourceLocation getPluginUid() { + return ID; + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/Mods.java b/src/main/java/net/brnbrd/delightful/compat/Mods.java index 917574b0..49c89953 100644 --- a/src/main/java/net/brnbrd/delightful/compat/Mods.java +++ b/src/main/java/net/brnbrd/delightful/compat/Mods.java @@ -6,9 +6,9 @@ import net.minecraft.world.effect.MobEffects; import net.minecraftforge.fml.ModList; import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.NotNull; import java.util.Optional; import java.util.function.Supplier; -import org.jetbrains.annotations.NotNull; public class Mods { public static final String AA = "additionaladditions"; @@ -144,4 +144,4 @@ public static Supplier getVirulentResistance() { } return () -> MobEffects.FIRE_RESISTANCE; } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/UndergardenCompat.java b/src/main/java/net/brnbrd/delightful/compat/UndergardenCompat.java index 317f350f..99acc754 100644 --- a/src/main/java/net/brnbrd/delightful/compat/UndergardenCompat.java +++ b/src/main/java/net/brnbrd/delightful/compat/UndergardenCompat.java @@ -14,11 +14,13 @@ public class UndergardenCompat { public static final String pie = "gloomgourd_pie"; + public static final Supplier GLOOMGOURD_PIE_SLICE = () -> (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() + .effect(() -> new MobEffectInstance(Mods.getVirulentResistance().get(), 160, 0), 1.0F).build(); public static Supplier gloomgourd_slice() { return Mods.loaded(Mods.UGD) ? - () -> Util.item(Mods.UGD, "gloomgourd_slice") : - ModItems.PUMPKIN_SLICE; + () -> Util.item(Mods.UGD, "gloomgourd_slice") : + ModItems.PUMPKIN_SLICE; } public static Supplier gloomgourd() { @@ -32,7 +34,4 @@ public static Supplier gloomgourd_stem() { public static Supplier gloomgourd_attached_stem() { return UGBlocks.GLOOMGOURD_STEM_ATTACHED; } - - public static final Supplier GLOOMGOURD_PIE_SLICE = () -> (new FoodProperties.Builder()).nutrition(3).saturationMod(0.3F).fast() - .effect(() -> new MobEffectInstance(Mods.getVirulentResistance().get(), 160, 0), 1.0F).build(); -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/jade/DCropProgress.java b/src/main/java/net/brnbrd/delightful/compat/jade/DCropProgress.java index b792a98c..96c34361 100644 --- a/src/main/java/net/brnbrd/delightful/compat/jade/DCropProgress.java +++ b/src/main/java/net/brnbrd/delightful/compat/jade/DCropProgress.java @@ -17,6 +17,13 @@ public enum DCropProgress implements IBlockComponentProvider { INSTANCE; + private static void addMaturityTooltip(ITooltip tooltip, int age, int maxAge) { + tooltip.add(Component.translatable("tooltip.jade.crop_growth", age == maxAge ? + Component.translatable("tooltip.jade.crop_mature").withStyle(ChatFormatting.GREEN) : + Component.literal(String.format("%.0f%%", (age / (float) maxAge) * 100.0F)).withStyle(ChatFormatting.WHITE) + )); + } + @Override public void appendTooltip(ITooltip tooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { BlockState state = blockAccessor.getBlockState(); @@ -28,15 +35,8 @@ public void appendTooltip(ITooltip tooltip, BlockAccessor blockAccessor, IPlugin } } - private static void addMaturityTooltip(ITooltip tooltip, int age, int maxAge) { - tooltip.add(Component.translatable("tooltip.jade.crop_growth", age == maxAge ? - Component.translatable("tooltip.jade.crop_mature").withStyle(ChatFormatting.GREEN) : - Component.literal(String.format("%.0f%%", (age / (float) maxAge) * 100.0F)).withStyle(ChatFormatting.WHITE) - )); - } - @Override public ResourceLocation getUid() { return Util.rl(Delightful.MODID, "crop_progress"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/jade/DMushroomColonyAge.java b/src/main/java/net/brnbrd/delightful/compat/jade/DMushroomColonyAge.java index 8944da59..979d6207 100644 --- a/src/main/java/net/brnbrd/delightful/compat/jade/DMushroomColonyAge.java +++ b/src/main/java/net/brnbrd/delightful/compat/jade/DMushroomColonyAge.java @@ -6,11 +6,11 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.state.BlockState; -import vectorwing.farmersdelight.common.block.MushroomColonyBlock; import snownee.jade.api.BlockAccessor; import snownee.jade.api.IBlockComponentProvider; import snownee.jade.api.ITooltip; import snownee.jade.api.config.IPluginConfig; +import vectorwing.farmersdelight.common.block.MushroomColonyBlock; public enum DMushroomColonyAge implements IBlockComponentProvider { INSTANCE; @@ -22,7 +22,7 @@ public void appendTooltip(ITooltip tooltip, BlockAccessor blockAccessor, IPlugin int age = state.getValue(mush.getAgeProperty()); int maxAge = mush.getMaxAge(); tooltip.add(Component.translatable("tooltip.jade.age", Component.literal(age + "/" + maxAge) - .withStyle(age == maxAge ? ChatFormatting.GREEN : ChatFormatting.WHITE) + .withStyle(age == maxAge ? ChatFormatting.GREEN : ChatFormatting.WHITE) )); } } @@ -31,4 +31,4 @@ public void appendTooltip(ITooltip tooltip, BlockAccessor blockAccessor, IPlugin public ResourceLocation getUid() { return Util.rl(Delightful.MODID, "mushroom_colony"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/nuggets/ISupportNuggets.java b/src/main/java/net/brnbrd/delightful/compat/nuggets/ISupportNuggets.java index cf41e9db..0045f4e2 100644 --- a/src/main/java/net/brnbrd/delightful/compat/nuggets/ISupportNuggets.java +++ b/src/main/java/net/brnbrd/delightful/compat/nuggets/ISupportNuggets.java @@ -3,24 +3,30 @@ import com.google.common.collect.ImmutableList; public interface ISupportNuggets { - String TYPICAL = "METAL_nugget"; - String REVERSED = "nugget_METAL"; + String TYPICAL = "METAL_nugget"; + String REVERSED = "nugget_METAL"; - /** ID of Compat Mod **/ - String getModid(); + /** + * ID of Compat Mod + **/ + String getModid(); - /** How their nugget item IDs are formatted, with METAL being the metal **/ - String getFormat(); + /** + * How their nugget item IDs are formatted, with METAL being the metal + **/ + String getFormat(); - /** - * The format with METAL replaced - * - * @param metal Replaces METAL in the format - **/ - default String formatMetal(String metal) { - return this.getFormat().replace("METAL", metal); - } + /** + * The format with METAL replaced + * + * @param metal Replaces METAL in the format + **/ + default String formatMetal(String metal) { + return this.getFormat().replace("METAL", metal); + } - /** All the metals this mod has nuggets for **/ - ImmutableList getMetals(); + /** + * All the metals this mod has nuggets for + **/ + ImmutableList getMetals(); } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/compat/nuggets/Nugget.java b/src/main/java/net/brnbrd/delightful/compat/nuggets/Nugget.java index 702c4c96..626cd2b2 100644 --- a/src/main/java/net/brnbrd/delightful/compat/nuggets/Nugget.java +++ b/src/main/java/net/brnbrd/delightful/compat/nuggets/Nugget.java @@ -3,42 +3,42 @@ import com.google.common.collect.ImmutableList; public enum Nugget implements ISupportNuggets { - //COPPERIZED("copperized", TYPICAL, ImmutableList.of("copper")), - //THERMAL("thermal", TYPICAL, ImmutableList.of("copper", "tin", "lead", "silver", "nickel", "bronze", "electrum", "invar", "constantan")), - //IMMERSIVEENGINEERING("immersiveengineering", REVERSED, ImmutableList.of("copper", "lead", "silver", "nickel", "electrum", "steel", "constantan")), - MEKANISM("mekanism", REVERSED, ImmutableList.of("bronze", "steel", "tin", "osmium")); + //COPPERIZED("copperized", TYPICAL, ImmutableList.of("copper")), + //THERMAL("thermal", TYPICAL, ImmutableList.of("copper", "tin", "lead", "silver", "nickel", "bronze", "electrum", "invar", "constantan")), + //IMMERSIVEENGINEERING("immersiveengineering", REVERSED, ImmutableList.of("copper", "lead", "silver", "nickel", "electrum", "steel", "constantan")), + MEKANISM("mekanism", REVERSED, ImmutableList.of("bronze", "steel", "tin", "osmium")); - private final String modid; - private final String format; - private final ImmutableList metals; + private final String modid; + private final String format; + private final ImmutableList metals; - Nugget(String modid, String format, ImmutableList metals) { - this.modid = modid; - this.format = format; - this.metals = metals; - } + Nugget(String modid, String format, ImmutableList metals) { + this.modid = modid; + this.format = format; + this.metals = metals; + } - /** - * ID of Compat Mod - **/ - @Override - public String getModid() { - return this.modid; - } + /** + * ID of Compat Mod + **/ + @Override + public String getModid() { + return this.modid; + } - /** - * How their nugget item IDs are formatted, with METAL being the metal - **/ - @Override - public String getFormat() { - return this.format; - } + /** + * How their nugget item IDs are formatted, with METAL being the metal + **/ + @Override + public String getFormat() { + return this.format; + } - /** - * All the metals this mod has nuggets for - **/ - @Override - public ImmutableList getMetals() { - return this.metals; - } -} + /** + * All the metals this mod has nuggets for + **/ + @Override + public ImmutableList getMetals() { + return this.metals; + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulAdvancementProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulAdvancementProvider.java index 1fb15bd1..3851ce1b 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulAdvancementProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulAdvancementProvider.java @@ -21,35 +21,35 @@ public class DelightfulAdvancementProvider implements ForgeAdvancementProvider.AdvancementGenerator { - @Override - public void generate(HolderLookup.@NotNull Provider registries, @NotNull Consumer consumer, @NotNull ExistingFileHelper existingFileHelper) { - Advancement root = Advancement.Builder.advancement() - .display(ModItems.COOKING_POT.get(), - TextUtils.getTranslation("advancement.root"), - TextUtils.getTranslation("advancement.root.desc"), - new ResourceLocation("minecraft:textures/block/bricks.png"), - FrameType.TASK, false, false, false) - .addCriterion("seeds", InventoryChangeTrigger.TriggerInstance.hasItems(new ItemLike[]{})) - .save(consumer, FarmersDelight.MODID + ":main/root"); + protected static Advancement.Builder getAdvancement(Advancement parent, ItemLike display, String name, FrameType frame, boolean showToast, boolean announceToChat, boolean hidden) { + return Advancement.Builder.advancement().parent(parent).display(display, + TextUtils.getTranslation("advancement." + name), + TextUtils.getTranslation("advancement." + name + ".desc"), + null, frame, showToast, announceToChat, hidden); + } - // craft_knife - Advancement.Builder huntAndGatherB = getAdvancement(root, ModItems.FLINT_KNIFE.get(), "craft_knife", FrameType.TASK, true, true, false) - .addCriterion("flint_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.FLINT_KNIFE.get())) - .addCriterion("iron_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.IRON_KNIFE.get())) - .addCriterion("diamond_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.DIAMOND_KNIFE.get())) - .addCriterion("golden_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.GOLDEN_KNIFE.get())) - .addCriterion("netherite_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.NETHERITE_KNIFE.get())); - DelightfulItems.ITEMS.getEntries().stream() - .map(RegistryObject::get) - .filter(item -> item instanceof DelightfulKnifeItem) - .forEach(k -> huntAndGatherB.addCriterion(Util.name(k), InventoryChangeTrigger.TriggerInstance.hasItems(k))); - huntAndGatherB.requirements(RequirementsStrategy.OR).save(consumer, FarmersDelight.MODID + ":main/craft_knife"); - } + @Override + public void generate(HolderLookup.@NotNull Provider registries, @NotNull Consumer consumer, @NotNull ExistingFileHelper existingFileHelper) { + Advancement root = Advancement.Builder.advancement() + .display(ModItems.COOKING_POT.get(), + TextUtils.getTranslation("advancement.root"), + TextUtils.getTranslation("advancement.root.desc"), + new ResourceLocation("minecraft:textures/block/bricks.png"), + FrameType.TASK, false, false, false) + .addCriterion("seeds", InventoryChangeTrigger.TriggerInstance.hasItems(new ItemLike[]{})) + .save(consumer, FarmersDelight.MODID + ":main/root"); - protected static Advancement.Builder getAdvancement(Advancement parent, ItemLike display, String name, FrameType frame, boolean showToast, boolean announceToChat, boolean hidden) { - return Advancement.Builder.advancement().parent(parent).display(display, - TextUtils.getTranslation("advancement." + name), - TextUtils.getTranslation("advancement." + name + ".desc"), - null, frame, showToast, announceToChat, hidden); - } -} + // craft_knife + Advancement.Builder huntAndGatherB = getAdvancement(root, ModItems.FLINT_KNIFE.get(), "craft_knife", FrameType.TASK, true, true, false) + .addCriterion("flint_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.FLINT_KNIFE.get())) + .addCriterion("iron_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.IRON_KNIFE.get())) + .addCriterion("diamond_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.DIAMOND_KNIFE.get())) + .addCriterion("golden_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.GOLDEN_KNIFE.get())) + .addCriterion("netherite_knife", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.NETHERITE_KNIFE.get())); + DelightfulItems.ITEMS.getEntries().stream() + .map(RegistryObject::get) + .filter(item -> item instanceof DelightfulKnifeItem) + .forEach(k -> huntAndGatherB.addCriterion(Util.name(k), InventoryChangeTrigger.TriggerInstance.hasItems(k))); + huntAndGatherB.requirements(RequirementsStrategy.OR).save(consumer, FarmersDelight.MODID + ":main/craft_knife"); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockLoot.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockLoot.java index 6255f41b..8ab0e948 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockLoot.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockLoot.java @@ -17,176 +17,175 @@ import net.minecraftforge.registries.RegistryObject; import org.jetbrains.annotations.NotNull; import vectorwing.farmersdelight.common.block.FeastBlock; - import java.util.Collections; import java.util.List; public class DelightfulBlockLoot extends BlockLootSubProvider { - private final static List NO_GEN = List.of( - DelightfulBlocks.WILD_SALMONBERRIES.getId() - ); - - protected DelightfulBlockLoot() { - super(Collections.emptySet(), FeatureFlags.REGISTRY.allFlags()); - } - - @Override - protected void generate() { - // Cabinets - DelightfulBlocks.BLOCKS.getEntries().stream() - .map(RegistryObject::get) - .filter(block -> block instanceof DelightfulCabinetBlock) - .forEach(this::dropSelf); - - // Pies - this.empty(DelightfulBlocks.SALMONBERRY_PIE); - this.empty(DelightfulBlocks.PUMPKIN_PIE); - this.empty(DelightfulBlocks.SOURCE_BERRY_PIE); - this.empty(DelightfulBlocks.GLOOMGOURD_PIE); - this.empty(DelightfulBlocks.GREEN_APPLE_PIE); - this.empty(DelightfulBlocks.BLUEBERRY_PIE); - - // Whole melons - this.dropSelf(DelightfulBlocks.MINI_MELON.get()); - this.dropSelf(DelightfulBlocks.CANTALOUPE.get()); - - // Plants - this.add(DelightfulBlocks.CANTALOUPE_PLANT.get(), (b) -> { - LootTable.Builder loot = this.createSingleItemTable(DelightfulItems.CANTALOUPE_SEEDS.get()) - .withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(CantaloupePlantBlock.AGE, CantaloupePlantBlock.MAX_AGE))) - .add(LootItem.lootTableItem(DelightfulItems.CANTALOUPE.get()))); - return applyExplosionDecay(b, loot); - } - ); - - // Sliced - this.add(DelightfulBlocks.SLICED_MINI_MELON.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable(); - int maxbites = ((SlicedMiniMelonBlock)DelightfulBlocks.SLICED_MINI_MELON.get()).getMaxBites(); - for (int i = 1; i <= maxbites; i++) { - final float left = (float) i; - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMiniMelonBlock.BITES, i))) - .add(LootItem.lootTableItem(((SlicedMiniMelonBlock) b).getSliceItem().getItem())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float)maxbites) - left + 1.0F)))); - } - return applyExplosionDecay(b, loot); - } - ); - this.add(DelightfulBlocks.SLICED_CANTALOUPE.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable(); - int maxbites = ((SlicedMiniMelonBlock)DelightfulBlocks.SLICED_CANTALOUPE.get()).getMaxBites(); - for (int i = 1; i <= maxbites; i++) { - final float left = (float) i; - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMiniMelonBlock.BITES, i))) - .add(LootItem.lootTableItem(((SlicedMiniMelonBlock) b).getSliceItem().getItem())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float)maxbites) - left + 1.0F)))); - } - return applyExplosionDecay(b, loot); - } - ); - this.add(DelightfulBlocks.SLICED_MELON.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable(); - int maxbites = ((SlicedMelonBlock)DelightfulBlocks.SLICED_MELON.get()).getMaxBites(); - for (int i = 1; i <= maxbites; i++) { - final float left = (float) i; - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMelonBlock.BITES, i))) - .add(LootItem.lootTableItem(((SlicedMelonBlock) b).getSliceItem().getItem())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float)maxbites) - left + 1.0F)))); - } - return applyExplosionDecay(b, loot); - } - ); - this.add(DelightfulBlocks.SLICED_PUMPKIN.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable(); - int maxbites = ((SlicedGourdBlock)DelightfulBlocks.SLICED_PUMPKIN.get()).getMaxBites(); - for (int i = 1; i <= maxbites; i++) { - final float left = (float) i; - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedGourdBlock.BITES, i))) - .add(LootItem.lootTableItem(((SlicedGourdBlock) b).getSliceItem().getItem())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float)maxbites) - left + 1.0F)))); - } - return applyExplosionDecay(b, loot); - } - ); - this.add(DelightfulBlocks.SLICED_GLOOMGOURD.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable(); - int maxbites = ((SlicedGourdBlock)DelightfulBlocks.SLICED_GLOOMGOURD.get()).getMaxBites(); - for (int i = 1; i <= maxbites; i++) { - final float left = (float) i; - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedGourdBlock.BITES, i))) - .add(LootItem.lootTableItem(((SlicedGourdBlock) b).getSliceItem().getItem())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float)maxbites) - left + 1.0F)))); - } - return applyExplosionDecay(b, loot); - } - ); - - // Salmonberry Bush drops Pips and optional Berry - this.add(DelightfulBlocks.SALMONBERRY_BUSH.get(), (b) -> { - LootTable.Builder loot = this.createSingleItemTable(DelightfulItems.SALMONBERRY_PIPS.get()); - for (int i = 3; i <= SalmonberryBushBlock.MAX_AGE; i++) { - loot = loot.withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SalmonberryBushBlock.AGE, i))) - .add(LootItem.lootTableItem(DelightfulItems.SALMONBERRIES.get())) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, (float) i - 1)))); - } - return applyExplosionDecay(b, loot); - } - ); - - // Crates - this.dropSelf(DelightfulBlocks.SALMONBERRY_SACK.get()); - this.dropSelf(DelightfulBlocks.ACORN_SACK.get()); - this.dropSelf(DelightfulBlocks.BLUEBERRY_SACK.get()); - this.dropSelf(DelightfulBlocks.MENDOSTEEN_CRATE.get()); - this.dropSelf(DelightfulBlocks.BASTION_FRUIT_CRATE.get()); - this.dropSelf(DelightfulBlocks.FROSTAYA_CRATE.get()); - this.dropSelf(DelightfulBlocks.BOMBEGRANATE_CRATE.get()); - this.dropSelf(DelightfulBlocks.GREEN_APPLE_CRATE.get()); - this.dropSelf(DelightfulBlocks.YUCCA_FRUIT_CRATE.get()); - this.dropSelf(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get()); - - // Ice Cream Blocks - this.dropSelf(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get()); - this.dropSelf(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get()); - - // Milkshake Cauldrons - this.dropOther(DelightfulBlocks.SALMONBERRY_MILKSHAKE_CAULDRON.get(), Blocks.CAULDRON); - this.dropOther(DelightfulBlocks.MATCHA_MILKSHAKE_CAULDRON.get(), Blocks.CAULDRON); - - this.add(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get(), (b) -> { - LootTable.Builder loot = LootTable.lootTable().withPool(LootPool.lootPool() - .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) - .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(FeastBlock.SERVINGS, 4))) - .add(LootItem.lootTableItem(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get()))); - return applyExplosionDecay(b, loot); - }); - } - - @Override - protected @NotNull Iterable getKnownBlocks() { - return DelightfulBlocks.BLOCKS.getEntries() - .stream() - .filter(o -> !NO_GEN.contains(o.getId())) - .flatMap(RegistryObject::stream) - ::iterator; - } - - public void empty(RegistryObject block) { - this.add(block.get(), LootTable.lootTable()); - } -} + private final static List NO_GEN = List.of( + DelightfulBlocks.WILD_SALMONBERRIES.getId() + ); + + protected DelightfulBlockLoot() { + super(Collections.emptySet(), FeatureFlags.REGISTRY.allFlags()); + } + + @Override + protected void generate() { + // Cabinets + DelightfulBlocks.BLOCKS.getEntries().stream() + .map(RegistryObject::get) + .filter(block -> block instanceof DelightfulCabinetBlock) + .forEach(this::dropSelf); + + // Pies + this.empty(DelightfulBlocks.SALMONBERRY_PIE); + this.empty(DelightfulBlocks.PUMPKIN_PIE); + this.empty(DelightfulBlocks.SOURCE_BERRY_PIE); + this.empty(DelightfulBlocks.GLOOMGOURD_PIE); + this.empty(DelightfulBlocks.GREEN_APPLE_PIE); + this.empty(DelightfulBlocks.BLUEBERRY_PIE); + + // Whole melons + this.dropSelf(DelightfulBlocks.MINI_MELON.get()); + this.dropSelf(DelightfulBlocks.CANTALOUPE.get()); + + // Plants + this.add(DelightfulBlocks.CANTALOUPE_PLANT.get(), (b) -> { + LootTable.Builder loot = this.createSingleItemTable(DelightfulItems.CANTALOUPE_SEEDS.get()) + .withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(CantaloupePlantBlock.AGE, CantaloupePlantBlock.MAX_AGE))) + .add(LootItem.lootTableItem(DelightfulItems.CANTALOUPE.get()))); + return applyExplosionDecay(b, loot); + } + ); + + // Sliced + this.add(DelightfulBlocks.SLICED_MINI_MELON.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable(); + int maxbites = ((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_MINI_MELON.get()).getMaxBites(); + for (int i = 1; i <= maxbites; i++) { + final float left = (float) i; + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMiniMelonBlock.BITES, i))) + .add(LootItem.lootTableItem(((SlicedMiniMelonBlock) b).getSliceItem().getItem())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float) maxbites) - left + 1.0F)))); + } + return applyExplosionDecay(b, loot); + } + ); + this.add(DelightfulBlocks.SLICED_CANTALOUPE.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable(); + int maxbites = ((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_CANTALOUPE.get()).getMaxBites(); + for (int i = 1; i <= maxbites; i++) { + final float left = (float) i; + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMiniMelonBlock.BITES, i))) + .add(LootItem.lootTableItem(((SlicedMiniMelonBlock) b).getSliceItem().getItem())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float) maxbites) - left + 1.0F)))); + } + return applyExplosionDecay(b, loot); + } + ); + this.add(DelightfulBlocks.SLICED_MELON.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable(); + int maxbites = ((SlicedMelonBlock) DelightfulBlocks.SLICED_MELON.get()).getMaxBites(); + for (int i = 1; i <= maxbites; i++) { + final float left = (float) i; + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedMelonBlock.BITES, i))) + .add(LootItem.lootTableItem(((SlicedMelonBlock) b).getSliceItem().getItem())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float) maxbites) - left + 1.0F)))); + } + return applyExplosionDecay(b, loot); + } + ); + this.add(DelightfulBlocks.SLICED_PUMPKIN.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable(); + int maxbites = ((SlicedGourdBlock) DelightfulBlocks.SLICED_PUMPKIN.get()).getMaxBites(); + for (int i = 1; i <= maxbites; i++) { + final float left = (float) i; + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedGourdBlock.BITES, i))) + .add(LootItem.lootTableItem(((SlicedGourdBlock) b).getSliceItem().getItem())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float) maxbites) - left + 1.0F)))); + } + return applyExplosionDecay(b, loot); + } + ); + this.add(DelightfulBlocks.SLICED_GLOOMGOURD.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable(); + int maxbites = ((SlicedGourdBlock) DelightfulBlocks.SLICED_GLOOMGOURD.get()).getMaxBites(); + for (int i = 1; i <= maxbites; i++) { + final float left = (float) i; + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SlicedGourdBlock.BITES, i))) + .add(LootItem.lootTableItem(((SlicedGourdBlock) b).getSliceItem().getItem())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, ((float) maxbites) - left + 1.0F)))); + } + return applyExplosionDecay(b, loot); + } + ); + + // Salmonberry Bush drops Pips and optional Berry + this.add(DelightfulBlocks.SALMONBERRY_BUSH.get(), (b) -> { + LootTable.Builder loot = this.createSingleItemTable(DelightfulItems.SALMONBERRY_PIPS.get()); + for (int i = 3; i <= SalmonberryBushBlock.MAX_AGE; i++) { + loot = loot.withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(SalmonberryBushBlock.AGE, i))) + .add(LootItem.lootTableItem(DelightfulItems.SALMONBERRIES.get())) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, (float) i - 1)))); + } + return applyExplosionDecay(b, loot); + } + ); + + // Crates + this.dropSelf(DelightfulBlocks.SALMONBERRY_SACK.get()); + this.dropSelf(DelightfulBlocks.ACORN_SACK.get()); + this.dropSelf(DelightfulBlocks.BLUEBERRY_SACK.get()); + this.dropSelf(DelightfulBlocks.MENDOSTEEN_CRATE.get()); + this.dropSelf(DelightfulBlocks.BASTION_FRUIT_CRATE.get()); + this.dropSelf(DelightfulBlocks.FROSTAYA_CRATE.get()); + this.dropSelf(DelightfulBlocks.BOMBEGRANATE_CRATE.get()); + this.dropSelf(DelightfulBlocks.GREEN_APPLE_CRATE.get()); + this.dropSelf(DelightfulBlocks.YUCCA_FRUIT_CRATE.get()); + this.dropSelf(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get()); + + // Ice Cream Blocks + this.dropSelf(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get()); + this.dropSelf(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get()); + + // Milkshake Cauldrons + this.dropOther(DelightfulBlocks.SALMONBERRY_MILKSHAKE_CAULDRON.get(), Blocks.CAULDRON); + this.dropOther(DelightfulBlocks.MATCHA_MILKSHAKE_CAULDRON.get(), Blocks.CAULDRON); + + this.add(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get(), (b) -> { + LootTable.Builder loot = LootTable.lootTable().withPool(LootPool.lootPool() + .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(b) + .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(FeastBlock.SERVINGS, 4))) + .add(LootItem.lootTableItem(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get()))); + return applyExplosionDecay(b, loot); + }); + } + + @Override + protected @NotNull Iterable getKnownBlocks() { + return DelightfulBlocks.BLOCKS.getEntries() + .stream() + .filter(o -> !NO_GEN.contains(o.getId())) + .flatMap(RegistryObject::stream) + ::iterator; + } + + public void empty(RegistryObject block) { + this.add(block.get(), LootTable.lootTable()); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockStateProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockStateProvider.java index a25acc37..b0664d9e 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockStateProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockStateProvider.java @@ -23,248 +23,248 @@ import java.util.Objects; public class DelightfulBlockStateProvider extends BlockStateProvider { - public DelightfulBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) { - super(output, Delightful.MODID, exFileHelper); - } + public DelightfulBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) { + super(output, Delightful.MODID, exFileHelper); + } - @Override - protected void registerStatesAndModels() { - this.wildCropBlock(DelightfulBlocks.WILD_SALMONBERRIES.get()); - this.stageBlock(DelightfulBlocks.SALMONBERRY_BUSH.get(), SalmonberryBushBlock.AGE); - this.existingStageBlock(DelightfulBlocks.CANTALOUPE_PLANT.get(), CantaloupePlantBlock.AGE); - this.sackBlock(DelightfulBlocks.SALMONBERRY_SACK.get(), "salmonberry"); - this.sackBlock(DelightfulBlocks.ACORN_SACK.get(), "acorn"); - this.miniBlock((MiniBlock) DelightfulBlocks.CANTALOUPE.get(), - resourceBlock("cantaloupe_side_small"), resourceBlock("cantaloupe_top")); - this.miniBlock((MiniBlock) DelightfulBlocks.MINI_MELON.get(), - Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); - this.slicedMiniMelonBlock((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_MINI_MELON.get(), - "melon", Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); - this.slicedMiniMelonBlock((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_CANTALOUPE.get(), - "cantaloupe", resourceBlock("cantaloupe_side_small"), resourceBlock("cantaloupe_top")); - this.bigSlicedBlock(DelightfulBlocks.SLICED_MELON.get(), - resourceBlock("melon_inside_rind"), Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); - this.bigSlicedBlock(DelightfulBlocks.SLICED_PUMPKIN.get(), - resourceBlock("pumpkin_inside_rind"), Util.rl("minecraft", "block/pumpkin_side"), Util.rl("minecraft", "block/pumpkin_top")); - this.bigSlicedBlock(DelightfulBlocks.SLICED_GLOOMGOURD.get(), - resourceBlock("gloomgourd_inside_rind"), Util.rl(Mods.UG, "block/gloomgourd_side"), Util.rl(Mods.UG, "block/gloomgourd_top")); - this.pieBlock(DelightfulBlocks.SALMONBERRY_PIE); - this.pieBlock(DelightfulBlocks.PUMPKIN_PIE); - this.pieBlock(DelightfulBlocks.SOURCE_BERRY_PIE); - this.pieBlock(DelightfulBlocks.GLOOMGOURD_PIE); - this.pieBlock(DelightfulBlocks.GREEN_APPLE_PIE); - this.pieBlock(DelightfulBlocks.BLUEBERRY_PIE); - this.cabinet(DelightfulBlocks.BASALT_CABINET.get()); - this.cabinet(DelightfulBlocks.QUARTZ_CABINET.get()); - this.simpleBlock(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get()); - this.simpleBlock(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get()); - this.sackBlock(DelightfulBlocks.BLUEBERRY_SACK.get(), "blueberry"); - this.crateBlock(DelightfulBlocks.MENDOSTEEN_CRATE.get(), "mendosteen", false); - this.crateBlock(DelightfulBlocks.BASTION_FRUIT_CRATE.get(), "bastion_fruit", false); - this.crateBlock(DelightfulBlocks.FROSTAYA_CRATE.get(), "frostaya", false); - this.crateBlock(DelightfulBlocks.BOMBEGRANATE_CRATE.get(), "bombegranate", false); - this.crateBlock(DelightfulBlocks.GREEN_APPLE_CRATE.get(), "green_apple", true); - this.crateBlock(DelightfulBlocks.YUCCA_FRUIT_CRATE.get(), "yucca_fruit", false); - this.crateBlock(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get(), "baobab_fruit", false); - this.feastBlock(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get()); - } + @Override + protected void registerStatesAndModels() { + this.wildCropBlock(DelightfulBlocks.WILD_SALMONBERRIES.get()); + this.stageBlock(DelightfulBlocks.SALMONBERRY_BUSH.get(), SalmonberryBushBlock.AGE); + this.existingStageBlock(DelightfulBlocks.CANTALOUPE_PLANT.get(), CantaloupePlantBlock.AGE); + this.sackBlock(DelightfulBlocks.SALMONBERRY_SACK.get(), "salmonberry"); + this.sackBlock(DelightfulBlocks.ACORN_SACK.get(), "acorn"); + this.miniBlock((MiniBlock) DelightfulBlocks.CANTALOUPE.get(), + resourceBlock("cantaloupe_side_small"), resourceBlock("cantaloupe_top")); + this.miniBlock((MiniBlock) DelightfulBlocks.MINI_MELON.get(), + Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); + this.slicedMiniMelonBlock((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_MINI_MELON.get(), + "melon", Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); + this.slicedMiniMelonBlock((SlicedMiniMelonBlock) DelightfulBlocks.SLICED_CANTALOUPE.get(), + "cantaloupe", resourceBlock("cantaloupe_side_small"), resourceBlock("cantaloupe_top")); + this.bigSlicedBlock(DelightfulBlocks.SLICED_MELON.get(), + resourceBlock("melon_inside_rind"), Util.rl("minecraft", "block/melon_side"), Util.rl("minecraft", "block/melon_top")); + this.bigSlicedBlock(DelightfulBlocks.SLICED_PUMPKIN.get(), + resourceBlock("pumpkin_inside_rind"), Util.rl("minecraft", "block/pumpkin_side"), Util.rl("minecraft", "block/pumpkin_top")); + this.bigSlicedBlock(DelightfulBlocks.SLICED_GLOOMGOURD.get(), + resourceBlock("gloomgourd_inside_rind"), Util.rl(Mods.UG, "block/gloomgourd_side"), Util.rl(Mods.UG, "block/gloomgourd_top")); + this.pieBlock(DelightfulBlocks.SALMONBERRY_PIE); + this.pieBlock(DelightfulBlocks.PUMPKIN_PIE); + this.pieBlock(DelightfulBlocks.SOURCE_BERRY_PIE); + this.pieBlock(DelightfulBlocks.GLOOMGOURD_PIE); + this.pieBlock(DelightfulBlocks.GREEN_APPLE_PIE); + this.pieBlock(DelightfulBlocks.BLUEBERRY_PIE); + this.cabinet(DelightfulBlocks.BASALT_CABINET.get()); + this.cabinet(DelightfulBlocks.QUARTZ_CABINET.get()); + this.simpleBlock(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK.get()); + this.simpleBlock(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK.get()); + this.sackBlock(DelightfulBlocks.BLUEBERRY_SACK.get(), "blueberry"); + this.crateBlock(DelightfulBlocks.MENDOSTEEN_CRATE.get(), "mendosteen", false); + this.crateBlock(DelightfulBlocks.BASTION_FRUIT_CRATE.get(), "bastion_fruit", false); + this.crateBlock(DelightfulBlocks.FROSTAYA_CRATE.get(), "frostaya", false); + this.crateBlock(DelightfulBlocks.BOMBEGRANATE_CRATE.get(), "bombegranate", false); + this.crateBlock(DelightfulBlocks.GREEN_APPLE_CRATE.get(), "green_apple", true); + this.crateBlock(DelightfulBlocks.YUCCA_FRUIT_CRATE.get(), "yucca_fruit", false); + this.crateBlock(DelightfulBlocks.BAOBAB_FRUIT_CRATE.get(), "baobab_fruit", false); + this.feastBlock(DelightfulBlocks.STUFFED_CANTALOUPE_BLOCK.get()); + } - // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java - public void stageBlock(Block block, IntegerProperty ageProperty) { - getVariantBuilder(block).forAllStates(state -> { - String stageName = Util.name(block) + "_stage" + state.getValue(ageProperty); - return ConfiguredModel.builder() - .modelFile(models().cross(stageName, resourceBlock(stageName)).renderType("cutout")).build(); - }); - } + // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java + public void stageBlock(Block block, IntegerProperty ageProperty) { + getVariantBuilder(block).forAllStates(state -> { + String stageName = Util.name(block) + "_stage" + state.getValue(ageProperty); + return ConfiguredModel.builder() + .modelFile(models().cross(stageName, resourceBlock(stageName)).renderType("cutout")).build(); + }); + } - // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java - public void feastBlock(FeastBlock block) { - getVariantBuilder(block) - .forAllStates(state -> { - IntegerProperty servingsProperty = block.getServingsProperty(); - int servings = state.getValue(servingsProperty); - String suffix = "_stage" + (block.getMaxServings() - servings); - if (servings == 0) { - suffix = block.hasLeftovers ? "_leftover" : "_stage" + (servingsProperty.getPossibleValues().toArray().length - 2); - } - return ConfiguredModel.builder() - .modelFile(existingModel(Util.name(block) + suffix)) - .rotationY(((int) state.getValue(FeastBlock.FACING).toYRot() + 180) % 360) - .build(); - }); - } + // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java + public void feastBlock(FeastBlock block) { + getVariantBuilder(block) + .forAllStates(state -> { + IntegerProperty servingsProperty = block.getServingsProperty(); + int servings = state.getValue(servingsProperty); + String suffix = "_stage" + (block.getMaxServings() - servings); + if (servings == 0) { + suffix = block.hasLeftovers ? "_leftover" : "_stage" + (servingsProperty.getPossibleValues().toArray().length - 2); + } + return ConfiguredModel.builder() + .modelFile(existingModel(Util.name(block) + suffix)) + .rotationY(((int) state.getValue(FeastBlock.FACING).toYRot() + 180) % 360) + .build(); + }); + } - public void existingStageBlock(Block block, IntegerProperty ageProperty) { - getVariantBuilder(block).forAllStates(state -> { - String stageName = Util.name(block) + "_stage" + state.getValue(ageProperty); - return ConfiguredModel.builder().modelFile(existingModel(stageName)).build(); - }); - } + public void existingStageBlock(Block block, IntegerProperty ageProperty) { + getVariantBuilder(block).forAllStates(state -> { + String stageName = Util.name(block) + "_stage" + state.getValue(ageProperty); + return ConfiguredModel.builder().modelFile(existingModel(stageName)).build(); + }); + } - public void sackBlock(Block block, String cropName) { - this.simpleBlock(block, - models().cubeBottomTop(Util.name(block), - resourceBlock(cropName + "_sack"), - resourceBlock(cropName + "_sack_bottom"), - resourceBlock(cropName + "_sack_top")) - ); - } + public void sackBlock(Block block, String cropName) { + this.simpleBlock(block, + models().cubeBottomTop(Util.name(block), + resourceBlock(cropName + "_sack"), + resourceBlock(cropName + "_sack_bottom"), + resourceBlock(cropName + "_sack_top")) + ); + } - public void crateBlock(Block block, String cropName, boolean customBottom) { - this.simpleBlock(block, - models().cubeBottomTop(Util.name(block), - resourceBlock(cropName + "_crate_side"), - customBottom ? - resourceBlock(cropName + "_crate_bottom") : - Util.rl(FarmersDelight.MODID, "block/crate_bottom"), - resourceBlock(cropName + "_crate_top"))); - } + public void crateBlock(Block block, String cropName, boolean customBottom) { + this.simpleBlock(block, + models().cubeBottomTop(Util.name(block), + resourceBlock(cropName + "_crate_side"), + customBottom ? + resourceBlock(cropName + "_crate_bottom") : + Util.rl(FarmersDelight.MODID, "block/crate_bottom"), + resourceBlock(cropName + "_crate_top"))); + } - public void wildCropBlock(Block block) { - this.simpleBlock(block, models().cross(Util.name(block), resourceBlock(Util.name(block))).renderType("cutout")); - } + public void wildCropBlock(Block block) { + this.simpleBlock(block, models().cross(Util.name(block), resourceBlock(Util.name(block))).renderType("cutout")); + } - public void cabinet(Block block) { - String path = Util.name(block); - String type = path.replace("_cabinet", "").trim(); - this.horizontalBlock(block, state -> { - String suffix = state.getValue(CabinetBlock.OPEN) ? "_open" : ""; - return models().orientableWithBottom(path + suffix, - resourceBlock(type + "_cabinet_side"), - resourceBlock(type + "_cabinet_front" + suffix), - resourceBlock(type + "_cabinet_bottom"), - resourceBlock(type + "_cabinet_top")); - }); - } + public void cabinet(Block block) { + String path = Util.name(block); + String type = path.replace("_cabinet", "").trim(); + this.horizontalBlock(block, state -> { + String suffix = state.getValue(CabinetBlock.OPEN) ? "_open" : ""; + return models().orientableWithBottom(path + suffix, + resourceBlock(type + "_cabinet_side"), + resourceBlock(type + "_cabinet_front" + suffix), + resourceBlock(type + "_cabinet_bottom"), + resourceBlock(type + "_cabinet_top")); + }); + } - public void miniBlock(MiniBlock block, ResourceLocation side, ResourceLocation top) { - this.simpleBlock(block, models().getBuilder(Util.name(block)) - .ao(false) - .texture("side", side) - .texture("top", top) - .texture("particle", side) - .element().from(3f, 0f, 3f).to(13f, 10f, 13f) - .face(Direction.NORTH).texture("#side").end() - .face(Direction.EAST).texture("#side").end() - .face(Direction.SOUTH).texture("#side").end() - .face(Direction.WEST).texture("#side").end() - .face(Direction.UP).texture("#top").end() - .face(Direction.DOWN).texture("#top").end().end() - .transforms() - .transform(ItemDisplayContext.THIRD_PERSON_RIGHT_HAND) - .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) - .scale(0.375f, 0.375f, 0.375f).end() - .transform(ItemDisplayContext.THIRD_PERSON_LEFT_HAND) - .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) - .scale(0.375f, 0.375f, 0.375f).end() - .transform(ItemDisplayContext.FIRST_PERSON_RIGHT_HAND) - .rotation(0f, 45f, 0f).scale(0.4f, 0.4f, 0.4f).end() - .transform(ItemDisplayContext.FIRST_PERSON_LEFT_HAND) - .rotation(0f, 225f, 0f).scale(0.4f, 0.4f, 0.4f).end() - .transform(ItemDisplayContext.GROUND) - .translation(0f, 3f, 0f).scale(0.25f, 0.25f, 0.25f).end() - .transform(ItemDisplayContext.GUI) - .rotation(30f, 225f, 0f).scale(0.625f, 0.625f, 0.625f).end() - .transform(ItemDisplayContext.HEAD) - .translation(0f, 14.25f, 0f).end() - .transform(ItemDisplayContext.FIXED) - .scale(0.5f, 0.5f, 0.5f).end().end() - ); - } + public void miniBlock(MiniBlock block, ResourceLocation side, ResourceLocation top) { + this.simpleBlock(block, models().getBuilder(Util.name(block)) + .ao(false) + .texture("side", side) + .texture("top", top) + .texture("particle", side) + .element().from(3f, 0f, 3f).to(13f, 10f, 13f) + .face(Direction.NORTH).texture("#side").end() + .face(Direction.EAST).texture("#side").end() + .face(Direction.SOUTH).texture("#side").end() + .face(Direction.WEST).texture("#side").end() + .face(Direction.UP).texture("#top").end() + .face(Direction.DOWN).texture("#top").end().end() + .transforms() + .transform(ItemDisplayContext.THIRD_PERSON_RIGHT_HAND) + .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) + .scale(0.375f, 0.375f, 0.375f).end() + .transform(ItemDisplayContext.THIRD_PERSON_LEFT_HAND) + .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) + .scale(0.375f, 0.375f, 0.375f).end() + .transform(ItemDisplayContext.FIRST_PERSON_RIGHT_HAND) + .rotation(0f, 45f, 0f).scale(0.4f, 0.4f, 0.4f).end() + .transform(ItemDisplayContext.FIRST_PERSON_LEFT_HAND) + .rotation(0f, 225f, 0f).scale(0.4f, 0.4f, 0.4f).end() + .transform(ItemDisplayContext.GROUND) + .translation(0f, 3f, 0f).scale(0.25f, 0.25f, 0.25f).end() + .transform(ItemDisplayContext.GUI) + .rotation(30f, 225f, 0f).scale(0.625f, 0.625f, 0.625f).end() + .transform(ItemDisplayContext.HEAD) + .translation(0f, 14.25f, 0f).end() + .transform(ItemDisplayContext.FIXED) + .scale(0.5f, 0.5f, 0.5f).end().end() + ); + } - public void bigSlicedBlock(Block block, ResourceLocation inside, ResourceLocation side, ResourceLocation top) { - if (block instanceof ISliceable slice) { - String name = Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath(); - getVariantBuilder(block).forAllStates(state -> { - int bites = state.getValue(slice.getBitesProperty()); - return ConfiguredModel.builder().modelFile(models().getBuilder(name + "_bite" + bites) - .ao(false) - .texture("inside", inside) - .texture("side", side) - .texture("top", top) - .texture("particle", side) - .element().from(0f, 0f, 0f).to(16f, slice.getHeight(bites), 16f) - .face(Direction.NORTH).texture("#side").end() - .face(Direction.EAST).texture("#side").end() - .face(Direction.SOUTH).texture("#side").end() - .face(Direction.WEST).texture("#side").end() - .face(Direction.UP).texture("#inside").end() - .face(Direction.DOWN).texture("#top").end().end() - ).build(); - } - ); - } - } + public void bigSlicedBlock(Block block, ResourceLocation inside, ResourceLocation side, ResourceLocation top) { + if (block instanceof ISliceable slice) { + String name = Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath(); + getVariantBuilder(block).forAllStates(state -> { + int bites = state.getValue(slice.getBitesProperty()); + return ConfiguredModel.builder().modelFile(models().getBuilder(name + "_bite" + bites) + .ao(false) + .texture("inside", inside) + .texture("side", side) + .texture("top", top) + .texture("particle", side) + .element().from(0f, 0f, 0f).to(16f, slice.getHeight(bites), 16f) + .face(Direction.NORTH).texture("#side").end() + .face(Direction.EAST).texture("#side").end() + .face(Direction.SOUTH).texture("#side").end() + .face(Direction.WEST).texture("#side").end() + .face(Direction.UP).texture("#inside").end() + .face(Direction.DOWN).texture("#top").end().end() + ).build(); + } + ); + } + } - public void slicedMiniMelonBlock(SlicedMiniMelonBlock block, String alias, ResourceLocation side, ResourceLocation top) { - String name = Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath(); - getVariantBuilder(block).forAllStates(state -> { - int bites = state.getValue(block.getBitesProperty()); - return ConfiguredModel.builder().modelFile(models().getBuilder(name + "_bite" + bites) - .ao(false) - .texture("inside", resourceBlock(alias + "_inside_small")) - .texture("side", side) - .texture("top", top) - .texture("particle", side) - .element().from(3f, 0f, 3f).to(13f, block.getHeight(bites), 13f) - .face(Direction.NORTH).texture("#side").end() - .face(Direction.EAST).texture("#side").end() - .face(Direction.SOUTH).texture("#side").end() - .face(Direction.WEST).texture("#side").end() - .face(Direction.UP).uvs(3f, 6f, 13f, 16f).texture("#inside").end() - .face(Direction.DOWN).texture("#top").end().end() - .transforms() - .transform(ItemDisplayContext.THIRD_PERSON_RIGHT_HAND) - .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) - .scale(0.375f, 0.375f, 0.375f).end() - .transform(ItemDisplayContext.THIRD_PERSON_LEFT_HAND) - .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) - .scale(0.375f, 0.375f, 0.375f).end() - .transform(ItemDisplayContext.FIRST_PERSON_RIGHT_HAND) - .rotation(0f, 45f, 0f).scale(0.4f, 0.4f, 0.4f).end() - .transform(ItemDisplayContext.FIRST_PERSON_LEFT_HAND) - .rotation(0f, 225f, 0f).scale(0.4f, 0.4f, 0.4f).end() - .transform(ItemDisplayContext.GROUND) - .translation(0f, 3f, 0f).scale(0.25f, 0.25f, 0.25f).end() - .transform(ItemDisplayContext.GUI) - .rotation(30f, 225f, 0f).scale(0.625f, 0.625f, 0.625f).end() - .transform(ItemDisplayContext.HEAD) - .translation(0f, 14.25f, 0f).end() - .transform(ItemDisplayContext.FIXED) - .scale(0.5f, 0.5f, 0.5f).end().end() - ).build(); - } - ); - } + public void slicedMiniMelonBlock(SlicedMiniMelonBlock block, String alias, ResourceLocation side, ResourceLocation top) { + String name = Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath(); + getVariantBuilder(block).forAllStates(state -> { + int bites = state.getValue(block.getBitesProperty()); + return ConfiguredModel.builder().modelFile(models().getBuilder(name + "_bite" + bites) + .ao(false) + .texture("inside", resourceBlock(alias + "_inside_small")) + .texture("side", side) + .texture("top", top) + .texture("particle", side) + .element().from(3f, 0f, 3f).to(13f, block.getHeight(bites), 13f) + .face(Direction.NORTH).texture("#side").end() + .face(Direction.EAST).texture("#side").end() + .face(Direction.SOUTH).texture("#side").end() + .face(Direction.WEST).texture("#side").end() + .face(Direction.UP).uvs(3f, 6f, 13f, 16f).texture("#inside").end() + .face(Direction.DOWN).texture("#top").end().end() + .transforms() + .transform(ItemDisplayContext.THIRD_PERSON_RIGHT_HAND) + .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) + .scale(0.375f, 0.375f, 0.375f).end() + .transform(ItemDisplayContext.THIRD_PERSON_LEFT_HAND) + .rotation(75f, 45f, 0f).translation(0f, 2.5f, 0f) + .scale(0.375f, 0.375f, 0.375f).end() + .transform(ItemDisplayContext.FIRST_PERSON_RIGHT_HAND) + .rotation(0f, 45f, 0f).scale(0.4f, 0.4f, 0.4f).end() + .transform(ItemDisplayContext.FIRST_PERSON_LEFT_HAND) + .rotation(0f, 225f, 0f).scale(0.4f, 0.4f, 0.4f).end() + .transform(ItemDisplayContext.GROUND) + .translation(0f, 3f, 0f).scale(0.25f, 0.25f, 0.25f).end() + .transform(ItemDisplayContext.GUI) + .rotation(30f, 225f, 0f).scale(0.625f, 0.625f, 0.625f).end() + .transform(ItemDisplayContext.HEAD) + .translation(0f, 14.25f, 0f).end() + .transform(ItemDisplayContext.FIXED) + .scale(0.5f, 0.5f, 0.5f).end().end() + ).build(); + } + ); + } - // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java - public void pieBlock(RegistryObject block) { - getVariantBuilder(block.get()).forAllStates(state -> { - int bites = state.getValue(PieBlock.BITES); - String name = Util.name(block); - String suffix = bites > 0 ? "_slice" + bites : ""; - var mod = models() - .withExistingParent("block/" + name + suffix, Util.rl(FarmersDelight.MODID, "pie" + suffix)) - .texture("top", resourceBlock(name + "_top")) - .texture("bottom", resourceBlock(name + "_bottom")) - .texture("side", resourceBlock(name + "_side")) - .texture("particle", resourceBlock(name + "_top")); - if (bites > 0) { - mod.texture("inner", resourceBlock(name + "_inner")); - } - return ConfiguredModel.builder().modelFile(mod) - .rotationY(((int) state.getValue(PieBlock.FACING).toYRot() + 180) % 360).build(); - } - ); - } + // Adapted from: https://github.com/vectorwing/FarmersDelight/blob/1.19/src/main/java/vectorwing/farmersdelight/data/BlockStates.java + public void pieBlock(RegistryObject block) { + getVariantBuilder(block.get()).forAllStates(state -> { + int bites = state.getValue(PieBlock.BITES); + String name = Util.name(block); + String suffix = bites > 0 ? "_slice" + bites : ""; + var mod = models() + .withExistingParent("block/" + name + suffix, Util.rl(FarmersDelight.MODID, "pie" + suffix)) + .texture("top", resourceBlock(name + "_top")) + .texture("bottom", resourceBlock(name + "_bottom")) + .texture("side", resourceBlock(name + "_side")) + .texture("particle", resourceBlock(name + "_top")); + if (bites > 0) { + mod.texture("inner", resourceBlock(name + "_inner")); + } + return ConfiguredModel.builder().modelFile(mod) + .rotationY(((int) state.getValue(PieBlock.FACING).toYRot() + 180) % 360).build(); + } + ); + } - public ModelFile existingModel(String path) { - return new ModelFile.ExistingModelFile(resourceBlock(path), models().existingFileHelper); - } + public ModelFile existingModel(String path) { + return new ModelFile.ExistingModelFile(resourceBlock(path), models().existingFileHelper); + } - public ResourceLocation resourceBlock(String path) { - return Util.rl(Delightful.MODID, "block/" + path); - } -} + public ResourceLocation resourceBlock(String path) { + return Util.rl(Delightful.MODID, "block/" + path); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockTagProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockTagProvider.java index 4cfe3c5a..bad73e2c 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockTagProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulBlockTagProvider.java @@ -27,90 +27,90 @@ protected DelightfulBlockTagProvider(PackOutput output, CompletableFuture provider, ExistingFileHelper existingFileHelper) { @@ -20,115 +20,115 @@ public DelightfulEntityTagProvider(PackOutput output, CompletableFuture FLAT_BLOCKS = List.of( + DelightfulItems.WILD_SALMONBERRIES.getId(), + DelightfulItems.STUFFED_CANTALOUPE_BLOCK.getId() + ); + private static final List ITEM_BLOCKS = List.of( + DelightfulItems.SALMONBERRY_PIE.getId() + ); + private static final List EMISSIVE = List.of( + Knives.FIERY.getId() + ); + public DelightfulItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) { + super(output, Delightful.MODID, existingFileHelper); + } - private static final List FLAT_BLOCKS = List.of( - DelightfulItems.WILD_SALMONBERRIES.getId(), - DelightfulItems.STUFFED_CANTALOUPE_BLOCK.getId() - ); - private static final List ITEM_BLOCKS = List.of( - DelightfulItems.SALMONBERRY_PIE.getId() - ); - private static final List EMISSIVE = List.of( - Knives.FIERY.getId() - ); + @Override + protected void registerModels() { + for (RegistryObject entry : DelightfulItems.ITEMS.getEntries()) { + ResourceLocation id = entry.getId(); + if (EMISSIVE.contains(id)) { + emissive(id); + } else if (entry.get() instanceof DelightfulKnifeItem) { + handheld(id); + } else if (FLAT_BLOCKS.contains(id)) { + flatBlock(id); + } else if (entry.get() instanceof BlockItem && + !(entry.get() instanceof ItemNameBlockItem) && + !ITEM_BLOCKS.contains(id)) { + withExistingParent(id.getPath(), Util.rl(this.modid, "block/" + id.getPath())); + } else { + basicItem(id); + } + } + } - @Override - protected void registerModels() { - for (RegistryObject entry : DelightfulItems.ITEMS.getEntries()) { - ResourceLocation id = entry.getId(); - if (EMISSIVE.contains(id)) { - emissive(id); - } else if (entry.get() instanceof DelightfulKnifeItem) { - handheld(id); - } else if (FLAT_BLOCKS.contains(id)) { - flatBlock(id); - } else if (entry.get() instanceof BlockItem && - !(entry.get() instanceof ItemNameBlockItem) && - !ITEM_BLOCKS.contains(id)) { - withExistingParent(id.getPath(), Util.rl(this.modid, "block/" + id.getPath())); - } else { - basicItem(id); - } - } - } + public void flatBlock(ResourceLocation id) { + getBuilder(id.toString()).parent(new ModelFile.UncheckedModelFile("item/generated")) + .texture("layer0", new ResourceLocation(id.getNamespace(), "block/" + id.getPath())); + } - public void flatBlock(ResourceLocation id) { - getBuilder(id.toString()).parent(new ModelFile.UncheckedModelFile("item/generated")) - .texture("layer0", new ResourceLocation(id.getNamespace(), "block/" + id.getPath())); - } + public void handheld(ResourceLocation item) { + withExistingParent(item.getPath(), "item/handheld").texture("layer0", Util.rl(Delightful.MODID, "item/" + item.getPath())); + } - public void handheld(ResourceLocation item) { - withExistingParent(item.getPath(), "item/handheld").texture("layer0", Util.rl(Delightful.MODID, "item/" + item.getPath())); - } - - public void emissive(ResourceLocation item) { - withExistingParent(item.getPath(), "item/handheld") - .texture("layer0", Util.rl(Delightful.MODID, "item/" + item.getPath())) - .guiLight(BlockModel.GuiLight.FRONT); - } + public void emissive(ResourceLocation item) { + withExistingParent(item.getPath(), "item/handheld") + .texture("layer0", Util.rl(Delightful.MODID, "item/" + item.getPath())) + .guiLight(BlockModel.GuiLight.FRONT); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulItemTagProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulItemTagProvider.java index e204101d..106214b7 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulItemTagProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulItemTagProvider.java @@ -43,15 +43,15 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Delightful this.tag(DelightfulItemTags.COMPAT_PIES) - .add(Items.PUMPKIN_PIE) - .addOptional(Util.rl(Mods.AN, ArsNouveauCompat.pie)) - .addOptional(Util.rl(Mods.UG, UndergardenCompat.pie)) - .addOptional(Util.rl(Mods.BWG, BWGCompat.blueberry_pie)) - .addOptional(Util.rl(Mods.BWG, BWGCompat.green_apple_pie)); + .add(Items.PUMPKIN_PIE) + .addOptional(Util.rl(Mods.AN, ArsNouveauCompat.pie)) + .addOptional(Util.rl(Mods.UG, UndergardenCompat.pie)) + .addOptional(Util.rl(Mods.BWG, BWGCompat.blueberry_pie)) + .addOptional(Util.rl(Mods.BWG, BWGCompat.green_apple_pie)); this.tag(DelightfulItemTags.FIRE_KNIVES) - .add(Knives.FIERY.get()) - .add(Knives.KIWANO.get()) - .add(Knives.BLAZING.get()); + .add(Knives.FIERY.get()) + .add(Knives.KIWANO.get()) + .add(Knives.BLAZING.get()); this.tag(DelightfulItemTags.STRAW_PLANTS) .add(Items.GRASS) .add(Items.TALL_GRASS) @@ -61,118 +61,118 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Farmer's Delight this.tag(ModTags.WOODEN_CABINETS) - .add(ModItems.MANGROVE_CABINET.get()) - .addOptional(Util.rl("windswept", "holly_cabinet")) - .addOptional(Util.rl("windswept", "chestnut_cabinet")) - .addOptional(Util.rl("fruittrees", "citrus_cabinet")) - .addOptional(Util.rl("fruittrees", "cherry_cabinet")); + .add(ModItems.MANGROVE_CABINET.get()) + .addOptional(Util.rl("windswept", "holly_cabinet")) + .addOptional(Util.rl("windswept", "chestnut_cabinet")) + .addOptional(Util.rl("fruittrees", "citrus_cabinet")) + .addOptional(Util.rl("fruittrees", "cherry_cabinet")); this.tag(ModTags.CABINETS) - .addTag(DelightfulItemTags.CABINETS_STONE); + .addTag(DelightfulItemTags.CABINETS_STONE); this.tag(DelightfulItemTags.CABINETS_STONE) - .add(DelightfulItems.BASALT_CABINET.get()) - .add(DelightfulItems.QUARTZ_CABINET.get()); + .add(DelightfulItems.BASALT_CABINET.get()) + .add(DelightfulItems.QUARTZ_CABINET.get()); this.tag(ModTags.WILD_CROPS_ITEM) - .add(DelightfulItems.WILD_SALMONBERRIES.get()); + .add(DelightfulItems.WILD_SALMONBERRIES.get()); this.tag(ForgeTags.VEGETABLES_POTATO) - .addOptional(Util.rl(Mods.MOD, "diced_potatoes")); + .addOptional(Util.rl(Mods.MOD, "diced_potatoes")); this.tag(ForgeTags.VEGETABLES_TOMATO) - .addOptional(Util.rl(Mods.SAS, "tomato_slices")); + .addOptional(Util.rl(Mods.SAS, "tomato_slices")); this.tag(ForgeTags.CROPS_ONION) - .addOptional(Util.rl(Mods.BWG, "oddion_bulb")); + .addOptional(Util.rl(Mods.BWG, "oddion_bulb")); this.tag(ForgeTags.VEGETABLES_ONION) - .addTag(ForgeTags.CROPS_ONION) - .addOptional(Util.rl(Mods.SAS, "sliced_onion")); + .addTag(ForgeTags.CROPS_ONION) + .addOptional(Util.rl(Mods.SAS, "sliced_onion")); this.tag(DelightfulItemTags.CROPS_CARROT) - .add(Items.CARROT); + .add(Items.CARROT); this.tag(ForgeTags.VEGETABLES_CARROT) - .addOptional(Util.rl(Mods.SAS, "chopped_carrot")); + .addOptional(Util.rl(Mods.SAS, "chopped_carrot")); this.tag(DelightfulItemTags.CROPS_BEETROOT) - .add(Items.BEETROOT); + .add(Items.BEETROOT); this.tag(ForgeTags.VEGETABLES_BEETROOT) - .addOptional(Util.rl(Mods.SAS, "chopped_beetroot")); + .addOptional(Util.rl(Mods.SAS, "chopped_beetroot")); // Collector's Reap this.tag(DelightfulItemTags.GUMMIES) - .add(DelightfulItems.SALMONBERRY_GUMMY.get()) - .add(DelightfulItems.MATCHA_GUMMY.get()) - .add(DelightfulItems.CANTALOUPE_GUMMY.get()); + .add(DelightfulItems.SALMONBERRY_GUMMY.get()) + .add(DelightfulItems.MATCHA_GUMMY.get()) + .add(DelightfulItems.CANTALOUPE_GUMMY.get()); // Forge this.tag(DelightfulItemTags.LAVENDER) - .addOptionalTag(Util.rl(Util.LOADER, "flowers/lavender")) - .addOptional(Util.rl(Mods.BOP, "lavender")) - .addOptional(Util.rl(Mods.BOP, "tall_lavender")); + .addOptionalTag(Util.rl(Util.LOADER, "flowers/lavender")) + .addOptional(Util.rl(Mods.BOP, "lavender")) + .addOptional(Util.rl(Mods.BOP, "tall_lavender")); this.tag(DelightfulItemTags.CLOVER) - .addOptional(Util.rl(Mods.BOP, "clover")) - .addOptional(Util.rl(Mods.BWG, "clover_patch")) - .addOptional(Util.rl(Mods.TF, "clover_patch")) - .addOptional(Util.rl(Mods.BB, "four_leaf_clover")); + .addOptional(Util.rl(Mods.BOP, "clover")) + .addOptional(Util.rl(Mods.BWG, "clover_patch")) + .addOptional(Util.rl(Mods.TF, "clover_patch")) + .addOptional(Util.rl(Mods.BB, "four_leaf_clover")); this.tag(DelightfulItemTags.CACTI) - .add(Items.CACTUS) - .addOptional(Util.rl(Mods.BWG, "barrel_cactus")) - .addOptional(Util.rl(Mods.BWG, "prickly_pear_cactus")) - .addOptional(Util.rl(Mods.BWG, "golden_spined_cactus")); + .add(Items.CACTUS) + .addOptional(Util.rl(Mods.BWG, "barrel_cactus")) + .addOptional(Util.rl(Mods.BWG, "prickly_pear_cactus")) + .addOptional(Util.rl(Mods.BWG, "golden_spined_cactus")); this.tag(DelightfulItemTags.SMALL_CACTI) - .addOptionalTag(Util.rl("habitat", "ball_cacti")) - .addOptional(Util.rl(Mods.BWG, "mini_cactus")); + .addOptionalTag(Util.rl("habitat", "ball_cacti")) + .addOptional(Util.rl(Mods.BWG, "mini_cactus")); this.tag(DelightfulItemTags.MATCHA) - .add(DelightfulItems.MATCHA.get()); + .add(DelightfulItems.MATCHA.get()); this.tag(DelightfulItemTags.EGGS_DUCK) - .addOptional(Util.rl(Mods.NA, "duck_egg")); + .addOptional(Util.rl(Mods.NA, "duck_egg")); this.tag(DelightfulItemTags.EGGS_PARROT) - .addOptional(Util.rl(Mods.Q, "egg_parrot_red_blue")) - .addOptional(Util.rl(Mods.Q, "egg_parrot_blue")) - .addOptional(Util.rl(Mods.Q, "egg_parrot_green")) - .addOptional(Util.rl(Mods.Q, "egg_parrot_yellow_blue")) - .addOptional(Util.rl(Mods.Q, "egg_parrot_grey")); + .addOptional(Util.rl(Mods.Q, "egg_parrot_red_blue")) + .addOptional(Util.rl(Mods.Q, "egg_parrot_blue")) + .addOptional(Util.rl(Mods.Q, "egg_parrot_green")) + .addOptional(Util.rl(Mods.Q, "egg_parrot_yellow_blue")) + .addOptional(Util.rl(Mods.Q, "egg_parrot_grey")); this.tag(DelightfulItemTags.EGGS_BIRD) - .add(Items.EGG) - .addTag(DelightfulItemTags.EGGS_DUCK) - .addTag(DelightfulItemTags.EGGS_PARROT) - .addOptional(Util.rl("autumnity", "turkey_egg")) - .addOptional(Util.rl("deep_aether", "quail_egg")) - .addOptional(Util.rl("farmlife", "galliraptor_egg")) - .addOptional(Util.rl("etcetera", "eggple")); + .add(Items.EGG) + .addTag(DelightfulItemTags.EGGS_DUCK) + .addTag(DelightfulItemTags.EGGS_PARROT) + .addOptional(Util.rl("autumnity", "turkey_egg")) + .addOptional(Util.rl("deep_aether", "quail_egg")) + .addOptional(Util.rl("farmlife", "galliraptor_egg")) + .addOptional(Util.rl("etcetera", "eggple")); this.tag(ForgeTags.EGGS) - .addTag(DelightfulItemTags.EGGS_BIRD) - .addOptional(Util.rl(Mods.NA, "alligator_egg")) - .addOptional(Util.rl(Mods.NA, "tortoise_egg")) - .addOptional(Util.rl("sullysmod", "tortoise_egg")); + .addTag(DelightfulItemTags.EGGS_BIRD) + .addOptional(Util.rl(Mods.NA, "alligator_egg")) + .addOptional(Util.rl(Mods.NA, "tortoise_egg")) + .addOptional(Util.rl("sullysmod", "tortoise_egg")); this.tag(ForgeTags.COOKED_EGGS) - .addOptional(Util.rl(Mods.AA, "fried_egg")) - .addOptional(Util.rl(Mods.IN, "fried_egg")) - .addOptional(Util.rl(Mods.NA, "cooked_egg")); + .addOptional(Util.rl(Mods.AA, "fried_egg")) + .addOptional(Util.rl(Mods.IN, "fried_egg")) + .addOptional(Util.rl(Mods.NA, "cooked_egg")); this.tag(DelightfulItemTags.DOUGH_CORN) - .addOptional(Util.rl(Mods.CD, "corn_dough")); + .addOptional(Util.rl(Mods.CD, "corn_dough")); this.tag(DelightfulItemTags.DOUGH_NUT) - .add(DelightfulItems.NUT_DOUGH.get()); + .add(DelightfulItems.NUT_DOUGH.get()); this.tag(ForgeTags.DOUGH) - .addTag(DelightfulItemTags.DOUGH_NUT) - .addTag(DelightfulItemTags.DOUGH_CORN); + .addTag(DelightfulItemTags.DOUGH_NUT) + .addTag(DelightfulItemTags.DOUGH_CORN); this.tag(DelightfulItemTags.BREAD_CORN) - .addOptional(Util.rl("corn_delight", "cornbread")) - .addOptional(Util.rl("hauntedharvest", "cornbread")); + .addOptional(Util.rl("corn_delight", "cornbread")) + .addOptional(Util.rl("hauntedharvest", "cornbread")); this.tag(ForgeTags.BREAD) - .addTag(DelightfulItemTags.BREAD_CORN); + .addTag(DelightfulItemTags.BREAD_CORN); this.tag(DelightfulItemTags.BREAD_SLICES_TOASTED) - .addOptional(Util.rl(Mods.SAS, "toasted_bread_slice")) - .addOptional(Util.rl(Mods.MOD, "toast")); + .addOptional(Util.rl(Mods.SAS, "toasted_bread_slice")) + .addOptional(Util.rl(Mods.MOD, "toast")); this.tag(DelightfulItemTags.BREAD_SLICES) - .addTag(DelightfulItemTags.BREAD_SLICES_TOASTED) - .addOptional(Util.rl(Mods.SAS, "bread_slice")) - .addOptional(Util.rl(Mods.MOD, "bread_slice")); + .addTag(DelightfulItemTags.BREAD_SLICES_TOASTED) + .addOptional(Util.rl(Mods.SAS, "bread_slice")) + .addOptional(Util.rl(Mods.MOD, "bread_slice")); this.tag(DelightfulItemTags.SANDWICH_BREAD) .addTag(DelightfulItemTags.BREAD_SLICES); this.tag(DelightfulItemTags.BURGER_BUN) - .addOptional(Util.rl(Mods.SAS, "burger_bun")); + .addOptional(Util.rl(Mods.SAS, "burger_bun")); this.tag(DelightfulItemTags.BREAD_OR_BUN) - .addTag(ForgeTags.BREAD) - .addTag(DelightfulItemTags.BURGER_BUN); + .addTag(ForgeTags.BREAD) + .addTag(DelightfulItemTags.BURGER_BUN); this.tag(DelightfulItemTags.TOOLS_MACHETES) - .addOptionalTag(Util.rl(Mods.ND, "tools/machetes")); + .addOptionalTag(Util.rl(Mods.ND, "tools/machetes")); this.tag(DelightfulItemTags.TOOLS_SCAVENGING) - .addTag(ForgeTags.TOOLS_KNIVES) - .addOptionalTag(Util.rl(Mods.ND, "scavenging_tools")); + .addTag(ForgeTags.TOOLS_KNIVES) + .addOptionalTag(Util.rl(Mods.ND, "scavenging_tools")); this.tag(DelightfulItemTags.CROPS_GINGER).addOptional(Util.rl("snowyspirit", "ginger")); this.tag(DelightfulItemTags.FRUITS_APPLE).add(Items.APPLE); this.tag(DelightfulItemTags.FRUITS_MELON).add(Items.MELON_SLICE); @@ -186,8 +186,8 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { this.tag(DelightfulItemTags.FRUITS_BAOBAB).addOptional(Util.rl(Mods.BWG, BWGCompat.baobab)); this.tag(DelightfulItemTags.FRUITS_HAMIMELON).addOptional(Util.rl(Mods.FRD, "hamimelon_slice")); this.tag(DelightfulItemTags.FRUITS_KIWI) - .addOptional(Util.rl(Mods.FRD, "kiwi")) - .addOptional(Util.rl("hedgehog", "kiwi")); + .addOptional(Util.rl(Mods.FRD, "kiwi")) + .addOptional(Util.rl("hedgehog", "kiwi")); this.tag(DelightfulItemTags.FRUITS_PRICKLY_PEAR).addOptional(Util.rl(Mods.ECO, "prickly_pear")); this.tag(DelightfulItemTags.FRUITS_TORCHBERRIES).addOptional(Util.rl(Mods.TF, "torchberries")); this.tag(DelightfulItemTags.FRUITS_SOURCEBERRY).addOptional(Util.rl(Mods.AN, "sourceberry_bush")); @@ -196,348 +196,348 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { this.tag(DelightfulItemTags.FRUITS_REDCURRANT).addOptional(Util.rl(Mods.RC, "redcurrant")); this.tag(DelightfulItemTags.FRUITS_WHITECURRANT).addOptional(Util.rl(Mods.RC, "whitecurrant")); this.tag(DelightfulItemTags.FRUITS_BLUEBERRIES) - .addOptional(Util.rl(Mods.BWG, "blueberries")) - .addOptional(Util.rl(Mods.WB, "blueberries")) - .addOptional(Util.rl("nutritious_feast", "blueberries")); + .addOptional(Util.rl(Mods.BWG, "blueberries")) + .addOptional(Util.rl(Mods.WB, "blueberries")) + .addOptional(Util.rl("nutritious_feast", "blueberries")); this.tag(DelightfulItemTags.FRUITS_RASPBERRIES) - .addOptional(Util.rl(Mods.WB, "raspberry")); + .addOptional(Util.rl(Mods.WB, "raspberry")); this.tag(DelightfulItemTags.FRUITS_BLACKBERRIES) - .addOptional(Util.rl(Mods.WB, "blackberry")); + .addOptional(Util.rl(Mods.WB, "blackberry")); this.tag(DelightfulItemTags.FRUITS_CRANBERRIES) - .addOptional(Util.rl(Mods.WB, "cranberries")); + .addOptional(Util.rl(Mods.WB, "cranberries")); this.tag(DelightfulItemTags.FRUITS_WILD_BERRIES) - .addOptional(Util.rl("windswept", "wild_berries")); + .addOptional(Util.rl("windswept", "wild_berries")); this.tag(DelightfulItemTags.FRUITS_STRAWBERRIES) - .addOptional(Util.rl(Mods.N, "strawberries")) - .addOptional(Util.rl(Mods.N, "white_strawberries")); + .addOptional(Util.rl(Mods.N, "strawberries")) + .addOptional(Util.rl(Mods.N, "white_strawberries")); this.tag(DelightfulItemTags.FRUITS_BANANA) - .addOptional(Util.rl(Mods.N, "banana")); + .addOptional(Util.rl(Mods.N, "banana")); this.tag(DelightfulItemTags.FRUITS_CHERRY) - .addOptional(Util.rl(Mods.FA, "cherry_peach")); + .addOptional(Util.rl(Mods.FA, "cherry_peach")); this.tag(DelightfulItemTags.FRUITS) - .addTag(ForgeTags.BERRIES) - .addTag(DelightfulItemTags.FRUITS_CITRUS) - .addTag(DelightfulItemTags.FRUITS_SWEET) - .addTag(DelightfulItemTags.FRUITS_CHORUS) - .addTag(DelightfulItemTags.FRUITS_GREEN_APPLE) - .addTag(DelightfulItemTags.FRUITS_YUCCA) - .addOptional(Util.rl(Mods.AN, "mendosteen_pod")) - .addOptional(Util.rl(Mods.AN, "bastion_pod")) - .addOptional(Util.rl(Mods.AN, "bombegranate_pod")) - .addOptional(Util.rl(Mods.AN, "frostaya_pod")) - .addOptional(Util.rl(Mods.UG, "droopvine_item")) - .addOptional(Util.rl(Mods.EP, "oblifruit")); + .addTag(ForgeTags.BERRIES) + .addTag(DelightfulItemTags.FRUITS_CITRUS) + .addTag(DelightfulItemTags.FRUITS_SWEET) + .addTag(DelightfulItemTags.FRUITS_CHORUS) + .addTag(DelightfulItemTags.FRUITS_GREEN_APPLE) + .addTag(DelightfulItemTags.FRUITS_YUCCA) + .addOptional(Util.rl(Mods.AN, "mendosteen_pod")) + .addOptional(Util.rl(Mods.AN, "bastion_pod")) + .addOptional(Util.rl(Mods.AN, "bombegranate_pod")) + .addOptional(Util.rl(Mods.AN, "frostaya_pod")) + .addOptional(Util.rl(Mods.UG, "droopvine_item")) + .addOptional(Util.rl(Mods.EP, "oblifruit")); this.tag(ForgeTags.BERRIES) - .addTag(DelightfulItemTags.FRUITS_SWEET_BERRIES) - .addTag(DelightfulItemTags.FRUITS_GLOW_BERRIES) - .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES) - .addTag(DelightfulItemTags.FRUITS_TORCHBERRIES) - .addTag(DelightfulItemTags.FRUITS_SOURCEBERRY) - .addTag(DelightfulItemTags.FRUITS_ELDERBERRY) - .addTag(DelightfulItemTags.FRUITS_BLACKCURRANT) - .addTag(DelightfulItemTags.FRUITS_REDCURRANT) - .addTag(DelightfulItemTags.FRUITS_WHITECURRANT) - .addTag(DelightfulItemTags.FRUITS_BLUEBERRIES) - .addTag(DelightfulItemTags.FRUITS_RASPBERRIES) - .addTag(DelightfulItemTags.FRUITS_BLACKBERRIES) - .addTag(DelightfulItemTags.FRUITS_CRANBERRIES) - .addTag(DelightfulItemTags.FRUITS_CHERRY) - .addTag(DelightfulItemTags.FRUITS_STRAWBERRIES) - .addTag(DelightfulItemTags.FRUITS_WILD_BERRIES) - .addOptionalTag(Util.rl(Util.LOADER, "fruits/mulberry")) - .addOptionalTag(Util.rl(Util.LOADER, "fruits/hawberry")) - .addOptionalTag(Util.rl(Util.LOADER, "fruits/bayberry")) - .addOptional(Util.rl(Mods.UG, "blisterberry")) - .addOptional(Util.rl(Mods.EN, "zure_berry")) - .addOptional(Util.rl(Mods.EP, "pream_berry")) - .addOptional(Util.rl("deep_aether", "goldenleaf_berries")) - .addOptional(Util.rl(Mods.AER, "zanberry")); + .addTag(DelightfulItemTags.FRUITS_SWEET_BERRIES) + .addTag(DelightfulItemTags.FRUITS_GLOW_BERRIES) + .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES) + .addTag(DelightfulItemTags.FRUITS_TORCHBERRIES) + .addTag(DelightfulItemTags.FRUITS_SOURCEBERRY) + .addTag(DelightfulItemTags.FRUITS_ELDERBERRY) + .addTag(DelightfulItemTags.FRUITS_BLACKCURRANT) + .addTag(DelightfulItemTags.FRUITS_REDCURRANT) + .addTag(DelightfulItemTags.FRUITS_WHITECURRANT) + .addTag(DelightfulItemTags.FRUITS_BLUEBERRIES) + .addTag(DelightfulItemTags.FRUITS_RASPBERRIES) + .addTag(DelightfulItemTags.FRUITS_BLACKBERRIES) + .addTag(DelightfulItemTags.FRUITS_CRANBERRIES) + .addTag(DelightfulItemTags.FRUITS_CHERRY) + .addTag(DelightfulItemTags.FRUITS_STRAWBERRIES) + .addTag(DelightfulItemTags.FRUITS_WILD_BERRIES) + .addOptionalTag(Util.rl(Util.LOADER, "fruits/mulberry")) + .addOptionalTag(Util.rl(Util.LOADER, "fruits/hawberry")) + .addOptionalTag(Util.rl(Util.LOADER, "fruits/bayberry")) + .addOptional(Util.rl(Mods.UG, "blisterberry")) + .addOptional(Util.rl(Mods.EN, "zure_berry")) + .addOptional(Util.rl(Mods.EP, "pream_berry")) + .addOptional(Util.rl("deep_aether", "goldenleaf_berries")) + .addOptional(Util.rl(Mods.AER, "zanberry")); this.tag(DelightfulItemTags.FRUITS_CITRUS) - .addTag(DelightfulItemTags.FRUITS_CITRON) - .addOptionalTag(DelightfulItemTags.FRUITS_MANDARIN.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_ORANGE.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_LEMON.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_LIME.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_GRAPEFRUIT.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_POMELO.location()); + .addTag(DelightfulItemTags.FRUITS_CITRON) + .addOptionalTag(DelightfulItemTags.FRUITS_MANDARIN.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_ORANGE.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_LEMON.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_LIME.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_GRAPEFRUIT.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_POMELO.location()); this.tag(DelightfulItemTags.FRUITS_SWEET) - .addTag(DelightfulItemTags.FRUITS_APPLE) - .addTag(DelightfulItemTags.FRUITS_KIWI) - .addTag(DelightfulItemTags.FRUITS_MELON) - .addTag(DelightfulItemTags.FRUITS_CANTALOUPE) - .addTag(DelightfulItemTags.FRUITS_PRICKLY_PEAR) - .addTag(DelightfulItemTags.FRUITS_BANANA) - .addTag(DelightfulItemTags.FRUITS_SWEET_BERRIES) - .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES) - .addTag(DelightfulItemTags.FRUITS_STRAWBERRIES) - .addTag(DelightfulItemTags.FRUITS_CHERRY) - .addTag(DelightfulItemTags.FRUITS_BLUEBERRIES) - .addTag(DelightfulItemTags.FRUITS_RASPBERRIES) - .addTag(DelightfulItemTags.FRUITS_BLACKBERRIES) - .addTag(DelightfulItemTags.FRUITS_CRANBERRIES) - .addTag(DelightfulItemTags.FRUITS_WILD_BERRIES) - .addTag(DelightfulItemTags.FRUITS_RAMBUTAN) - .addTag(DelightfulItemTags.FRUITS_PITAYA) - .addTag(DelightfulItemTags.FRUITS_JABUTICABA) - .addTag(DelightfulItemTags.FRUITS_KIWANO) - .addTag(DelightfulItemTags.FRUITS_HAMIMELON) - .addTag(DelightfulItemTags.FRUITS_BAOBAB) - .addOptionalTag(DelightfulItemTags.FRUITS_ORANGE.location()) - .addOptionalTag(DelightfulItemTags.FRUITS_MANDARIN.location()) - .addOptionalTag(Util.rl(Util.LOADER, "fruits/redlove")); + .addTag(DelightfulItemTags.FRUITS_APPLE) + .addTag(DelightfulItemTags.FRUITS_KIWI) + .addTag(DelightfulItemTags.FRUITS_MELON) + .addTag(DelightfulItemTags.FRUITS_CANTALOUPE) + .addTag(DelightfulItemTags.FRUITS_PRICKLY_PEAR) + .addTag(DelightfulItemTags.FRUITS_BANANA) + .addTag(DelightfulItemTags.FRUITS_SWEET_BERRIES) + .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES) + .addTag(DelightfulItemTags.FRUITS_STRAWBERRIES) + .addTag(DelightfulItemTags.FRUITS_CHERRY) + .addTag(DelightfulItemTags.FRUITS_BLUEBERRIES) + .addTag(DelightfulItemTags.FRUITS_RASPBERRIES) + .addTag(DelightfulItemTags.FRUITS_BLACKBERRIES) + .addTag(DelightfulItemTags.FRUITS_CRANBERRIES) + .addTag(DelightfulItemTags.FRUITS_WILD_BERRIES) + .addTag(DelightfulItemTags.FRUITS_RAMBUTAN) + .addTag(DelightfulItemTags.FRUITS_PITAYA) + .addTag(DelightfulItemTags.FRUITS_JABUTICABA) + .addTag(DelightfulItemTags.FRUITS_KIWANO) + .addTag(DelightfulItemTags.FRUITS_HAMIMELON) + .addTag(DelightfulItemTags.FRUITS_BAOBAB) + .addOptionalTag(DelightfulItemTags.FRUITS_ORANGE.location()) + .addOptionalTag(DelightfulItemTags.FRUITS_MANDARIN.location()) + .addOptionalTag(Util.rl(Util.LOADER, "fruits/redlove")); this.tag(DelightfulItemTags.VEGETABLES_SPICY) - .addOptionalTag(Util.rl(Util.LOADER, "chilipepper")) - .addOptionalTag(Util.rl(Util.LOADER, "vegetables/ghost_pepper")) - .addOptionalTag(Util.rl(Mods.CR, "hot_nether_fruit")) - .addOptional(Util.rl(Mods.MND, "bullet_pepper")); + .addOptionalTag(Util.rl(Util.LOADER, "chilipepper")) + .addOptionalTag(Util.rl(Util.LOADER, "vegetables/ghost_pepper")) + .addOptionalTag(Util.rl(Mods.CR, "hot_nether_fruit")) + .addOptional(Util.rl(Mods.MND, "bullet_pepper")); this.tag(DelightfulItemTags.VEGETABLES_CORN) - .addOptionalTag(Util.rl(Util.LOADER, "grain/corn")) - .addOptional(Util.rl("hauntedharvest", "corn")) - .addOptional(Util.rl("corn_delight", "corn")); + .addOptionalTag(Util.rl(Util.LOADER, "grain/corn")) + .addOptional(Util.rl("hauntedharvest", "corn")) + .addOptional(Util.rl("corn_delight", "corn")); this.tag(DelightfulItemTags.VEGETABLES_GINGER) - .addTag(DelightfulItemTags.CROPS_GINGER); + .addTag(DelightfulItemTags.CROPS_GINGER); this.tag(DelightfulItemTags.VEGETABLES_CUCUMBER) - .addOptional(Util.rl(Mods.CD, "cucumber")); + .addOptional(Util.rl(Mods.CD, "cucumber")); this.tag(DelightfulItemTags.CUCUMBER).addTag(DelightfulItemTags.VEGETABLES_CUCUMBER); this.tag(DelightfulItemTags.HOT_SPICE) - .add(Items.BLAZE_POWDER) - .addTag(DelightfulItemTags.VEGETABLES_SPICY) - .addOptionalTag(Util.rl(Mods.MND, "hot_spice")); + .add(Items.BLAZE_POWDER) + .addTag(DelightfulItemTags.VEGETABLES_SPICY) + .addOptionalTag(Util.rl(Mods.MND, "hot_spice")); this.tag(DelightfulItemTags.PUMPKINS_CARVED) - .add(Items.CARVED_PUMPKIN) - .addOptional(Util.rl("autumnity", "carved_large_pumpkin_slice")); + .add(Items.CARVED_PUMPKIN) + .addOptional(Util.rl("autumnity", "carved_large_pumpkin_slice")); this.tag(DelightfulItemTags.PUMPKINS) - .addTag(DelightfulItemTags.PUMPKINS_CARVED) - .add(Items.PUMPKIN) - .addOptional(Util.rl("autumnity", "large_pumpkin_slice")); + .addTag(DelightfulItemTags.PUMPKINS_CARVED) + .add(Items.PUMPKIN) + .addOptional(Util.rl("autumnity", "large_pumpkin_slice")); this.tag(DelightfulItemTags.COCONUT).addOptional(Util.rl(Mods.ECO, "coconut_slice")); this.tag(DelightfulItemTags.NUTS_WALNUT) - .addOptional(Util.rl(Mods.ECO, "walnut")) - .addOptional(Util.rl("caupona", "walnut")); + .addOptional(Util.rl(Mods.ECO, "walnut")) + .addOptional(Util.rl("caupona", "walnut")); this.tag(DelightfulItemTags.NUTS_PEANUT) - .addOptionalTag(Util.rl(Util.LOADER, "peanut")) - .addOptional(Util.rl("sprout", "peanut")); + .addOptionalTag(Util.rl(Util.LOADER, "peanut")) + .addOptional(Util.rl("sprout", "peanut")); this.tag(DelightfulItemTags.NUTS_CHESTNUT) - .addOptional(Util.rl("windswept", "chestnuts")); + .addOptional(Util.rl("windswept", "chestnuts")); this.tag(DelightfulItemTags.NUTS_ACORN) - .add(DelightfulItems.ACORN.get()); + .add(DelightfulItems.ACORN.get()); this.tag(DelightfulItemTags.NUTS) - .addTag(DelightfulItemTags.NUTS_ACORN) - .addTag(DelightfulItemTags.NUTS_WALNUT) - .addTag(DelightfulItemTags.NUTS_PEANUT) - .addTag(DelightfulItemTags.NUTS_CHESTNUT); + .addTag(DelightfulItemTags.NUTS_ACORN) + .addTag(DelightfulItemTags.NUTS_WALNUT) + .addTag(DelightfulItemTags.NUTS_PEANUT) + .addTag(DelightfulItemTags.NUTS_CHESTNUT); this.tag(DelightfulItemTags.COOKED_NUTS) - .add(DelightfulItems.ROASTED_ACORN.get()) - .addOptional(Util.rl(Mods.VD, "roasted_peanut")); + .add(DelightfulItems.ROASTED_ACORN.get()) + .addOptional(Util.rl(Mods.VD, "roasted_peanut")); this.tag(DelightfulItemTags.INGOTS_STEEL).addOptional(Util.rl("simplysteel", "steel_ingot")); this.tag(DelightfulItemTags.WATER).add(Items.WATER_BUCKET); this.tag(DelightfulItemTags.JELLY) - .add(DelightfulItems.JELLY_BOTTLE.get()) - .add(DelightfulItems.GLOW_JELLY_BOTTLE.get()); + .add(DelightfulItems.JELLY_BOTTLE.get()) + .add(DelightfulItems.GLOW_JELLY_BOTTLE.get()); this.tag(DelightfulItemTags.JELLIES) - .addTag(DelightfulItemTags.JELLY) - .addOptionalTag(Util.rl(Mods.FRD, "jelly")); + .addTag(DelightfulItemTags.JELLY) + .addOptionalTag(Util.rl(Mods.FRD, "jelly")); this.tag(DelightfulItemTags.JAM) - .addTag(DelightfulItemTags.JELLIES); + .addTag(DelightfulItemTags.JELLIES); this.tag(DelightfulItemTags.JAMS) - .addTag(DelightfulItemTags.JAM) - .addOptionalTag(Util.rl(Mods.WB, "berry_jams")) - .addOptionalTag(Util.rl(Mods.VD, "sweet_jam_bottles")); + .addTag(DelightfulItemTags.JAM) + .addOptionalTag(Util.rl(Mods.WB, "berry_jams")) + .addOptionalTag(Util.rl(Mods.VD, "sweet_jam_bottles")); this.tag(DelightfulItemTags.PEANUT_BUTTER) - .addOptional(Util.rl("thermal", "peanut_butter")) - .addOptional(Util.rl("croptopia", "peanut_butter")); + .addOptional(Util.rl("thermal", "peanut_butter")) + .addOptional(Util.rl("croptopia", "peanut_butter")); this.tag(DelightfulItemTags.NUT_BUTTER) - .addTag(DelightfulItemTags.PEANUT_BUTTER) - .add(DelightfulItems.NUT_BUTTER_BOTTLE.get()) - .addOptional(Util.rl(Mods.VD, "nut_mash_bottle")); + .addTag(DelightfulItemTags.PEANUT_BUTTER) + .add(DelightfulItems.NUT_BUTTER_BOTTLE.get()) + .addOptional(Util.rl(Mods.VD, "nut_mash_bottle")); this.tag(DelightfulItemTags.SUGAR).add(Items.SUGAR); this.tag(DelightfulItemTags.RAW_CRAB) - .addOptional(Util.rl("crabbersdelight", "crab")) - .addOptionalTag(Util.rl("finsandtails", "spindly_gem_crabs")); + .addOptional(Util.rl("crabbersdelight", "crab")) + .addOptionalTag(Util.rl("finsandtails", "spindly_gem_crabs")); this.tag(DelightfulItemTags.COOKED_CRAB) - .addOptional(Util.rl("crabbersdelight", "cooked_crab")); + .addOptional(Util.rl("crabbersdelight", "cooked_crab")); this.tag(DelightfulItemTags.CRAB_LEGS) - .addOptional(Util.rl(Mods.Q, "cooked_crab_leg")) - .addOptional(Util.rl("crabbersdelight", "crab_legs")) - .addOptional(Util.rl("untameddelight", "king_crab_legs")); + .addOptional(Util.rl(Mods.Q, "cooked_crab_leg")) + .addOptional(Util.rl("crabbersdelight", "crab_legs")) + .addOptional(Util.rl("untameddelight", "king_crab_legs")); this.tag(DelightfulItemTags.CRAB_MEAT) - .addTag(DelightfulItemTags.CRAB_LEGS) - .addOptional(Util.rl(Mods.ECO, "crab_meat")); + .addTag(DelightfulItemTags.CRAB_LEGS) + .addOptional(Util.rl(Mods.ECO, "crab_meat")); this.tag(DelightfulItemTags.CRAB_CLAW_COOKED) - .addOptional(Util.rl(Mods.CR, "chieftain_claw")) - .addOptional(Util.rl("finsandtails", "cooked_bull_crab_claw")); + .addOptional(Util.rl(Mods.CR, "chieftain_claw")) + .addOptional(Util.rl("finsandtails", "cooked_bull_crab_claw")); this.tag(DelightfulItemTags.CRAB_CLAW) - .addTag(DelightfulItemTags.CRAB_CLAW_COOKED) - .addOptional(Util.rl("crabbersdelight", "crab_claw")) - .addOptional(Util.rl(Mods.ECO, "crab_claw")) - .addOptional(Util.rl("finsandtails", "red_bull_crab_claw")) - .addOptional(Util.rl("finsandtails", "white_bull_crab_claw")); + .addTag(DelightfulItemTags.CRAB_CLAW_COOKED) + .addOptional(Util.rl("crabbersdelight", "crab_claw")) + .addOptional(Util.rl(Mods.ECO, "crab_claw")) + .addOptional(Util.rl("finsandtails", "red_bull_crab_claw")) + .addOptional(Util.rl("finsandtails", "white_bull_crab_claw")); this.tag(DelightfulItemTags.CHEESE) - .addOptionalTag(Util.rl(Util.LOADER, "cheeses")) - .addOptional(Util.rl("brewinandchewin", "flaxen_cheese_wedge")) - .addOptional(Util.rl("farmlife", "tribull_cheese_wedge")) - .addOptional(Util.rl("croptopia", "cheese")) - .addOptional(Util.rl("thermal", "cheese_wedge")) - .addOptional(Util.rl("casualness_delight", "cheese_wheel_slice")); + .addOptionalTag(Util.rl(Util.LOADER, "cheeses")) + .addOptional(Util.rl("brewinandchewin", "flaxen_cheese_wedge")) + .addOptional(Util.rl("farmlife", "tribull_cheese_wedge")) + .addOptional(Util.rl("croptopia", "cheese")) + .addOptional(Util.rl("thermal", "cheese_wedge")) + .addOptional(Util.rl("casualness_delight", "cheese_wheel_slice")); this.tag(ForgeTags.MILK) - .addOptional(Util.rl(Mods.AE, "skyroot_milk_bucket")) - .addOptional(Util.rl("farmlife", "tribull_milk")) - .addOptional(Util.rl("dracovitadelight", "tribull_milk")); + .addOptional(Util.rl(Mods.AE, "skyroot_milk_bucket")) + .addOptional(Util.rl("farmlife", "tribull_milk")) + .addOptional(Util.rl("dracovitadelight", "tribull_milk")); this.tag(DelightfulItemTags.TEA_LEAVES_GREEN) - .add(DelightfulItems.GREEN_TEA_LEAF.get()) - .addOptional(Util.rl(Mods.FR, "green_tea_leaves")) - .addOptional(Util.rl("croptopia", "tea_leaves")); + .add(DelightfulItems.GREEN_TEA_LEAF.get()) + .addOptional(Util.rl(Mods.FR, "green_tea_leaves")) + .addOptional(Util.rl("croptopia", "tea_leaves")); this.tag(DelightfulItemTags.TEA_LEAVES) - .addTag(DelightfulItemTags.TEA_LEAVES_GREEN) - .addOptionalTag(Util.rl(Mods.FR, "tea_leaves")); + .addTag(DelightfulItemTags.TEA_LEAVES_GREEN) + .addOptionalTag(Util.rl(Mods.FR, "tea_leaves")); this.tag(DelightfulItemTags.RAW_FISHES_KOI) - .addOptional(Util.rl("environmental", "koi")) - .addOptional(Util.rl("crittersandcompanions", "koi_fish")); + .addOptional(Util.rl("environmental", "koi")) + .addOptional(Util.rl("crittersandcompanions", "koi_fish")); this.tag(DelightfulItemTags.RAW_FISHES_TUNA) - .addOptional(Util.rl("spawn", "tuna_chunk")); + .addOptional(Util.rl("spawn", "tuna_chunk")); this.tag(DelightfulItemTags.COOKED_FISHES_TUNA) - .addOptional(Util.rl("spawn", "cooked_tuna_chunk")); + .addOptional(Util.rl("spawn", "cooked_tuna_chunk")); this.tag(ForgeTags.RAW_FISHES) - .addTag(DelightfulItemTags.RAW_FISHES_KOI) - .addTag(DelightfulItemTags.RAW_FISHES_TUNA) - .addOptional(Util.rl("biomemakeover", "glowfish")) - .addOptional(Util.rl("deep_aether", "raw_aerglow_fish")) - .addOptional(Util.rl("spawn", "angler_fish")) - .addOptional(Util.rl("bettas", "betta_fish")); + .addTag(DelightfulItemTags.RAW_FISHES_KOI) + .addTag(DelightfulItemTags.RAW_FISHES_TUNA) + .addOptional(Util.rl("biomemakeover", "glowfish")) + .addOptional(Util.rl("deep_aether", "raw_aerglow_fish")) + .addOptional(Util.rl("spawn", "angler_fish")) + .addOptional(Util.rl("bettas", "betta_fish")); this.tag(ForgeTags.COOKED_FISHES) - .addTag(DelightfulItemTags.COOKED_FISHES_TUNA) - .addOptional(Util.rl("biomemakeover", "cooked_glowfish")) - .addOptional(Util.rl("deep_aether", "cooked_aerglow_fish")); + .addTag(DelightfulItemTags.COOKED_FISHES_TUNA) + .addOptional(Util.rl("biomemakeover", "cooked_glowfish")) + .addOptional(Util.rl("deep_aether", "cooked_aerglow_fish")); this.tag(DelightfulItemTags.TD_VENISON_RAW) - .addOptional(Util.rl(Mods.TF, "raw_venison")) - .addOptional(Util.rl(Mods.NA, "venison")) - .addOptional(Util.rl("goodall", "raw_venison")) - .addOptional(Util.rl("blue_skies", "venison")); + .addOptional(Util.rl(Mods.TF, "raw_venison")) + .addOptional(Util.rl(Mods.NA, "venison")) + .addOptional(Util.rl("goodall", "raw_venison")) + .addOptional(Util.rl("blue_skies", "venison")); this.tag(DelightfulItemTags.RAW_VENISON_COMPAT) - .addTag(DelightfulItemTags.TD_VENISON_RAW); + .addTag(DelightfulItemTags.TD_VENISON_RAW); this.tag(DelightfulItemTags.RAW_VENISON) - .add(DelightfulItems.VENISON_CHOPS.get()) - .addTag(DelightfulItemTags.RAW_VENISON_COMPAT); + .add(DelightfulItems.VENISON_CHOPS.get()) + .addTag(DelightfulItemTags.RAW_VENISON_COMPAT); this.tag(DelightfulItemTags.TD_VENISON_COOKED) - .addOptional(Util.rl(Mods.TF, "cooked_venison")) - .addOptional(Util.rl(Mods.NA, "cooked_venison")) - .addOptional(Util.rl("goodall", "cooked_venison")) - .addOptional(Util.rl("blue_skies", "cooked_venison")); + .addOptional(Util.rl(Mods.TF, "cooked_venison")) + .addOptional(Util.rl(Mods.NA, "cooked_venison")) + .addOptional(Util.rl("goodall", "cooked_venison")) + .addOptional(Util.rl("blue_skies", "cooked_venison")); this.tag(DelightfulItemTags.COOKED_VENISON_COMPAT) - .addTag(DelightfulItemTags.TD_VENISON_COOKED); + .addTag(DelightfulItemTags.TD_VENISON_COOKED); this.tag(DelightfulItemTags.COOKED_VENISON) - .add(DelightfulItems.COOKED_VENISON_CHOPS.get()) - .addTag(DelightfulItemTags.COOKED_VENISON_COMPAT); + .add(DelightfulItems.COOKED_VENISON_CHOPS.get()) + .addTag(DelightfulItemTags.COOKED_VENISON_COMPAT); //tag(DelightfulItemTags.RAW_GOAT_COMPAT).addOptional(Util.rl()) Goated and Drop the Meat are handled this.tag(DelightfulItemTags.RAW_GOAT) - .add(DelightfulItems.RAW_GOAT.get()); + .add(DelightfulItems.RAW_GOAT.get()); this.tag(DelightfulItemTags.COOKED_GOAT) - .add(DelightfulItems.COOKED_GOAT.get()); + .add(DelightfulItems.COOKED_GOAT.get()); this.tag(DelightfulItemTags.RAW_FROG) - .addOptional(Util.rl("frog_legs", "frog_legs")); + .addOptional(Util.rl("frog_legs", "frog_legs")); this.tag(DelightfulItemTags.COOKED_FROG) - .addOptional(Util.rl("frog_legs", "cooked_frog_legs")); + .addOptional(Util.rl("frog_legs", "cooked_frog_legs")); this.tag(DelightfulItemTags.FOOD_MEAT) - .addTag(DelightfulItemTags.RAW_VENISON) - .addTag(DelightfulItemTags.COOKED_VENISON) - .addTag(DelightfulItemTags.RAW_GOAT) - .addTag(DelightfulItemTags.COOKED_GOAT) - .addTag(DelightfulItemTags.RAW_FROG) - .addTag(DelightfulItemTags.COOKED_FROG); + .addTag(DelightfulItemTags.RAW_VENISON) + .addTag(DelightfulItemTags.COOKED_VENISON) + .addTag(DelightfulItemTags.RAW_GOAT) + .addTag(DelightfulItemTags.COOKED_GOAT) + .addTag(DelightfulItemTags.RAW_FROG) + .addTag(DelightfulItemTags.COOKED_FROG); this.tag(DelightfulItemTags.MEAT) - .addTag(DelightfulItemTags.FOOD_MEAT); + .addTag(DelightfulItemTags.FOOD_MEAT); this.tag(DelightfulItemTags.PROTEIN_PATTY) - .add(ModItems.BEEF_PATTY.get()) - .addOptional(Util.rl(Mods.MD, "vegan_patty")); + .add(ModItems.BEEF_PATTY.get()) + .addOptional(Util.rl(Mods.MD, "vegan_patty")); this.tag(DelightfulItemTags.CATTAIL) - .addOptional(Util.rl("sprout", "cattail")) - .addOptional(Util.rl(Mods.BOP, "cattail")) - .addOptional(Util.rl("biomemakeover", "cattail")); + .addOptional(Util.rl("sprout", "cattail")) + .addOptional(Util.rl(Mods.BOP, "cattail")) + .addOptional(Util.rl("biomemakeover", "cattail")); this.tag(DelightfulItemTags.GEMS_ROSE_QUARTZ) - .addOptional(Util.rl(Mods.BOP, "rose_quartz_chunk")) - .addOptional(Util.rl(Mods.C, "rose_quartz")); + .addOptional(Util.rl(Mods.BOP, "rose_quartz_chunk")) + .addOptional(Util.rl(Mods.C, "rose_quartz")); this.tag(DelightfulItemTags.GEMS_ZANITE).addOptional(Util.rl(Mods.AE, "zanite_gemstone")); this.tag(DelightfulItemTags.CHOCOLATE) - .addOptionalTag(Util.rl(Util.LOADER, "chocolates")) - .addOptionalTag(Util.rl(Util.LOADER, "bars/chocolate")) - .addOptionalTag(Util.rl(Util.LOADER, "chocolatebar")) - .addOptional(Util.rl(Mods.N, "chocolate_bar")) - .addOptional(Util.rl(Mods.C, "bar_of_chocolate")); + .addOptionalTag(Util.rl(Util.LOADER, "chocolates")) + .addOptionalTag(Util.rl(Util.LOADER, "bars/chocolate")) + .addOptionalTag(Util.rl(Util.LOADER, "chocolatebar")) + .addOptional(Util.rl(Mods.N, "chocolate_bar")) + .addOptional(Util.rl(Mods.C, "bar_of_chocolate")); this.tag(ForgeTags.SALAD_INGREDIENTS) - .add(DelightfulItems.CHOPPED_CLOVER.get()) - .addOptional(Util.rl("babyfat", "water_lettuce")); + .add(DelightfulItems.CHOPPED_CLOVER.get()) + .addOptional(Util.rl("babyfat", "water_lettuce")); this.tag(DelightfulItemTags.SEEDS_SALMONBERRY) - .add(DelightfulItems.SALMONBERRY_PIPS.get()); + .add(DelightfulItems.SALMONBERRY_PIPS.get()); this.tag(DelightfulItemTags.SEEDS_CANTALOUPE) - .add(DelightfulItems.CANTALOUPE_SEEDS.get()); + .add(DelightfulItems.CANTALOUPE_SEEDS.get()); this.tag(ForgeTags.SEEDS) - .addTag(DelightfulItemTags.SEEDS_SALMONBERRY) - .addTag(DelightfulItemTags.SEEDS_CANTALOUPE) - .addOptional(Util.rl(Mods.FR, "tea_seeds")); + .addTag(DelightfulItemTags.SEEDS_SALMONBERRY) + .addTag(DelightfulItemTags.SEEDS_CANTALOUPE) + .addOptional(Util.rl(Mods.FR, "tea_seeds")); this.tag(DelightfulItemTags.TORTILLA) - .addOptional(Util.rl(Mods.CD, "tortilla")); + .addOptional(Util.rl(Mods.CD, "tortilla")); this.tag(Tags.Items.SEEDS) - .addOptional(Util.rl(Mods.VD, "oat_seeds")) - .addOptional(Util.rl(Mods.VD, "ghost_pepper_seeds")) - .addOptional(Util.rl(Mods.VD, "cucumber_seeds")) - .addOptional(Util.rl(Mods.FRD, "lemon_seeds")) - .addOptional(Util.rl(Mods.FRD, "hamimelon_seeds")); + .addOptional(Util.rl(Mods.VD, "oat_seeds")) + .addOptional(Util.rl(Mods.VD, "ghost_pepper_seeds")) + .addOptional(Util.rl(Mods.VD, "cucumber_seeds")) + .addOptional(Util.rl(Mods.FRD, "lemon_seeds")) + .addOptional(Util.rl(Mods.FRD, "hamimelon_seeds")); this.tag(DelightfulItemTags.BONES) - .addOptional(Util.rl(Mods.DD, "sculk_bone")); + .addOptional(Util.rl(Mods.DD, "sculk_bone")); this.tag(DelightfulItemTags.SYRUP) - .addOptionalTag(Util.rl(Mods.SUP, "pancake_syrup")) - .addOptional(Util.rl("autumnity", "syrup_bottle")); + .addOptionalTag(Util.rl(Mods.SUP, "pancake_syrup")) + .addOptional(Util.rl("autumnity", "syrup_bottle")); this.tag(DelightfulItemTags.COOKIES) - .add(Items.COOKIE) - .add(ModItems.HONEY_COOKIE.get()) - .add(ModItems.SWEET_BERRY_COOKIE.get()) - .addOptional(Util.rl("snowyspirit", "gingerbread_cookie")) - .addOptional(Util.rl(Mods.AD, "mulberry_cookie")) - .addOptional(Util.rl(Mods.AD, "maple_cookie")) - .addOptional(Util.rl("exquisito", "chorus_cookie")) - .addOptional(Util.rl("ends_delight", "chorus_cookie")) - .addOptional(Util.rl(Mods.MD, "bat_cookie")) - .addOptional(Util.rl("sunflowerdelight", "shortbread_cookie")) - .addOptional(Util.rl(Mods.VD, "oatmeal_cookie")) - .addOptional(Util.rl(Mods.FRD, "persimmon_cookie")) - .addOptional(Util.rl(Mods.FRD, "lemon_cookie")) - .addOptional(Util.rl(Mods.FRD, "cranberry_cookie")) - .addOptional(Util.rl(Mods.FRD, "bayberry_cookie")) - .addOptional(Util.rl("vampiresdelight", "orchid_cookie")); + .add(Items.COOKIE) + .add(ModItems.HONEY_COOKIE.get()) + .add(ModItems.SWEET_BERRY_COOKIE.get()) + .addOptional(Util.rl("snowyspirit", "gingerbread_cookie")) + .addOptional(Util.rl(Mods.AD, "mulberry_cookie")) + .addOptional(Util.rl(Mods.AD, "maple_cookie")) + .addOptional(Util.rl("exquisito", "chorus_cookie")) + .addOptional(Util.rl("ends_delight", "chorus_cookie")) + .addOptional(Util.rl(Mods.MD, "bat_cookie")) + .addOptional(Util.rl("sunflowerdelight", "shortbread_cookie")) + .addOptional(Util.rl(Mods.VD, "oatmeal_cookie")) + .addOptional(Util.rl(Mods.FRD, "persimmon_cookie")) + .addOptional(Util.rl(Mods.FRD, "lemon_cookie")) + .addOptional(Util.rl(Mods.FRD, "cranberry_cookie")) + .addOptional(Util.rl(Mods.FRD, "bayberry_cookie")) + .addOptional(Util.rl("vampiresdelight", "orchid_cookie")); this.tag(DelightfulItemTags.SUPP_COOKIES) - .addTag(DelightfulItemTags.COOKIES) - .addTag(DelightfulItemTags.BREAD_SLICES); + .addTag(DelightfulItemTags.COOKIES) + .addTag(DelightfulItemTags.BREAD_SLICES); this.tag(DelightfulItemTags.ROPES) - .add(ModItems.ROPE.get()) - .addOptionalTag(Util.rl(Mods.SUP, "ropes")) - .addOptional(Util.rl(Mods.AA, "rope")); + .add(ModItems.ROPE.get()) + .addOptionalTag(Util.rl(Mods.SUP, "ropes")) + .addOptional(Util.rl(Mods.AA, "rope")); this.tag(DelightfulItemTags.FEATHERS) - .addOptional(Util.rl(Mods.ECO, "penguin_feather")); + .addOptional(Util.rl(Mods.ECO, "penguin_feather")); // Minecraft this.tag(ItemTags.SMALL_FLOWERS) - .addTag(DelightfulItemTags.FLOWERS_AZALEA); + .addTag(DelightfulItemTags.FLOWERS_AZALEA); this.tag(DelightfulItemTags.FLOWERS_AZALEA) - .addOptional(Util.rl(Mods.ECO, "azalea_flower")) - .addOptional(Util.rl("twigs", "azalea_flowers")); + .addOptional(Util.rl(Mods.ECO, "azalea_flower")) + .addOptional(Util.rl("twigs", "azalea_flowers")); this.tag(ItemTags.FOX_FOOD) - .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES); + .addTag(DelightfulItemTags.FRUITS_SALMONBERRIES); this.tag(ItemTags.SMALL_FLOWERS) - .add(DelightfulItems.WILD_SALMONBERRIES.get()); + .add(DelightfulItems.WILD_SALMONBERRIES.get()); this.tag(ItemTags.PIGLIN_LOVED).add(Knives.REFINED_GLOWSTONE.get()); this.tag(ForgeTags.TOOLS_KNIVES) - .addTag(ModTags.KNIVES) - .addOptional(Util.rl("occultism", "butcher_knife")); + .addTag(ModTags.KNIVES) + .addOptional(Util.rl("occultism", "butcher_knife")); var build = tag(ModTags.KNIVES); DelightfulItems.ITEMS.getEntries().stream() - .map(RegistryObject::get) - .filter(item -> item instanceof DelightfulKnifeItem) - .forEach(build::add); + .map(RegistryObject::get) + .filter(item -> item instanceof DelightfulKnifeItem) + .forEach(build::add); // Nether's Delight this.tag(DelightfulItemTags.MEAL_ITEM) - .add(DelightfulItems.STUFFED_CANTALOUPE.get()) - .addOptional(Util.rl(Mods.MD, "bowl_of_stuffed_squid")); + .add(DelightfulItems.STUFFED_CANTALOUPE.get()) + .addOptional(Util.rl(Mods.MD, "bowl_of_stuffed_squid")); // Ecologics this.addSelf(DelightfulItemTags.COOKED_PRICKLY_PEAR); @@ -566,50 +566,50 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Create this.tag(DelightfulItemTags.UPRIGHT_ON_BELT) - .addTag(DelightfulItemTags.JAMS) - .add(DelightfulItems.NUT_BUTTER_BOTTLE.get()) - .add(DelightfulItems.PRICKLY_PEAR_JUICE.get()) - .add(DelightfulItems.ENDER_NECTAR.get()) - .add(DelightfulItems.AZALEA_TEA.get()) - .add(DelightfulItems.LAVENDER_TEA.get()) - .add(DelightfulItems.MATCHA_LATTE.get()) - .add(DelightfulItems.BERRY_MATCHA_LATTE.get()) - .add(DelightfulItems.ANIMAL_OIL_BOTTLE.get()) - .add(DelightfulItems.SALMONBERRY_PIE.get()) - .addOptional(Util.rl(Mods.FR, "green_tea")) - .addOptional(Util.rl(Mods.FR, "yellow_tea")) - .addOptional(Util.rl(Mods.FR, "black_tea")) - .addOptional(Util.rl(Mods.FR, "rose_hip_tea")) - .addOptional(Util.rl(Mods.FR, "dandelion_tea")) - .addOptional(Util.rl(Mods.FR, "purulent_tea")) - .addOptional(Util.rl(Mods.FR, "gamblers_tea")); + .addTag(DelightfulItemTags.JAMS) + .add(DelightfulItems.NUT_BUTTER_BOTTLE.get()) + .add(DelightfulItems.PRICKLY_PEAR_JUICE.get()) + .add(DelightfulItems.ENDER_NECTAR.get()) + .add(DelightfulItems.AZALEA_TEA.get()) + .add(DelightfulItems.LAVENDER_TEA.get()) + .add(DelightfulItems.MATCHA_LATTE.get()) + .add(DelightfulItems.BERRY_MATCHA_LATTE.get()) + .add(DelightfulItems.ANIMAL_OIL_BOTTLE.get()) + .add(DelightfulItems.SALMONBERRY_PIE.get()) + .addOptional(Util.rl(Mods.FR, "green_tea")) + .addOptional(Util.rl(Mods.FR, "yellow_tea")) + .addOptional(Util.rl(Mods.FR, "black_tea")) + .addOptional(Util.rl(Mods.FR, "rose_hip_tea")) + .addOptional(Util.rl(Mods.FR, "dandelion_tea")) + .addOptional(Util.rl(Mods.FR, "purulent_tea")) + .addOptional(Util.rl(Mods.FR, "gamblers_tea")); // Serene Seasons this.tag(DelightfulItemTags.SUMMER_CROPS) - .addTag(DelightfulItemTags.SEEDS_SALMONBERRY) - .addTag(DelightfulItemTags.SEEDS_CANTALOUPE); + .addTag(DelightfulItemTags.SEEDS_SALMONBERRY) + .addTag(DelightfulItemTags.SEEDS_CANTALOUPE); // Phantasm this.addSelf(DelightfulItemTags.VOID_CRYSTAL_BLOCK); this.tag(DelightfulItemTags.CRYSTAL_SPIKE_TIPS) - .addOptional(Util.rl(Mods.EP, "crystal_spike_tip")) - .addOptional(Util.rl(Mods.EP, "void_crystal_spike_tip")); + .addOptional(Util.rl(Mods.EP, "crystal_spike_tip")) + .addOptional(Util.rl(Mods.EP, "void_crystal_spike_tip")); this.tag(DelightfulItemTags.XP_BOOSTED) - .add(Knives.CRYSTALLINE.get()); + .add(Knives.CRYSTALLINE.get()); this.tag(DelightfulItemTags.SOUL_STEEL_INGOT) - .addOptional(Util.rl("spirit", "soul_steel_ingot")); + .addOptional(Util.rl("spirit", "soul_steel_ingot")); this.tag(DelightfulItemTags.SOUL_STEEL_MAINHAND).add(Knives.SOUL_STEEL.get()); // Botania this.addSelf(DelightfulItemTags.LIVINGWOOD_TWIG); this.addSelf(DelightfulItemTags.DREAMWOOD_TWIG); this.tag(DelightfulItemTags.MANA_ITEMS) - .add(Knives.MANASTEEL.get()) - .add(Knives.ELEMENTIUM.get()) - .add(Knives.TERRA.get()); + .add(Knives.MANASTEEL.get()) + .add(Knives.ELEMENTIUM.get()) + .add(Knives.TERRA.get()); this.tag(DelightfulItems.ingot("alfsteel")) - .addOptional(Util.rl("mythicbotany", "alfsteel_ingot")); + .addOptional(Util.rl("mythicbotany", "alfsteel_ingot")); // Additional Additions this.addSelf(DelightfulItemTags.ROSE_GOLD_ALLOY); @@ -622,7 +622,7 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Nourished Nether this.tag(DelightfulItemTags.NECRONIUM_INGOT) - .addOptional(Util.rl("nourished_nether", "necronium_ingot")); + .addOptional(Util.rl("nourished_nether", "necronium_ingot")); this.tag(DelightfulItemTags.NECRONIUM_TOOLS).add(Knives.NECRONIUM.get()); // Undergarden @@ -640,17 +640,17 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Aether Redux this.tag(DelightfulItemTags.INGOTS_VERIDIUM) - .addOptional(Util.rl(Mods.AER, "veridium_ingot")); + .addOptional(Util.rl(Mods.AER, "veridium_ingot")); this.tag(DelightfulItemTags.VERIDIUM_ADVANCEMENT_INFUSABLE) - .add(Knives.VERIDIUM.get()); + .add(Knives.VERIDIUM.get()); this.tag(DelightfulItemTags.INFUSED_VERIDIUM_ITEMS) - .add(Knives.INFUSED_VERIDIUM.get()); + .add(Knives.INFUSED_VERIDIUM.get()); // Deep Aether this.tag(DelightfulItemTags.GEMS_SKYJADE) - .addOptionalTag(Util.rl("deep_aether", "skyjade_repairing")); + .addOptionalTag(Util.rl("deep_aether", "skyjade_repairing")); this.tag(DelightfulItemTags.INGOTS_STRATUS) - .addOptionalTag(Util.rl("deep_aether", "stratus_repairing")); + .addOptionalTag(Util.rl("deep_aether", "stratus_repairing")); this.addSelf(DelightfulItemTags.STRATUS_UPGRADE); // Ancient Aether @@ -663,8 +663,8 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { this.addSelf(DelightfulItemTags.FLUIX_BLOCK); this.addSelf(DelightfulItemTags.FLUIX_UPGRADE_SMITHING_TEMPLATE); this.tag(DelightfulItemTags.QUARTZ_KNIFE) - .add(Knives.NETHER_QUARTZ.get()) - .add(Knives.CERTUS_QUARTZ.get()); + .add(Knives.NETHER_QUARTZ.get()) + .add(Knives.CERTUS_QUARTZ.get()); // Naturalist this.tag(Util.it(Mods.NA, "bird_food_items")).addTag(Tags.Items.SEEDS); @@ -672,8 +672,8 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { // Neapolitan this.tag(Util.it(Mods.N, "ice_cream")) - .add(DelightfulItems.MATCHA_ICE_CREAM.get()) - .add(DelightfulItems.SALMONBERRY_ICE_CREAM.get()); + .add(DelightfulItems.MATCHA_ICE_CREAM.get()) + .add(DelightfulItems.SALMONBERRY_ICE_CREAM.get()); // Ars Nouveau this.tag(Util.it(Mods.AN, "magic_food")).add(DelightfulItems.SOURCE_BERRY_PIE_SLICE.get()); @@ -690,4 +690,4 @@ protected void addTags(HolderLookup.@NotNull Provider provider) { private void addSelf(TagKey item) { this.tag(item).addOptional(item.location()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLanguageProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLanguageProvider.java index d3093683..fb0b23de 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLanguageProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLanguageProvider.java @@ -8,136 +8,136 @@ import net.minecraftforge.common.data.LanguageProvider; public class DelightfulLanguageProvider extends LanguageProvider { - public DelightfulLanguageProvider(PackOutput output) { - super(output, Delightful.MODID, "en_us"); - } + public DelightfulLanguageProvider(PackOutput output) { + super(output, Delightful.MODID, "en_us"); + } - @Override - protected void addTranslations() { - DelightfulItems.ITEMS.getEntries().stream() - .filter(reg -> reg.get() instanceof DelightfulKnifeItem) - .forEach(knife -> addItem(knife, ((DelightfulKnifeItem) knife.get()).getTranslation())); - addItems(); - } - - private void addItems() { - addItem(DelightfulItems.CHEESEBURGER, "Cheeseburger"); - addItem(DelightfulItems.DELUXE_CHEESEBURGER, "Deluxe Cheeseburger"); - addItem(DelightfulItems.MARSHMALLOW_STICK, "Marshmallow on a Stick"); - addItem(DelightfulItems.COOKED_MARSHMALLOW_STICK, "Roasted Marshmallow on a Stick"); - addItem(DelightfulItems.SMORE, "S'more"); - addItem(DelightfulItems.CRAB_RANGOON, "Crab Rangoon"); - addItem(DelightfulItems.PRICKLY_PEAR_JUICE, "Prickly Pear Juice"); - addItem(DelightfulItems.CHUNKWICH, "Chunkwich"); - addItem(DelightfulItems.JELLY_BOTTLE, "Jam Jar"); - addItem(DelightfulItems.GLOW_JELLY_BOTTLE, "Glow Jam Jar"); - addItem(DelightfulItems.NUT_BUTTER_BOTTLE, "Nut Butter Bottle"); - addItem(DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH, "Nut Butter and Jam Sandwich"); - addItem(DelightfulItems.ENDER_NECTAR, "Ender Nectar"); - addItem(DelightfulItems.HONEY_GLAZED_WALNUT, "Honey Glazed Walnut"); - addItem(DelightfulItems.MATCHA_LATTE, "Matcha Latte"); - addItem(DelightfulItems.BERRY_MATCHA_LATTE, "Iced Berry Matcha Latte"); - addItem(DelightfulItems.GREEN_TEA_LEAF, "Green Tea Leaves"); - addItem(DelightfulItems.SALMONBERRIES, "Salmonberries"); - addItem(DelightfulItems.SALMONBERRY_PIPS, "Salmonberry Pips"); - addItem(DelightfulItems.SALMONBERRY_PIE_SLICE, "Slice of Salmonberry Pie"); - addItem(DelightfulItems.PUMPKIN_PIE_SLICE, "Slice of Pumpkin Pie"); - addItem(DelightfulItems.SOURCE_BERRY_PIE_SLICE, "Slice of Source Berry Pie"); - addItem(DelightfulItems.GLOOMGOURD_PIE_SLICE, "Slice of Gloomgourd Pie"); - addItem(DelightfulItems.GREEN_APPLE_PIE_SLICE, "Slice of Green Apple Pie"); - addItem(DelightfulItems.BLUEBERRY_PIE_SLICE, "Slice of Blueberry Pie"); - addItem(DelightfulItems.CANTALOUPE_SLICE, "Cantaloupe Slice"); - addItem(DelightfulItems.CANTALOUPE_SEEDS, "Cantaloupe Seeds"); - addItem(DelightfulItems.CANTALOUPE_BREAD, "Cantaloupe Bread"); - addItem(DelightfulItems.WRAPPED_CANTALOUPE, "Wrapped Cantaloupe"); - addItem(DelightfulItems.CANTALOUPE_POPSICLE, "Cantaloupe Popsicle"); - addItem(DelightfulItems.STUFFED_CANTALOUPE_BLOCK, "Stuffed Cantaloupe"); - addItem(DelightfulItems.STUFFED_CANTALOUPE, "Bowl of Stuffed Cantaloupe"); - addItem(DelightfulItems.MATCHA, "Matcha"); - addItem(DelightfulItems.MATCHA_ICE_CREAM, "Matcha Ice Cream"); - addItem(DelightfulItems.MATCHA_MILKSHAKE, "Matcha Milkshake"); - addItem(DelightfulItems.SALMONBERRY_ICE_CREAM, "Salmonberry Ice Cream"); - addItem(DelightfulItems.SALMONBERRY_MILKSHAKE, "Salmonberry Milkshake"); - addItem(DelightfulItems.ACORN, "Acorn"); - addItem(DelightfulItems.ROASTED_ACORN, "Roasted Acorn"); - addItem(DelightfulItems.NUT_DOUGH, "Nut Dough"); - addItem(DelightfulItems.ANIMAL_FAT, "Animal Fat"); - addItem(DelightfulItems.ANIMAL_OIL_BOTTLE, "Animal Oil Bottle"); - addItem(DelightfulItems.CHOPPED_CLOVER, "Chopped Clover"); - addItem(DelightfulItems.CACTUS_FLESH, "Cactus Chunk"); - addItem(DelightfulItems.CACTUS_STEAK, "Cactus Steak"); - addItem(DelightfulItems.CACTUS_CHILI, "Cactus Chili"); - addItem(DelightfulItems.CACTUS_SOUP, "Cactus Soup"); - addItem(DelightfulItems.CACTUS_SOUP_CUP, "Cactus Soup Cup"); - addItem(DelightfulItems.FIELD_SALAD, "Field Salad"); - addItem(DelightfulItems.ROCK_CANDY, "Rock Candy"); - addItem(DelightfulItems.VENISON_CHOPS, "Raw Venison Chops"); - addItem(DelightfulItems.COOKED_VENISON_CHOPS, "Cooked Venison Chops"); - addItem(DelightfulItems.RAW_GOAT, "Raw Chevon"); - addItem(DelightfulItems.COOKED_GOAT, "Cooked Chevon"); - addItem(DelightfulItems.COCONUT_CURRY, "Coconut Curry"); - addItem(DelightfulItems.SINIGANG, "Sinigang"); - addItem(DelightfulItems.SALMONBERRY_GUMMY, "Salmonberry Gummy"); - addItem(DelightfulItems.MATCHA_GUMMY, "Matcha Gummy"); - addItem(DelightfulItems.CANTALOUPE_GUMMY, "Cantaloupe Gummy"); - addBlock(DelightfulBlocks.MINI_MELON, "Mini Melon"); - addBlock(DelightfulBlocks.SLICED_MINI_MELON, "Sliced Mini Melon"); - addBlock(DelightfulBlocks.CANTALOUPE, "Cantaloupe"); - addBlock(DelightfulBlocks.CANTALOUPE_PLANT, "Cantaloupe Plant"); - addBlock(DelightfulBlocks.SLICED_CANTALOUPE, "Sliced Cantaloupe"); - addBlock(DelightfulBlocks.SLICED_MELON, "Sliced Melon"); - addBlock(DelightfulBlocks.SLICED_PUMPKIN, "Sliced Pumpkin"); - addBlock(DelightfulBlocks.SLICED_GLOOMGOURD, "Sliced Gloomgourd"); - addBlock(DelightfulBlocks.PUMPKIN_PIE, "Pumpkin Pie"); - addBlock(DelightfulBlocks.SOURCE_BERRY_PIE, "Source Berry Pie"); - addBlock(DelightfulBlocks.GLOOMGOURD_PIE, "Gloomgourd Pie"); - addBlock(DelightfulBlocks.GREEN_APPLE_PIE, "Green Apple Pie"); - addBlock(DelightfulBlocks.BLUEBERRY_PIE, "Blueberry Pie"); - addBlock(DelightfulBlocks.SALMONBERRY_PIE, "Salmonberry Pie"); - addBlock(DelightfulBlocks.SALMONBERRY_BUSH, "Salmonberry Bush"); - addBlock(DelightfulBlocks.WILD_SALMONBERRIES, "Wild Salmonberries"); - addBlock(DelightfulBlocks.QUARTZ_CABINET, "Quartz Cabinet"); - addBlock(DelightfulBlocks.BASALT_CABINET, "Basalt Cabinet"); - addBlock(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK, "Salmonberry Ice Cream Block"); - addBlock(DelightfulBlocks.SALMONBERRY_MILKSHAKE_CAULDRON, "Salmonberry Milkshake Cauldron"); - addBlock(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK, "Matcha Ice Cream Block"); - addBlock(DelightfulBlocks.MATCHA_MILKSHAKE_CAULDRON, "Matcha Milkshake Cauldron"); - addBlock(DelightfulBlocks.ACORN_SACK, "Acorn Sack"); - addBlock(DelightfulBlocks.SALMONBERRY_SACK, "Salmonberry Sack"); - addBlock(DelightfulBlocks.BLUEBERRY_SACK, "Blueberry Sack"); - addBlock(DelightfulBlocks.MENDOSTEEN_CRATE, "Mendosteen Crate"); - addBlock(DelightfulBlocks.BASTION_FRUIT_CRATE, "Bastion Fruit Crate"); - addBlock(DelightfulBlocks.FROSTAYA_CRATE, "Frostaya Crate"); - addBlock(DelightfulBlocks.BOMBEGRANATE_CRATE, "Bombegranate Crate"); - addBlock(DelightfulBlocks.GREEN_APPLE_CRATE, "Green Apple Crate"); - addBlock(DelightfulBlocks.YUCCA_FRUIT_CRATE, "Yucca Fruit Crate"); - addBlock(DelightfulBlocks.BAOBAB_FRUIT_CRATE, "Baobab Fruit Crate"); - addItem(DelightfulItems.AZALEA_TEA, "Azalea Tea"); - add("fluid_type." + Delightful.MODID + ".azalea_tea_type", "Azalea Tea"); - addItem(DelightfulItems.LAVENDER_TEA, "Lavender Tea"); - add("fluid_type." + Delightful.MODID + ".lavender_tea_type", "Lavender Tea"); - add("farmersdelight.tooltip.matcha_latte", "Minor Instant Health"); - add("farmersdelight.tooltip.berry_matcha_latte", "Minor Instant Health"); - add("farmersdelight.tooltip.ender_nectar", "Otherworldly"); - add("delightful.matcha.desc", "Green Tea Powder"); - add("delightful.green_tea_leaf.desc", "Get lucky using a Knife on any Leaves block."); - add("delightful.animal_fat.desc", "Can be scavenged from some dead animals."); - add("delightful.animal_oil_bottle.desc", "Use on any furnace for a small amount of heat."); - add("delightful.acorn.desc", "Acorns are tough nuts that drop from Oak Leaves or Squirrels."); - add("delightful.salmonberries.desc", "Salmonberries can be commonly found as a wild plant in forests."); - add("delightful.mini_melon.desc", "Mini Melons can be commonly found in plains. Can grow into a big Melon or be sliced with a Knife."); - add("delightful.cantaloupe.desc", "Cantaloupes can be commonly found on beaches."); - add("delightful.cantaloupe_seeds.desc", "Cantaloupe Seeds will sprout when planted in sand."); - add("delightful.sliceable.desc", "Sliceable with a Knife."); - add("delightful.placeable.desc", "Placeable"); - add("tooltip.config_disabled", "Disabled"); - add("tooltip.requires_tag", "Requires non-empty tag:"); - add("tooltip.requires_modid", "Requires modid:"); - add("tooltip.sneak_right", "Sneak R-Click for:"); - add("tooltip.furnace_fuel_burn_time", "s of burn time"); - add("tooltip.jade.age", "Age: %s"); - add("config.jade.plugin_delightful.crop_progress", "Crop Progress"); - add("config.jade.plugin_delightful.mushroom_colony", "Mushroom Colony"); - add("config.jade.plugin_delightful.pie_icons", "Pie Icons"); - } -} + @Override + protected void addTranslations() { + DelightfulItems.ITEMS.getEntries().stream() + .filter(reg -> reg.get() instanceof DelightfulKnifeItem) + .forEach(knife -> addItem(knife, ((DelightfulKnifeItem) knife.get()).getTranslation())); + addItems(); + } + + private void addItems() { + addItem(DelightfulItems.CHEESEBURGER, "Cheeseburger"); + addItem(DelightfulItems.DELUXE_CHEESEBURGER, "Deluxe Cheeseburger"); + addItem(DelightfulItems.MARSHMALLOW_STICK, "Marshmallow on a Stick"); + addItem(DelightfulItems.COOKED_MARSHMALLOW_STICK, "Roasted Marshmallow on a Stick"); + addItem(DelightfulItems.SMORE, "S'more"); + addItem(DelightfulItems.CRAB_RANGOON, "Crab Rangoon"); + addItem(DelightfulItems.PRICKLY_PEAR_JUICE, "Prickly Pear Juice"); + addItem(DelightfulItems.CHUNKWICH, "Chunkwich"); + addItem(DelightfulItems.JELLY_BOTTLE, "Jam Jar"); + addItem(DelightfulItems.GLOW_JELLY_BOTTLE, "Glow Jam Jar"); + addItem(DelightfulItems.NUT_BUTTER_BOTTLE, "Nut Butter Bottle"); + addItem(DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH, "Nut Butter and Jam Sandwich"); + addItem(DelightfulItems.ENDER_NECTAR, "Ender Nectar"); + addItem(DelightfulItems.HONEY_GLAZED_WALNUT, "Honey Glazed Walnut"); + addItem(DelightfulItems.MATCHA_LATTE, "Matcha Latte"); + addItem(DelightfulItems.BERRY_MATCHA_LATTE, "Iced Berry Matcha Latte"); + addItem(DelightfulItems.GREEN_TEA_LEAF, "Green Tea Leaves"); + addItem(DelightfulItems.SALMONBERRIES, "Salmonberries"); + addItem(DelightfulItems.SALMONBERRY_PIPS, "Salmonberry Pips"); + addItem(DelightfulItems.SALMONBERRY_PIE_SLICE, "Slice of Salmonberry Pie"); + addItem(DelightfulItems.PUMPKIN_PIE_SLICE, "Slice of Pumpkin Pie"); + addItem(DelightfulItems.SOURCE_BERRY_PIE_SLICE, "Slice of Source Berry Pie"); + addItem(DelightfulItems.GLOOMGOURD_PIE_SLICE, "Slice of Gloomgourd Pie"); + addItem(DelightfulItems.GREEN_APPLE_PIE_SLICE, "Slice of Green Apple Pie"); + addItem(DelightfulItems.BLUEBERRY_PIE_SLICE, "Slice of Blueberry Pie"); + addItem(DelightfulItems.CANTALOUPE_SLICE, "Cantaloupe Slice"); + addItem(DelightfulItems.CANTALOUPE_SEEDS, "Cantaloupe Seeds"); + addItem(DelightfulItems.CANTALOUPE_BREAD, "Cantaloupe Bread"); + addItem(DelightfulItems.WRAPPED_CANTALOUPE, "Wrapped Cantaloupe"); + addItem(DelightfulItems.CANTALOUPE_POPSICLE, "Cantaloupe Popsicle"); + addItem(DelightfulItems.STUFFED_CANTALOUPE_BLOCK, "Stuffed Cantaloupe"); + addItem(DelightfulItems.STUFFED_CANTALOUPE, "Bowl of Stuffed Cantaloupe"); + addItem(DelightfulItems.MATCHA, "Matcha"); + addItem(DelightfulItems.MATCHA_ICE_CREAM, "Matcha Ice Cream"); + addItem(DelightfulItems.MATCHA_MILKSHAKE, "Matcha Milkshake"); + addItem(DelightfulItems.SALMONBERRY_ICE_CREAM, "Salmonberry Ice Cream"); + addItem(DelightfulItems.SALMONBERRY_MILKSHAKE, "Salmonberry Milkshake"); + addItem(DelightfulItems.ACORN, "Acorn"); + addItem(DelightfulItems.ROASTED_ACORN, "Roasted Acorn"); + addItem(DelightfulItems.NUT_DOUGH, "Nut Dough"); + addItem(DelightfulItems.ANIMAL_FAT, "Animal Fat"); + addItem(DelightfulItems.ANIMAL_OIL_BOTTLE, "Animal Oil Bottle"); + addItem(DelightfulItems.CHOPPED_CLOVER, "Chopped Clover"); + addItem(DelightfulItems.CACTUS_FLESH, "Cactus Chunk"); + addItem(DelightfulItems.CACTUS_STEAK, "Cactus Steak"); + addItem(DelightfulItems.CACTUS_CHILI, "Cactus Chili"); + addItem(DelightfulItems.CACTUS_SOUP, "Cactus Soup"); + addItem(DelightfulItems.CACTUS_SOUP_CUP, "Cactus Soup Cup"); + addItem(DelightfulItems.FIELD_SALAD, "Field Salad"); + addItem(DelightfulItems.ROCK_CANDY, "Rock Candy"); + addItem(DelightfulItems.VENISON_CHOPS, "Raw Venison Chops"); + addItem(DelightfulItems.COOKED_VENISON_CHOPS, "Cooked Venison Chops"); + addItem(DelightfulItems.RAW_GOAT, "Raw Chevon"); + addItem(DelightfulItems.COOKED_GOAT, "Cooked Chevon"); + addItem(DelightfulItems.COCONUT_CURRY, "Coconut Curry"); + addItem(DelightfulItems.SINIGANG, "Sinigang"); + addItem(DelightfulItems.SALMONBERRY_GUMMY, "Salmonberry Gummy"); + addItem(DelightfulItems.MATCHA_GUMMY, "Matcha Gummy"); + addItem(DelightfulItems.CANTALOUPE_GUMMY, "Cantaloupe Gummy"); + addBlock(DelightfulBlocks.MINI_MELON, "Mini Melon"); + addBlock(DelightfulBlocks.SLICED_MINI_MELON, "Sliced Mini Melon"); + addBlock(DelightfulBlocks.CANTALOUPE, "Cantaloupe"); + addBlock(DelightfulBlocks.CANTALOUPE_PLANT, "Cantaloupe Plant"); + addBlock(DelightfulBlocks.SLICED_CANTALOUPE, "Sliced Cantaloupe"); + addBlock(DelightfulBlocks.SLICED_MELON, "Sliced Melon"); + addBlock(DelightfulBlocks.SLICED_PUMPKIN, "Sliced Pumpkin"); + addBlock(DelightfulBlocks.SLICED_GLOOMGOURD, "Sliced Gloomgourd"); + addBlock(DelightfulBlocks.PUMPKIN_PIE, "Pumpkin Pie"); + addBlock(DelightfulBlocks.SOURCE_BERRY_PIE, "Source Berry Pie"); + addBlock(DelightfulBlocks.GLOOMGOURD_PIE, "Gloomgourd Pie"); + addBlock(DelightfulBlocks.GREEN_APPLE_PIE, "Green Apple Pie"); + addBlock(DelightfulBlocks.BLUEBERRY_PIE, "Blueberry Pie"); + addBlock(DelightfulBlocks.SALMONBERRY_PIE, "Salmonberry Pie"); + addBlock(DelightfulBlocks.SALMONBERRY_BUSH, "Salmonberry Bush"); + addBlock(DelightfulBlocks.WILD_SALMONBERRIES, "Wild Salmonberries"); + addBlock(DelightfulBlocks.QUARTZ_CABINET, "Quartz Cabinet"); + addBlock(DelightfulBlocks.BASALT_CABINET, "Basalt Cabinet"); + addBlock(DelightfulBlocks.SALMONBERRY_ICE_CREAM_BLOCK, "Salmonberry Ice Cream Block"); + addBlock(DelightfulBlocks.SALMONBERRY_MILKSHAKE_CAULDRON, "Salmonberry Milkshake Cauldron"); + addBlock(DelightfulBlocks.MATCHA_ICE_CREAM_BLOCK, "Matcha Ice Cream Block"); + addBlock(DelightfulBlocks.MATCHA_MILKSHAKE_CAULDRON, "Matcha Milkshake Cauldron"); + addBlock(DelightfulBlocks.ACORN_SACK, "Acorn Sack"); + addBlock(DelightfulBlocks.SALMONBERRY_SACK, "Salmonberry Sack"); + addBlock(DelightfulBlocks.BLUEBERRY_SACK, "Blueberry Sack"); + addBlock(DelightfulBlocks.MENDOSTEEN_CRATE, "Mendosteen Crate"); + addBlock(DelightfulBlocks.BASTION_FRUIT_CRATE, "Bastion Fruit Crate"); + addBlock(DelightfulBlocks.FROSTAYA_CRATE, "Frostaya Crate"); + addBlock(DelightfulBlocks.BOMBEGRANATE_CRATE, "Bombegranate Crate"); + addBlock(DelightfulBlocks.GREEN_APPLE_CRATE, "Green Apple Crate"); + addBlock(DelightfulBlocks.YUCCA_FRUIT_CRATE, "Yucca Fruit Crate"); + addBlock(DelightfulBlocks.BAOBAB_FRUIT_CRATE, "Baobab Fruit Crate"); + addItem(DelightfulItems.AZALEA_TEA, "Azalea Tea"); + add("fluid_type." + Delightful.MODID + ".azalea_tea_type", "Azalea Tea"); + addItem(DelightfulItems.LAVENDER_TEA, "Lavender Tea"); + add("fluid_type." + Delightful.MODID + ".lavender_tea_type", "Lavender Tea"); + add("farmersdelight.tooltip.matcha_latte", "Minor Instant Health"); + add("farmersdelight.tooltip.berry_matcha_latte", "Minor Instant Health"); + add("farmersdelight.tooltip.ender_nectar", "Otherworldly"); + add("delightful.matcha.desc", "Green Tea Powder"); + add("delightful.green_tea_leaf.desc", "Get lucky using a Knife on any Leaves block."); + add("delightful.animal_fat.desc", "Can be scavenged from some dead animals."); + add("delightful.animal_oil_bottle.desc", "Use on any furnace for a small amount of heat."); + add("delightful.acorn.desc", "Acorns are tough nuts that drop from Oak Leaves or Squirrels."); + add("delightful.salmonberries.desc", "Salmonberries can be commonly found as a wild plant in forests."); + add("delightful.mini_melon.desc", "Mini Melons can be commonly found in plains. Can grow into a big Melon or be sliced with a Knife."); + add("delightful.cantaloupe.desc", "Cantaloupes can be commonly found on beaches."); + add("delightful.cantaloupe_seeds.desc", "Cantaloupe Seeds will sprout when planted in sand."); + add("delightful.sliceable.desc", "Sliceable with a Knife."); + add("delightful.placeable.desc", "Placeable"); + add("tooltip.config_disabled", "Disabled"); + add("tooltip.requires_tag", "Requires non-empty tag:"); + add("tooltip.requires_modid", "Requires modid:"); + add("tooltip.sneak_right", "Sneak R-Click for:"); + add("tooltip.furnace_fuel_burn_time", "s of burn time"); + add("tooltip.jade.age", "Age: %s"); + add("config.jade.plugin_delightful.crop_progress", "Crop Progress"); + add("config.jade.plugin_delightful.mushroom_colony", "Mushroom Colony"); + add("config.jade.plugin_delightful.pie_icons", "Pie Icons"); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLootModifierProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLootModifierProvider.java index 39511856..2ebe694d 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLootModifierProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulLootModifierProvider.java @@ -1,6 +1,5 @@ package net.brnbrd.delightful.data.gen; -import alabaster.crabbersdelight.CrabbersDelight; import net.brnbrd.delightful.Delightful; import net.brnbrd.delightful.common.item.DelightfulItems; import net.brnbrd.delightful.common.loot.*; @@ -25,96 +24,96 @@ public DelightfulLootModifierProvider(PackOutput output) { @Override protected void start() { add("green_tea_leaf", new CompatAddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("green_tea_leaf"), - LootItemRandomChanceCondition.randomChance(0.08F).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_GREEN_TEA_LEAF) - }, - DelightfulItems.GREEN_TEA_LEAF.get(), 1, 1, true, Mods.FR, false + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("green_tea_leaf"), + LootItemRandomChanceCondition.randomChance(0.08F).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_GREEN_TEA_LEAF) + }, + DelightfulItems.GREEN_TEA_LEAF.get(), 1, 1, true, Mods.FR, false )); add("green_tea_leaf_rare", new CompatAddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("green_tea_leaf"), - LootItemRandomChanceCondition.randomChance(0.005F).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).invert().build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_GREEN_TEA_LEAF) - }, - DelightfulItems.GREEN_TEA_LEAF.get(), 1, 1, true, Mods.FR, false + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("green_tea_leaf"), + LootItemRandomChanceCondition.randomChance(0.005F).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).invert().build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_GREEN_TEA_LEAF) + }, + DelightfulItems.GREEN_TEA_LEAF.get(), 1, 1, true, Mods.FR, false )); add("acorn", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("acorn"), - LootItemRandomChanceCondition.randomChance(0.01F).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().of(Tags.Items.SHEARS)).invert().build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY))).invert().build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_ACORN) - }, - DelightfulItems.ACORN.get(), 1, 1, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("acorn"), + LootItemRandomChanceCondition.randomChance(0.01F).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().of(Tags.Items.SHEARS)).invert().build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY))).invert().build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_ACORN) + }, + DelightfulItems.ACORN.get(), 1, 1, true )); add("acorn_from_knife", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("acorn"), - LootItemRandomChanceCondition.randomChance(0.05F).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY))).invert().build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_ACORN) - }, - DelightfulItems.ACORN.get(), 1, 1, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("acorn"), + LootItemRandomChanceCondition.randomChance(0.05F).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY))).invert().build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_ACORN) + }, + DelightfulItems.ACORN.get(), 1, 1, true )); add("acorn_from_squirrel", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("acorn"), - LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.4F, 2.0F).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_ACORN)).build() - }, - DelightfulItems.ACORN.get(), 1, 1, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("acorn"), + LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.4F, 2.0F).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_ACORN)).build() + }, + DelightfulItems.ACORN.get(), 1, 1, true )); add("acorn_from_drops", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("acorn"), - LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.4F, 2.0F).build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.ADD_ACORN) - }, - DelightfulItems.ACORN.get(), 1, 1, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("acorn"), + LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.4F, 2.0F).build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.ADD_ACORN) + }, + DelightfulItems.ACORN.get(), 1, 1, true )); add("animal_fat", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("animal_fat"), - LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.6F, 2.0F).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.KILLER_PLAYER, - EntityPredicate.Builder.entity().equipment( - EntityEquipmentPredicate.Builder.equipment().mainhand(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING).build()).build()).build()).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.FATTY_ANIMALS)).build() - }, - DelightfulItems.ANIMAL_FAT.get(), 1, 3, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("animal_fat"), + LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.6F, 2.0F).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.KILLER_PLAYER, + EntityPredicate.Builder.entity().equipment( + EntityEquipmentPredicate.Builder.equipment().mainhand(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING).build()).build()).build()).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.FATTY_ANIMALS)).build() + }, + DelightfulItems.ANIMAL_FAT.get(), 1, 3, true )); add("raw_goat", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemEnabledCondition.enabled("raw_goat"), - LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(1.0F, 2.0F).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_RAW_GOAT)).build() - }, - DelightfulItems.RAW_GOAT.get(), 1, 2, true + new LootItemCondition[]{ + LootItemEnabledCondition.enabled("raw_goat"), + LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(1.0F, 2.0F).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_RAW_GOAT)).build() + }, + DelightfulItems.RAW_GOAT.get(), 1, 2, true )); add("straw_from_compat", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemRandomChanceCondition.randomChance(0.2F).build(), - MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), - LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_STRAW) - }, - ModItems.STRAW.get(), 1, 1, true + new LootItemCondition[]{ + LootItemRandomChanceCondition.randomChance(0.2F).build(), + MatchTool.toolMatches(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING)).build(), + LootItemBlockIsTagCondition.isTag(DelightfulBlockTags.DROPS_STRAW) + }, + ModItems.STRAW.get(), 1, 1, true )); add("crab_legs_from_crab_crabbersdelight", new AddItemLootModifier( - new LootItemCondition[]{ - LootItemModLoadedCondition.loaded("crabbersdelight"), - LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(1.0F, 1.5F).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.KILLER_PLAYER, - EntityPredicate.Builder.entity().equipment( - EntityEquipmentPredicate.Builder.equipment().mainhand(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING).build()).build()).build()).build(), - LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_CRAB_LEGS)).build() - }, - alabaster.crabbersdelight.common.registry.ModItems.CRAB_LEGS.get(), 1, 3, true + new LootItemCondition[]{ + LootItemModLoadedCondition.loaded("crabbersdelight"), + LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(1.0F, 1.5F).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.KILLER_PLAYER, + EntityPredicate.Builder.entity().equipment( + EntityEquipmentPredicate.Builder.equipment().mainhand(ItemPredicate.Builder.item().of(DelightfulItemTags.TOOLS_SCAVENGING).build()).build()).build()).build(), + LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().of(DelightfulEntityTags.DROPS_CRAB_LEGS)).build() + }, + alabaster.crabbersdelight.common.registry.ModItems.CRAB_LEGS.get(), 1, 3, true )); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulRecipeProvider.java b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulRecipeProvider.java index a4f88dd1..2c880584 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/DelightfulRecipeProvider.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/DelightfulRecipeProvider.java @@ -1,6 +1,5 @@ package net.brnbrd.delightful.data.gen; -import com.sammy.minersdelight.setup.MDItems; import net.brnbrd.delightful.Delightful; import net.brnbrd.delightful.Util; import net.brnbrd.delightful.common.block.DelightfulBlocks; @@ -32,7 +31,6 @@ import net.minecraftforge.registries.RegistryObject; import org.apache.commons.lang3.ArrayUtils; import org.jetbrains.annotations.NotNull; -import vectorwing.farmersdelight.FarmersDelight; import vectorwing.farmersdelight.client.recipebook.CookingPotRecipeBookTab; import vectorwing.farmersdelight.common.registry.ModBlocks; import vectorwing.farmersdelight.common.registry.ModItems; @@ -46,726 +44,726 @@ import java.util.function.Supplier; public class DelightfulRecipeProvider extends RecipeProvider implements IConditionBuilder { - public DelightfulRecipeProvider(PackOutput output) { - super(output); - } + public DelightfulRecipeProvider(PackOutput output) { + super(output); + } - @Override - protected void buildRecipes(@NotNull Consumer finished) { - // Cabinets - cabinet(DelightfulBlocks.QUARTZ_CABINET.get(), ModBlocks.WARPED_CABINET.get(), Blocks.POLISHED_BLACKSTONE, finished); - cabinet(DelightfulBlocks.BASALT_CABINET.get(), ModBlocks.CRIMSON_CABINET.get(), Blocks.POLISHED_BLACKSTONE, finished); + @Override + protected void buildRecipes(@NotNull Consumer finished) { + // Cabinets + cabinet(DelightfulBlocks.QUARTZ_CABINET.get(), ModBlocks.WARPED_CABINET.get(), Blocks.POLISHED_BLACKSTONE, finished); + cabinet(DelightfulBlocks.BASALT_CABINET.get(), ModBlocks.CRIMSON_CABINET.get(), Blocks.POLISHED_BLACKSTONE, finished); - // Knives - DelightfulItems.ITEMS.getEntries().stream() - .map(RegistryObject::get) - .filter(item -> item instanceof DelightfulKnifeItem) - .map(item -> (DelightfulKnifeItem) item) - .filter(knife -> knife.getTag() != null && knife.getRecipeType() != null) - .forEach(k -> knife(k, finished)); - knifeSmeltAndBlast((DelightfulKnifeItem) Knives.BONE.get(), "bone/knife", Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(Items.BONE_MEAL)), finished); + // Knives + DelightfulItems.ITEMS.getEntries().stream() + .map(RegistryObject::get) + .filter(item -> item instanceof DelightfulKnifeItem) + .map(item -> (DelightfulKnifeItem) item) + .filter(knife -> knife.getTag() != null && knife.getRecipeType() != null) + .forEach(k -> knife(k, finished)); + knifeSmeltAndBlast((DelightfulKnifeItem) Knives.BONE.get(), "bone/knife", Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(Items.BONE_MEAL)), finished); - // Smelting - foodSmeltingRecipes("cactus_steak", DelightfulItems.CACTUS_FLESH.get(), DelightfulItems.CACTUS_STEAK.get(), 0.35F, finished); - foodSmeltingRecipes("cooked_venison_chops", DelightfulItems.VENISON_CHOPS.get(), DelightfulItems.COOKED_VENISON_CHOPS.get(), 0.35F, finished); - foodSmeltingRecipes("cooked_goat", DelightfulItems.RAW_GOAT.get(), DelightfulItems.COOKED_GOAT.get(), 0.35F, finished); - foodSmeltingRecipes("roasted_acorn", DelightfulItems.ACORN.get(), DelightfulItems.ROASTED_ACORN.get(), 0.35F, finished); + // Smelting + foodSmeltingRecipes("cactus_steak", DelightfulItems.CACTUS_FLESH.get(), DelightfulItems.CACTUS_STEAK.get(), 0.35F, finished); + foodSmeltingRecipes("cooked_venison_chops", DelightfulItems.VENISON_CHOPS.get(), DelightfulItems.COOKED_VENISON_CHOPS.get(), 0.35F, finished); + foodSmeltingRecipes("cooked_goat", DelightfulItems.RAW_GOAT.get(), DelightfulItems.COOKED_GOAT.get(), 0.35F, finished); + foodSmeltingRecipes("roasted_acorn", DelightfulItems.ACORN.get(), DelightfulItems.ROASTED_ACORN.get(), 0.35F, finished); - // Foods - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH.get()) - .requires(ForgeTags.BREAD) - .requires(DelightfulItemTags.NUT_BUTTER) - .requires(DelightfulItemTags.JAMS) - .unlockedBy("has_nut_butter", has(DelightfulItems.NUT_BUTTER_BOTTLE.get())), - "food/nut_butter_and_jelly_sandwich", finished, enabled("nut_butter_and_jelly_sandwich"), not(tagEmpty(DelightfulItemTags.NUTS)), tagEmpty(DelightfulItemTags.BREAD_SLICES)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH.get()) - .requires(DelightfulItemTags.BREAD_SLICES) - .requires(DelightfulItemTags.NUT_BUTTER) - .requires(DelightfulItemTags.JAMS) - .requires(DelightfulItemTags.BREAD_SLICES) - .unlockedBy("has_nut_butter", has(DelightfulItems.NUT_BUTTER_BOTTLE.get())), - "food/nut_butter_and_jelly_sandwich_from_bread_slice", finished, enabled("nut_butter_and_jelly_sandwich"), not(tagEmpty(DelightfulItemTags.NUTS)), not(tagEmpty(DelightfulItemTags.BREAD_SLICES))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) - .requires(ForgeTags.BREAD) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_cheese", has(DelightfulItemTags.CHEESE)), - "food/cheeseburger", finished, enabled("cheeseburger"), tagEmpty(DelightfulItemTags.BURGER_BUN), not(tagEmpty(DelightfulItemTags.CHEESE)), not(modLoaded(Mods.VD))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) - .requires(ForgeTags.BREAD) - .requires(ModItems.BEEF_PATTY.get()) - .requires(ForgeTags.MILK) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_beef_patty_and_cheese", has(ModItems.BEEF_PATTY.get(), Items.MILK_BUCKET)), - "food/cheeseburger_from_milk", finished, enabled("cheeseburger"), tagEmpty(DelightfulItemTags.CHEESE)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) - .requires(DelightfulItemTags.BURGER_BUN) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_beef_patty_and_cheese", has(ModItems.BEEF_PATTY.get(), Items.MILK_BUCKET)), - "food/cheeseburger_from_bun", finished, enabled("cheeseburger"), not(tagEmpty(DelightfulItemTags.BURGER_BUN)), not(tagEmpty(DelightfulItemTags.CHEESE)), not(modLoaded(Mods.VD))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) - .requires(ForgeTags.BREAD) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ModItems.COOKED_BACON.get()) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), - "food/deluxe_cheeseburger", finished, enabled("deluxe_cheeseburger"), tagEmpty(DelightfulItemTags.BURGER_BUN), not(tagEmpty(DelightfulItemTags.CHEESE))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) - .requires(ForgeTags.BREAD) - .requires(ModItems.BEEF_PATTY.get()) - .requires(ForgeTags.MILK) - .requires(ModItems.BEEF_PATTY.get()) - .requires(ForgeTags.MILK) - .requires(ModItems.COOKED_BACON.get()) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), - "food/deluxe_cheeseburger_from_milk", finished, enabled("deluxe_cheeseburger"), tagEmpty(DelightfulItemTags.CHEESE)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) - .requires(DelightfulItemTags.BURGER_BUN) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ModItems.BEEF_PATTY.get()) - .requires(DelightfulItemTags.CHEESE) - .requires(ModItems.COOKED_BACON.get()) - .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .requires(ForgeTags.VEGETABLES_TOMATO) - .requires(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), - "food/deluxe_cheeseburger_from_bun", finished, enabled("deluxe_cheeseburger"), not(tagEmpty(DelightfulItemTags.BURGER_BUN)), not(tagEmpty(DelightfulItemTags.CHEESE))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MARSHMALLOW_STICK.get(), 2) - .requires(DelightfulItemTags.SUGAR) - .requires(DelightfulItemTags.WATER) - .requires(Ingredient.of(Tags.Items.RODS_WOODEN), 2) - .unlockedBy("has_sugar", has(DelightfulItemTags.SUGAR)), - "food/marshmallow_stick", finished, enabled("marshmallow_stick"), not(modLoaded("create_confectionery"))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SMORE.get()) - .requires(ModItems.HONEY_COOKIE.get()) - .requires(Items.COCOA_BEANS) - .requires(ForgeTags.MILK) - .requires(DelightfulItemTags.SUGAR) - .requires(DelightfulItems.COOKED_MARSHMALLOW_STICK.get()) - .requires(ModItems.HONEY_COOKIE.get()) - .unlockedBy("has_cooked_marshmallow_stick", has(DelightfulItems.COOKED_MARSHMALLOW_STICK.get())), - "food/smore", finished, enabled("smore"), tagEmpty(DelightfulItemTags.CHOCOLATE)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SMORE.get()) - .requires(ModItems.HONEY_COOKIE.get()) - .requires(DelightfulItemTags.CHOCOLATE) - .requires(DelightfulItems.COOKED_MARSHMALLOW_STICK.get()) - .requires(ModItems.HONEY_COOKIE.get()) - .unlockedBy("has_cooked_marshmallow_stick", has(DelightfulItems.COOKED_MARSHMALLOW_STICK.get())), - "food/smore_from_chocolate", finished, enabled("smore"), not(tagEmpty(DelightfulItemTags.CHOCOLATE))); - wrap(SimpleCookingRecipeBuilder.campfireCooking(Ingredient.of(DelightfulItems.MARSHMALLOW_STICK.get()), RecipeCategory.FOOD, - DelightfulItems.COOKED_MARSHMALLOW_STICK.get(), 0.5F, 600) - .unlockedBy("has_marshmallow_stick", has(DelightfulItems.MARSHMALLOW_STICK.get())), - "campfire/marshmallow_stick", finished, enabled("cooked_marshmallow_stick")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.HONEY_GLAZED_WALNUT.get(), 2) - .requires(Ingredient.of(DelightfulItemTags.NUTS_WALNUT), 2) - .requires(Items.HONEY_BOTTLE) - .unlockedBy("has_walnut", has(DelightfulItemTags.NUTS_WALNUT)), - "food/honey_glazed_walnut", finished, enabled(DelightfulItems.HONEY_GLAZED_WALNUT), not(tagEmpty(DelightfulItemTags.NUTS_WALNUT))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.MATCHA_LATTE.get(), 1, CookingRecipes.FAST_COOKING, 0.35F, Items.HONEY_BOTTLE) - .addIngredient(Ingredient.of(ForgeTags.MILK)) - .addIngredient(Ingredient.of(DelightfulItemTags.MATCHA)) - .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), - "cooking/matcha_latte", finished, enabled("matcha_latte")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.BERRY_MATCHA_LATTE.get(), 1) - .requires(Items.GLASS_BOTTLE) - .requires(Items.HONEY_BOTTLE) - .requires(ForgeTags.MILK) - .requires(DelightfulItemTags.MATCHA) - .requires(ForgeTags.BERRIES) - .requires(Items.ICE) - .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), - "food/berry_matcha_latte", finished, enabled("berry_matcha_latte"), tagEmpty(DelightfulItemTags.ICE_CUBES)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.BERRY_MATCHA_LATTE.get(), 1) - .requires(Items.GLASS_BOTTLE) - .requires(Items.HONEY_BOTTLE) - .requires(ForgeTags.MILK) - .requires(DelightfulItemTags.MATCHA) - .requires(ForgeTags.BERRIES) - .requires(DelightfulItemTags.ICE_CUBES) - .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), - "food/berry_matcha_latte_neapolitan", finished, enabled("berry_matcha_latte"), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.FIELD_SALAD.get(), 1) - .requires(Items.BOWL) - .requires(Ingredient.of(ForgeTags.SALAD_INGREDIENTS), 2) - .requires(DelightfulItems.CACTUS_STEAK.get()) - .requires(ForgeTags.VEGETABLES_CARROT) - .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) - .requires(DelightfulItems.ROASTED_ACORN.get()) - .unlockedBy("has_cactus_steak", has(DelightfulItems.CACTUS_STEAK.get())), - "food/field_salad", finished, enabled("field_salad")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_DOUGH.get(), 2) - .requires(DelightfulItemTags.EGGS_BIRD) - .requires(Items.BONE_MEAL) - .requires(DelightfulItemTags.NUT_BUTTER) - .requires(DelightfulItemTags.NUT_BUTTER) - .unlockedBy("has_nut_butter", has(DelightfulItemTags.NUT_BUTTER)), - "food/nut_dough", finished, enabled("nut_dough")); + // Foods + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH.get()) + .requires(ForgeTags.BREAD) + .requires(DelightfulItemTags.NUT_BUTTER) + .requires(DelightfulItemTags.JAMS) + .unlockedBy("has_nut_butter", has(DelightfulItems.NUT_BUTTER_BOTTLE.get())), + "food/nut_butter_and_jelly_sandwich", finished, enabled("nut_butter_and_jelly_sandwich"), not(tagEmpty(DelightfulItemTags.NUTS)), tagEmpty(DelightfulItemTags.BREAD_SLICES)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_BUTTER_AND_JELLY_SANDWICH.get()) + .requires(DelightfulItemTags.BREAD_SLICES) + .requires(DelightfulItemTags.NUT_BUTTER) + .requires(DelightfulItemTags.JAMS) + .requires(DelightfulItemTags.BREAD_SLICES) + .unlockedBy("has_nut_butter", has(DelightfulItems.NUT_BUTTER_BOTTLE.get())), + "food/nut_butter_and_jelly_sandwich_from_bread_slice", finished, enabled("nut_butter_and_jelly_sandwich"), not(tagEmpty(DelightfulItemTags.NUTS)), not(tagEmpty(DelightfulItemTags.BREAD_SLICES))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) + .requires(ForgeTags.BREAD) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_cheese", has(DelightfulItemTags.CHEESE)), + "food/cheeseburger", finished, enabled("cheeseburger"), tagEmpty(DelightfulItemTags.BURGER_BUN), not(tagEmpty(DelightfulItemTags.CHEESE)), not(modLoaded(Mods.VD))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) + .requires(ForgeTags.BREAD) + .requires(ModItems.BEEF_PATTY.get()) + .requires(ForgeTags.MILK) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_beef_patty_and_cheese", has(ModItems.BEEF_PATTY.get(), Items.MILK_BUCKET)), + "food/cheeseburger_from_milk", finished, enabled("cheeseburger"), tagEmpty(DelightfulItemTags.CHEESE)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CHEESEBURGER.get()) + .requires(DelightfulItemTags.BURGER_BUN) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_beef_patty_and_cheese", has(ModItems.BEEF_PATTY.get(), Items.MILK_BUCKET)), + "food/cheeseburger_from_bun", finished, enabled("cheeseburger"), not(tagEmpty(DelightfulItemTags.BURGER_BUN)), not(tagEmpty(DelightfulItemTags.CHEESE)), not(modLoaded(Mods.VD))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) + .requires(ForgeTags.BREAD) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ModItems.COOKED_BACON.get()) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), + "food/deluxe_cheeseburger", finished, enabled("deluxe_cheeseburger"), tagEmpty(DelightfulItemTags.BURGER_BUN), not(tagEmpty(DelightfulItemTags.CHEESE))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) + .requires(ForgeTags.BREAD) + .requires(ModItems.BEEF_PATTY.get()) + .requires(ForgeTags.MILK) + .requires(ModItems.BEEF_PATTY.get()) + .requires(ForgeTags.MILK) + .requires(ModItems.COOKED_BACON.get()) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), + "food/deluxe_cheeseburger_from_milk", finished, enabled("deluxe_cheeseburger"), tagEmpty(DelightfulItemTags.CHEESE)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.DELUXE_CHEESEBURGER.get()) + .requires(DelightfulItemTags.BURGER_BUN) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ModItems.BEEF_PATTY.get()) + .requires(DelightfulItemTags.CHEESE) + .requires(ModItems.COOKED_BACON.get()) + .requires(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .requires(ForgeTags.VEGETABLES_TOMATO) + .requires(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_bacon", has(ModItems.COOKED_BACON.get())), + "food/deluxe_cheeseburger_from_bun", finished, enabled("deluxe_cheeseburger"), not(tagEmpty(DelightfulItemTags.BURGER_BUN)), not(tagEmpty(DelightfulItemTags.CHEESE))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MARSHMALLOW_STICK.get(), 2) + .requires(DelightfulItemTags.SUGAR) + .requires(DelightfulItemTags.WATER) + .requires(Ingredient.of(Tags.Items.RODS_WOODEN), 2) + .unlockedBy("has_sugar", has(DelightfulItemTags.SUGAR)), + "food/marshmallow_stick", finished, enabled("marshmallow_stick"), not(modLoaded("create_confectionery"))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SMORE.get()) + .requires(ModItems.HONEY_COOKIE.get()) + .requires(Items.COCOA_BEANS) + .requires(ForgeTags.MILK) + .requires(DelightfulItemTags.SUGAR) + .requires(DelightfulItems.COOKED_MARSHMALLOW_STICK.get()) + .requires(ModItems.HONEY_COOKIE.get()) + .unlockedBy("has_cooked_marshmallow_stick", has(DelightfulItems.COOKED_MARSHMALLOW_STICK.get())), + "food/smore", finished, enabled("smore"), tagEmpty(DelightfulItemTags.CHOCOLATE)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SMORE.get()) + .requires(ModItems.HONEY_COOKIE.get()) + .requires(DelightfulItemTags.CHOCOLATE) + .requires(DelightfulItems.COOKED_MARSHMALLOW_STICK.get()) + .requires(ModItems.HONEY_COOKIE.get()) + .unlockedBy("has_cooked_marshmallow_stick", has(DelightfulItems.COOKED_MARSHMALLOW_STICK.get())), + "food/smore_from_chocolate", finished, enabled("smore"), not(tagEmpty(DelightfulItemTags.CHOCOLATE))); + wrap(SimpleCookingRecipeBuilder.campfireCooking(Ingredient.of(DelightfulItems.MARSHMALLOW_STICK.get()), RecipeCategory.FOOD, + DelightfulItems.COOKED_MARSHMALLOW_STICK.get(), 0.5F, 600) + .unlockedBy("has_marshmallow_stick", has(DelightfulItems.MARSHMALLOW_STICK.get())), + "campfire/marshmallow_stick", finished, enabled("cooked_marshmallow_stick")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.HONEY_GLAZED_WALNUT.get(), 2) + .requires(Ingredient.of(DelightfulItemTags.NUTS_WALNUT), 2) + .requires(Items.HONEY_BOTTLE) + .unlockedBy("has_walnut", has(DelightfulItemTags.NUTS_WALNUT)), + "food/honey_glazed_walnut", finished, enabled(DelightfulItems.HONEY_GLAZED_WALNUT), not(tagEmpty(DelightfulItemTags.NUTS_WALNUT))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.MATCHA_LATTE.get(), 1, CookingRecipes.FAST_COOKING, 0.35F, Items.HONEY_BOTTLE) + .addIngredient(Ingredient.of(ForgeTags.MILK)) + .addIngredient(Ingredient.of(DelightfulItemTags.MATCHA)) + .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), + "cooking/matcha_latte", finished, enabled("matcha_latte")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.BERRY_MATCHA_LATTE.get(), 1) + .requires(Items.GLASS_BOTTLE) + .requires(Items.HONEY_BOTTLE) + .requires(ForgeTags.MILK) + .requires(DelightfulItemTags.MATCHA) + .requires(ForgeTags.BERRIES) + .requires(Items.ICE) + .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), + "food/berry_matcha_latte", finished, enabled("berry_matcha_latte"), tagEmpty(DelightfulItemTags.ICE_CUBES)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.BERRY_MATCHA_LATTE.get(), 1) + .requires(Items.GLASS_BOTTLE) + .requires(Items.HONEY_BOTTLE) + .requires(ForgeTags.MILK) + .requires(DelightfulItemTags.MATCHA) + .requires(ForgeTags.BERRIES) + .requires(DelightfulItemTags.ICE_CUBES) + .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), + "food/berry_matcha_latte_neapolitan", finished, enabled("berry_matcha_latte"), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.FIELD_SALAD.get(), 1) + .requires(Items.BOWL) + .requires(Ingredient.of(ForgeTags.SALAD_INGREDIENTS), 2) + .requires(DelightfulItems.CACTUS_STEAK.get()) + .requires(ForgeTags.VEGETABLES_CARROT) + .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) + .requires(DelightfulItems.ROASTED_ACORN.get()) + .unlockedBy("has_cactus_steak", has(DelightfulItems.CACTUS_STEAK.get())), + "food/field_salad", finished, enabled("field_salad")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.NUT_DOUGH.get(), 2) + .requires(DelightfulItemTags.EGGS_BIRD) + .requires(Items.BONE_MEAL) + .requires(DelightfulItemTags.NUT_BUTTER) + .requires(DelightfulItemTags.NUT_BUTTER) + .unlockedBy("has_nut_butter", has(DelightfulItemTags.NUT_BUTTER)), + "food/nut_dough", finished, enabled("nut_dough")); - sack(DelightfulItems.ACORN_SACK, DelightfulItems.ACORN, "acorn", finished); - sack(DelightfulItems.SALMONBERRY_SACK, DelightfulItems.SALMONBERRIES, "salmonberry", finished); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_ICE_CREAM.get(), 1) - .requires(Items.BOWL) - .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) - .requires(ForgeTags.MILK) - .requires(DelightfulItemTags.ICE_CUBES) - .requires(DelightfulItemTags.SUGAR) - .unlockedBy("has_ice_cubes", has(DelightfulItemTags.ICE_CUBES)), - "food/salmonberry_ice_cream", finished, enabled("salmonberry_ice_cream"), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_ICE_CREAM.get(), 1) - .requires(Items.BOWL) - .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) - .requires(ForgeTags.MILK) - .requires(Items.ICE) - .requires(DelightfulItemTags.SUGAR) - .unlockedBy("has_ice", has(Items.ICE)), - "food/salmonberry_ice_cream_no_neapolitan", finished, enabled("salmonberry_ice_cream"), tagEmpty(DelightfulItemTags.ICE_CUBES)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_MILKSHAKE.get(), 3) - .requires(Items.GLASS_BOTTLE, 3) - .requires(DelightfulItems.SALMONBERRY_ICE_CREAM.get()) - .requires(ForgeTags.MILK) - .unlockedBy("has_salmonberry_ice_cream", has(DelightfulItems.SALMONBERRY_ICE_CREAM.get())), - "food/salmonberry_milkshake", finished, enabled(DelightfulItems.SALMONBERRY_MILKSHAKE), enabled(DelightfulItems.SALMONBERRY_ICE_CREAM)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_ICE_CREAM.get(), 1) - .requires(Items.BOWL) - .requires(DelightfulItemTags.MATCHA) - .requires(ForgeTags.MILK) - .requires(DelightfulItemTags.ICE_CUBES) - .requires(DelightfulItemTags.SUGAR) - .unlockedBy("has_ice_cubes", has(DelightfulItemTags.ICE_CUBES)), - "food/matcha_ice_cream", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_ICE_CREAM.get(), 1) - .requires(Items.BOWL) - .requires(DelightfulItemTags.MATCHA) - .requires(ForgeTags.MILK) - .requires(Items.ICE) - .requires(DelightfulItemTags.SUGAR) - .unlockedBy("has_ice", has(Items.ICE)), - "food/matcha_ice_cream_no_neapolitan", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM), tagEmpty(DelightfulItemTags.ICE_CUBES)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_MILKSHAKE.get(), 3) - .requires(Items.GLASS_BOTTLE, 3) - .requires(DelightfulItems.MATCHA_ICE_CREAM.get()) - .requires(ForgeTags.MILK) - .unlockedBy("has_matcha_ice_cream", has(DelightfulItems.MATCHA_ICE_CREAM.get())), - "food/matcha_milkshake", finished, enabled(DelightfulItems.MATCHA_MILKSHAKE), enabled(DelightfulItems.MATCHA_ICE_CREAM)); - wrap(ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_PIE.get(), 1) - .pattern("###") - .pattern("aaa") - .pattern("xOx") - .define('#', ForgeTags.GRAIN_WHEAT) - .define('a', DelightfulItemTags.FRUITS_SALMONBERRIES) - .define('x', DelightfulItemTags.SUGAR) - .define('O', ModItems.PIE_CRUST.get()) - .unlockedBy("has_pie_crust", has(ModItems.PIE_CRUST.get())), - "food/salmonberry_pie", finished, enabled("salmonberry_pie")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_PIE.get(), 1) - .requires(DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 4) - .unlockedBy("has_salmonberry_pie_slice", has(DelightfulItems.SALMONBERRY_PIE_SLICE.get())), - "food/salmonberry_pie_from_slices", finished, enabled("salmonberry_pie")); - wrap(ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, Items.PUMPKIN_PIE, 1) - .pattern("ppp") - .pattern("pep") - .pattern("scs") - .define('p', ModItems.PUMPKIN_SLICE.get()) - .define('e', DelightfulItemTags.EGGS_BIRD) - .define('s', DelightfulItemTags.SUGAR) - .define('c', ModItems.PIE_CRUST.get()) - .unlockedBy("has_pie_crust", has(ModItems.PIE_CRUST.get())), - "food/pumpkin_pie", finished, not(modLoaded("create_central_kitchen"))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, Items.PUMPKIN_PIE, 1) - .requires(DelightfulItems.PUMPKIN_PIE_SLICE.get(), 4) - .unlockedBy("has_pumpkin_pie_slice", has(DelightfulItems.PUMPKIN_PIE_SLICE.get())), - "food/pumpkin_pie_from_slices", finished, enabled("pumpkin_pie_slice"), not(modLoaded("create_central_kitchen"))); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, DelightfulItems.SALMONBERRY_PIPS.get()) - .requires(DelightfulItems.SALMONBERRIES.get()) - .unlockedBy("has_salmonberries", has(DelightfulItemTags.FRUITS_SALMONBERRIES)), - "salmonberry_pips", finished, enabled("salmonberry_pips")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_SLICE.get(), 3) - .requires(DelightfulItems.CANTALOUPE.get()) - .unlockedBy("has_cantaloupe", has(DelightfulItems.CANTALOUPE.get())), - "cantaloupe_slice", finished, enabled("cantaloupe_slice")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItems.CANTALOUPE.get()), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.CANTALOUPE_SLICE.get(), 6), - "cutting/cantaloupe", finished, enabled("cantaloupe_slice")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_SEEDS.get()) - .requires(DelightfulItems.CANTALOUPE_SLICE.get()) - .unlockedBy("has_cantaloupe", has(DelightfulItemTags.FRUITS_CANTALOUPE)), - "cantaloupe_seeds", finished, enabled(DelightfulItems.CANTALOUPE_SEEDS)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get(), 1, - CookingRecipes.SLOW_COOKING, 0.35F, DelightfulItems.CANTALOUPE.get()) - .addIngredient(ForgeTags.GRAIN_RICE) - .addIngredient(ForgeTags.COOKED_MUTTON) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .addIngredient(ForgeTags.BERRIES) - .addIngredient(ForgeTags.SEEDS) - .unlockedBy("has_cantaloupe", has(DelightfulItems.CANTALOUPE.get())), - "food/cooking/stuffed_cantaloupe", finished, enabled("stuffed_cantaloupe")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.WRAPPED_CANTALOUPE.get(), 1) - .requires(DelightfulItemTags.FRUITS_CANTALOUPE) - .requires(ForgeTags.COOKED_BACON) - .unlockedBy("has_cantaloupe_slice", has(DelightfulItemTags.FRUITS_CANTALOUPE)), - "food/wrapped_cantaloupe", finished, enabled("wrapped_cantaloupe")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_BREAD.get(), 1) - .requires(ForgeTags.DOUGH) - .requires(DelightfulItemTags.FRUITS_CANTALOUPE) - .unlockedBy("has_cantaloupe_slice", has(DelightfulItemTags.FRUITS_CANTALOUPE)), - "food/cantaloupe_bread", finished, enabled("cantaloupe_bread")); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.ENDER_NECTAR.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(Items.ENDER_EYE) - .addIngredient(ForgeTags.MILK) - .addIngredient(DelightfulItemTags.SUGAR) - .unlockedBy("has_ender_eye", has(Items.ENDER_EYE)), - "food/cooking/ender_nectar", finished, enabled("ender_nectar")); - wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.ROCK_CANDY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.STICK) - .addIngredient(Ingredient.of(DelightfulItemTags.GEMS_ROSE_QUARTZ), 2) - .addIngredient(DelightfulItemTags.SUGAR) - .unlockedBy("has_rose_quartz", has(DelightfulItemTags.GEMS_ROSE_QUARTZ)), - "food/cooking/rock_candy", finished, enabled(DelightfulItems.ROCK_CANDY), not(tagEmpty(DelightfulItemTags.GEMS_ROSE_QUARTZ))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.ANIMAL_OIL_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(DelightfulItems.ANIMAL_FAT.get(), 3) - .unlockedBy("has_animal_fat", has(DelightfulItems.ANIMAL_FAT.get())), - "cooking/animal_oil_bottle", finished, enabled("animal_oil_bottle")); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.JELLY_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(Ingredient.of(DelightfulItemTags.FRUITS_SWEET), 2) - .addIngredient(Ingredient.of(DelightfulItemTags.SUGAR), 2) - .unlockedBy("has_sweet_fruit", has(DelightfulItemTags.FRUITS_SWEET)), - "food/cooking/jelly_bottle", finished, enabled("jelly_bottle"), not(modLoaded(Mods.FRD))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.GLOW_JELLY_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(DelightfulItemTags.FRUITS_GLOW_BERRIES) - .addIngredient(DelightfulItemTags.FRUITS_GLOW_BERRIES) - .addIngredient(Tags.Items.DUSTS_GLOWSTONE) - .addIngredient(Ingredient.of(DelightfulItemTags.SUGAR), 2) - .unlockedBy("has_glow_berries", has(DelightfulItemTags.FRUITS_GLOW_BERRIES)), - "food/cooking/glow_jelly_bottle", finished, enabled("glow_jelly_bottle"), not(modLoaded(Mods.FRD))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.NUT_BUTTER_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(DelightfulItemTags.NUTS) - .addIngredient(DelightfulItemTags.SUGAR) - .unlockedBy("has_nuts", has(DelightfulItemTags.NUTS)), - "food/cooking/nut_butter_bottle", finished, enabled("nut_butter_bottle"), not(tagEmpty(DelightfulItemTags.NUTS)), not(modLoaded(Mods.VD))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.CACTUS_CHILI.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.BOWL) - .addIngredient(ForgeTags.RAW_PORK) - .addIngredient(ModItems.TOMATO_SAUCE.get()) - .addIngredient(DelightfulItems.CACTUS_FLESH.get()) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_cactus_chunk", has(DelightfulItems.CACTUS_FLESH.get())) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/cactus_chili", finished, enabled(DelightfulItems.CACTUS_CHILI), enabled(DelightfulItems.CACTUS_FLESH)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.CACTUS_SOUP.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.BOWL) - .addIngredient(DelightfulItems.CACTUS_FLESH.get()) - .addIngredient(ForgeTags.VEGETABLES_TOMATO) - .addIngredient(DelightfulItemTags.HOT_SPICE) - .addIngredient(ForgeTags.GRAIN_RICE) - .unlockedBy("has_cactus_chunk", has(DelightfulItems.CACTUS_FLESH.get())) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/cactus_soup", finished, enabled(DelightfulItems.CACTUS_SOUP), enabled(DelightfulItems.CACTUS_FLESH)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.COCONUT_CURRY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(DelightfulItemTags.COCONUT) - .addIngredient(ForgeTags.RAW_CHICKEN) - .addIngredient(ForgeTags.VEGETABLES_TOMATO) - .addIngredient(DelightfulItemTags.TEA_LEAVES_GREEN) - .addIngredient(ForgeTags.SALAD_INGREDIENTS_CABBAGE) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_tea", has(DelightfulItemTags.TEA_LEAVES_GREEN)) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/coconut_curry_no_ginger", finished, enabled("coconut_curry"), not(tagEmpty(DelightfulItemTags.COCONUT)), tagEmpty(DelightfulItemTags.VEGETABLES_GINGER)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.COCONUT_CURRY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(DelightfulItemTags.COCONUT) - .addIngredient(ForgeTags.RAW_CHICKEN) - .addIngredient(ForgeTags.VEGETABLES_TOMATO) - .addIngredient(DelightfulItemTags.TEA_LEAVES_GREEN) - .addIngredient(DelightfulItemTags.VEGETABLES_GINGER) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_coconut", has(DelightfulItemTags.COCONUT)) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/coconut_curry", finished, enabled("coconut_curry"), not(tagEmpty(DelightfulItemTags.COCONUT)), not(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.SINIGANG.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(ForgeTags.RAW_FISHES) - .addIngredient(ModItems.TOMATO_SAUCE.get()) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .addIngredient(ForgeTags.RAW_PORK) - .addIngredient(DelightfulItemTags.VEGETABLES_GINGER) - .addIngredient(DelightfulItemTags.FRUITS_CITRUS) - .unlockedBy("has_ginger", has(DelightfulItemTags.VEGETABLES_GINGER)) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/sinigang", finished, enabled("sinigang"), not(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER)), not(tagEmpty(DelightfulItemTags.FRUITS_CITRUS))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.SINIGANG.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(ForgeTags.RAW_PORK) - .addIngredient(ForgeTags.RAW_FISHES) - .addIngredient(ForgeTags.GRAIN_RICE) - .addIngredient(ForgeTags.VEGETABLES_TOMATO) - .addIngredient(DelightfulItemTags.FRUITS) - .addIngredient(ForgeTags.VEGETABLES_ONION) - .unlockedBy("has_ginger", has(DelightfulItemTags.FRUITS)) - .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), - "food/cooking/sinigang_no_ginger_citrus", finished, enabled("sinigang"), or(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER), tagEmpty(DelightfulItemTags.FRUITS_CITRUS))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.CRAB_RANGOON.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(ForgeTags.DOUGH) - .addIngredient(DelightfulItemTags.CHEESE) - .addIngredient(DelightfulItemTags.CRAB_MEAT) - .unlockedBy("has_cooked_crab", has(DelightfulItemTags.CRAB_MEAT)), - "food/cooking/crab_rangoon", finished, enabled("crab_rangoon"), not(tagEmpty(DelightfulItemTags.CRAB_MEAT)), not(tagEmpty(DelightfulItemTags.CHEESE))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - DelightfulItems.CRAB_RANGOON.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(ForgeTags.DOUGH) - .addIngredient(ForgeTags.MILK) - .addIngredient(DelightfulItemTags.CRAB_MEAT) - .unlockedBy("has_cooked_crab", has(DelightfulItemTags.CRAB_MEAT)), - "food/cooking/crab_rangoon_from_milk", finished, enabled("crab_rangoon"), not(tagEmpty(DelightfulItemTags.CRAB_MEAT)), tagEmpty(DelightfulItemTags.CHEESE)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - Items.MILK_BUCKET, 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.WATER_BUCKET) - .addIngredient(DelightfulItemTags.NUT_BUTTER) - .addIngredient(DelightfulItemTags.NUT_BUTTER) - .unlockedBy("has_nut_butter", has(DelightfulItemTags.NUT_BUTTER)), - "food/cooking/nut_milk", finished, enabled("nut_milk"), not(modLoaded(Mods.VD))); - wrap(CookingPotRecipeBuilder.cookingPotRecipe( - Items.HONEY_BOTTLE, 3, CookingRecipes.NORMAL_COOKING, 0.35F) - .addIngredient(Items.HONEY_BOTTLE, 2) - .addIngredient(DelightfulItems.CHOPPED_CLOVER.get(), 4), - "food/clover_honey", finished, enabled("clover_honey"), enabled(DelightfulItems.CHOPPED_CLOVER), not(tagEmpty(DelightfulItemTags.CLOVER))); - wrap(ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, Items.TORCH, 8) - .define('o', DelightfulItems.ANIMAL_OIL_BOTTLE.get()) - .define('s', Tags.Items.RODS_WOODEN) - .pattern("o") - .pattern("s") - .unlockedBy("has_oil_bottle", has(DelightfulItems.ANIMAL_OIL_BOTTLE.get())), - "torch_from_animal_oil_bottle", finished, enabled("animal_oil_bottle")); - wrap(ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, Items.CANDLE, 1) - .define('f', DelightfulItems.ANIMAL_FAT.get()) - .define('s', Tags.Items.STRING) - .pattern("s") - .pattern("f") - .pattern("f") - .unlockedBy("has_fat", has(DelightfulItems.ANIMAL_FAT.get())), - "candle_from_animal_fat", finished, enabled("animal_fat")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItemTags.TEA_LEAVES_GREEN), - Ingredient.of(ForgeTags.TOOLS_SHOVELS), - Items.GREEN_DYE, 1).addResultWithChance(DelightfulItems.MATCHA.get(), 0.4f), - "cutting/green_tea_leaves", finished, enabled("matcha"), not(tagEmpty(DelightfulItemTags.TEA_LEAVES_GREEN)), not(modLoaded(Mods.YH))); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItemTags.CLOVER), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.CHOPPED_CLOVER.get(), 2), - "cutting/clover", finished, enabled(DelightfulItems.CHOPPED_CLOVER), not(tagEmpty(DelightfulItemTags.CLOVER))); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItems.SALMONBERRY_PIE.get()), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 4), - "cutting/salmonberry_pie", finished, enabled("salmonberry_pie"), enabled("salmonberry_pie_slice")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(Items.PUMPKIN_PIE), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.PUMPKIN_PIE_SLICE.get(), 4), - "cutting/pumpkin_pie", finished, enabled("pumpkin_pie_slice")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItemTags.CACTI), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.CACTUS_FLESH.get(), 2), - "cutting/cactus", finished, enabled("cactus_flesh")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItemTags.SMALL_CACTI), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - DelightfulItems.CACTUS_FLESH.get(), 1), - "cutting/small_cactus", finished, enabled("cactus_flesh")); - wrap(CuttingBoardRecipeBuilder.cuttingRecipe( - Ingredient.of(DelightfulItems.MINI_MELON.get()), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - Items.MELON_SLICE, 6), - "cutting/mini_melon", finished, enabled("mini_melon")); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.MELON_SLICE, 3) - .requires(DelightfulItems.MINI_MELON.get()) - .unlockedBy("has_mini_melon", has(DelightfulItems.MINI_MELON.get())), - "melon_slice", finished, enabled("mini_melon")); - wrap(shaped(RecipeCategory.BUILDING_BLOCKS, DelightfulItems.SALMONBERRY_ICE_CREAM_BLOCK, 8) - .pattern("sss") - .pattern("sis") - .pattern("sss") - .define('s', Blocks.SNOW_BLOCK) - .define('i', DelightfulItems.SALMONBERRY_ICE_CREAM.get()) - .unlockedBy("has_salmonberry_ice_cream", has(DelightfulItems.SALMONBERRY_ICE_CREAM.get())), - "salmonberry_ice_cream_block", finished, enabled(DelightfulItems.SALMONBERRY_ICE_CREAM_BLOCK), enabled(DelightfulItems.SALMONBERRY_ICE_CREAM), modLoaded(Mods.N)); - wrap(shaped(RecipeCategory.BUILDING_BLOCKS, DelightfulItems.MATCHA_ICE_CREAM_BLOCK, 8) - .pattern("sss") - .pattern("sis") - .pattern("sss") - .define('s', Blocks.SNOW_BLOCK) - .define('i', DelightfulItems.MATCHA_ICE_CREAM.get()) - .unlockedBy("has_matcha_ice_cream", has(DelightfulItems.MATCHA_ICE_CREAM.get())), - "matcha_ice_cream_block", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM_BLOCK), enabled(DelightfulItems.MATCHA_ICE_CREAM), enabled(DelightfulItems.MATCHA), modLoaded(Mods.N)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.SALMONBERRY_GUMMY.get(), 1, 200, 1.0F) - .addIngredient(DelightfulItemTags.FRUITS_SALMONBERRIES) - .addIngredient(Items.SUGAR) - .addIngredient(Items.HONEY_BOTTLE) - .addIngredient(Items.KELP) - .unlockedBy("has_salmonberries", has(DelightfulItemTags.FRUITS_SALMONBERRIES)), - "gummy/salmonberries", finished, enabled(DelightfulItems.SALMONBERRIES), enabled(DelightfulItems.SALMONBERRY_GUMMY)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.MATCHA_GUMMY.get(), 1, 200, 1.0F) - .addIngredient(DelightfulItemTags.MATCHA) - .addIngredient(Items.SUGAR) - .addIngredient(Items.HONEY_BOTTLE) - .addIngredient(Items.KELP) - .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), - "gummy/matcha", finished, enabled(DelightfulItems.MATCHA), enabled(DelightfulItems.MATCHA_GUMMY)); - wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.CANTALOUPE_GUMMY.get(), 1, 200, 1.0F) - .addIngredient(DelightfulItemTags.FRUITS_CANTALOUPE) - .addIngredient(Items.SUGAR) - .addIngredient(Items.HONEY_BOTTLE) - .addIngredient(Items.KELP) - .unlockedBy("has_cantaloupe", has(DelightfulItemTags.FRUITS_CANTALOUPE)), - "gummy/cantaloupe", finished, enabled(DelightfulItems.CANTALOUPE), enabled(DelightfulItems.CANTALOUPE_GUMMY)); + sack(DelightfulItems.ACORN_SACK, DelightfulItems.ACORN, "acorn", finished); + sack(DelightfulItems.SALMONBERRY_SACK, DelightfulItems.SALMONBERRIES, "salmonberry", finished); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_ICE_CREAM.get(), 1) + .requires(Items.BOWL) + .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) + .requires(ForgeTags.MILK) + .requires(DelightfulItemTags.ICE_CUBES) + .requires(DelightfulItemTags.SUGAR) + .unlockedBy("has_ice_cubes", has(DelightfulItemTags.ICE_CUBES)), + "food/salmonberry_ice_cream", finished, enabled("salmonberry_ice_cream"), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_ICE_CREAM.get(), 1) + .requires(Items.BOWL) + .requires(DelightfulItemTags.FRUITS_SALMONBERRIES) + .requires(ForgeTags.MILK) + .requires(Items.ICE) + .requires(DelightfulItemTags.SUGAR) + .unlockedBy("has_ice", has(Items.ICE)), + "food/salmonberry_ice_cream_no_neapolitan", finished, enabled("salmonberry_ice_cream"), tagEmpty(DelightfulItemTags.ICE_CUBES)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_MILKSHAKE.get(), 3) + .requires(Items.GLASS_BOTTLE, 3) + .requires(DelightfulItems.SALMONBERRY_ICE_CREAM.get()) + .requires(ForgeTags.MILK) + .unlockedBy("has_salmonberry_ice_cream", has(DelightfulItems.SALMONBERRY_ICE_CREAM.get())), + "food/salmonberry_milkshake", finished, enabled(DelightfulItems.SALMONBERRY_MILKSHAKE), enabled(DelightfulItems.SALMONBERRY_ICE_CREAM)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_ICE_CREAM.get(), 1) + .requires(Items.BOWL) + .requires(DelightfulItemTags.MATCHA) + .requires(ForgeTags.MILK) + .requires(DelightfulItemTags.ICE_CUBES) + .requires(DelightfulItemTags.SUGAR) + .unlockedBy("has_ice_cubes", has(DelightfulItemTags.ICE_CUBES)), + "food/matcha_ice_cream", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM), not(tagEmpty(DelightfulItemTags.ICE_CUBES))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_ICE_CREAM.get(), 1) + .requires(Items.BOWL) + .requires(DelightfulItemTags.MATCHA) + .requires(ForgeTags.MILK) + .requires(Items.ICE) + .requires(DelightfulItemTags.SUGAR) + .unlockedBy("has_ice", has(Items.ICE)), + "food/matcha_ice_cream_no_neapolitan", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM), tagEmpty(DelightfulItemTags.ICE_CUBES)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.MATCHA_MILKSHAKE.get(), 3) + .requires(Items.GLASS_BOTTLE, 3) + .requires(DelightfulItems.MATCHA_ICE_CREAM.get()) + .requires(ForgeTags.MILK) + .unlockedBy("has_matcha_ice_cream", has(DelightfulItems.MATCHA_ICE_CREAM.get())), + "food/matcha_milkshake", finished, enabled(DelightfulItems.MATCHA_MILKSHAKE), enabled(DelightfulItems.MATCHA_ICE_CREAM)); + wrap(ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_PIE.get(), 1) + .pattern("###") + .pattern("aaa") + .pattern("xOx") + .define('#', ForgeTags.GRAIN_WHEAT) + .define('a', DelightfulItemTags.FRUITS_SALMONBERRIES) + .define('x', DelightfulItemTags.SUGAR) + .define('O', ModItems.PIE_CRUST.get()) + .unlockedBy("has_pie_crust", has(ModItems.PIE_CRUST.get())), + "food/salmonberry_pie", finished, enabled("salmonberry_pie")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.SALMONBERRY_PIE.get(), 1) + .requires(DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 4) + .unlockedBy("has_salmonberry_pie_slice", has(DelightfulItems.SALMONBERRY_PIE_SLICE.get())), + "food/salmonberry_pie_from_slices", finished, enabled("salmonberry_pie")); + wrap(ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, Items.PUMPKIN_PIE, 1) + .pattern("ppp") + .pattern("pep") + .pattern("scs") + .define('p', ModItems.PUMPKIN_SLICE.get()) + .define('e', DelightfulItemTags.EGGS_BIRD) + .define('s', DelightfulItemTags.SUGAR) + .define('c', ModItems.PIE_CRUST.get()) + .unlockedBy("has_pie_crust", has(ModItems.PIE_CRUST.get())), + "food/pumpkin_pie", finished, not(modLoaded("create_central_kitchen"))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, Items.PUMPKIN_PIE, 1) + .requires(DelightfulItems.PUMPKIN_PIE_SLICE.get(), 4) + .unlockedBy("has_pumpkin_pie_slice", has(DelightfulItems.PUMPKIN_PIE_SLICE.get())), + "food/pumpkin_pie_from_slices", finished, enabled("pumpkin_pie_slice"), not(modLoaded("create_central_kitchen"))); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, DelightfulItems.SALMONBERRY_PIPS.get()) + .requires(DelightfulItems.SALMONBERRIES.get()) + .unlockedBy("has_salmonberries", has(DelightfulItemTags.FRUITS_SALMONBERRIES)), + "salmonberry_pips", finished, enabled("salmonberry_pips")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_SLICE.get(), 3) + .requires(DelightfulItems.CANTALOUPE.get()) + .unlockedBy("has_cantaloupe", has(DelightfulItems.CANTALOUPE.get())), + "cantaloupe_slice", finished, enabled("cantaloupe_slice")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItems.CANTALOUPE.get()), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.CANTALOUPE_SLICE.get(), 6), + "cutting/cantaloupe", finished, enabled("cantaloupe_slice")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_SEEDS.get()) + .requires(DelightfulItems.CANTALOUPE_SLICE.get()) + .unlockedBy("has_cantaloupe", has(DelightfulItemTags.FRUITS_CANTALOUPE)), + "cantaloupe_seeds", finished, enabled(DelightfulItems.CANTALOUPE_SEEDS)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.STUFFED_CANTALOUPE_BLOCK.get(), 1, + CookingRecipes.SLOW_COOKING, 0.35F, DelightfulItems.CANTALOUPE.get()) + .addIngredient(ForgeTags.GRAIN_RICE) + .addIngredient(ForgeTags.COOKED_MUTTON) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .addIngredient(ForgeTags.BERRIES) + .addIngredient(ForgeTags.SEEDS) + .unlockedBy("has_cantaloupe", has(DelightfulItems.CANTALOUPE.get())), + "food/cooking/stuffed_cantaloupe", finished, enabled("stuffed_cantaloupe")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.WRAPPED_CANTALOUPE.get(), 1) + .requires(DelightfulItemTags.FRUITS_CANTALOUPE) + .requires(ForgeTags.COOKED_BACON) + .unlockedBy("has_cantaloupe_slice", has(DelightfulItemTags.FRUITS_CANTALOUPE)), + "food/wrapped_cantaloupe", finished, enabled("wrapped_cantaloupe")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, DelightfulItems.CANTALOUPE_BREAD.get(), 1) + .requires(ForgeTags.DOUGH) + .requires(DelightfulItemTags.FRUITS_CANTALOUPE) + .unlockedBy("has_cantaloupe_slice", has(DelightfulItemTags.FRUITS_CANTALOUPE)), + "food/cantaloupe_bread", finished, enabled("cantaloupe_bread")); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.ENDER_NECTAR.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(Items.ENDER_EYE) + .addIngredient(ForgeTags.MILK) + .addIngredient(DelightfulItemTags.SUGAR) + .unlockedBy("has_ender_eye", has(Items.ENDER_EYE)), + "food/cooking/ender_nectar", finished, enabled("ender_nectar")); + wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.ROCK_CANDY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.STICK) + .addIngredient(Ingredient.of(DelightfulItemTags.GEMS_ROSE_QUARTZ), 2) + .addIngredient(DelightfulItemTags.SUGAR) + .unlockedBy("has_rose_quartz", has(DelightfulItemTags.GEMS_ROSE_QUARTZ)), + "food/cooking/rock_candy", finished, enabled(DelightfulItems.ROCK_CANDY), not(tagEmpty(DelightfulItemTags.GEMS_ROSE_QUARTZ))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.ANIMAL_OIL_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(DelightfulItems.ANIMAL_FAT.get(), 3) + .unlockedBy("has_animal_fat", has(DelightfulItems.ANIMAL_FAT.get())), + "cooking/animal_oil_bottle", finished, enabled("animal_oil_bottle")); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.JELLY_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(Ingredient.of(DelightfulItemTags.FRUITS_SWEET), 2) + .addIngredient(Ingredient.of(DelightfulItemTags.SUGAR), 2) + .unlockedBy("has_sweet_fruit", has(DelightfulItemTags.FRUITS_SWEET)), + "food/cooking/jelly_bottle", finished, enabled("jelly_bottle"), not(modLoaded(Mods.FRD))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.GLOW_JELLY_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(DelightfulItemTags.FRUITS_GLOW_BERRIES) + .addIngredient(DelightfulItemTags.FRUITS_GLOW_BERRIES) + .addIngredient(Tags.Items.DUSTS_GLOWSTONE) + .addIngredient(Ingredient.of(DelightfulItemTags.SUGAR), 2) + .unlockedBy("has_glow_berries", has(DelightfulItemTags.FRUITS_GLOW_BERRIES)), + "food/cooking/glow_jelly_bottle", finished, enabled("glow_jelly_bottle"), not(modLoaded(Mods.FRD))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.NUT_BUTTER_BOTTLE.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(DelightfulItemTags.NUTS) + .addIngredient(DelightfulItemTags.SUGAR) + .unlockedBy("has_nuts", has(DelightfulItemTags.NUTS)), + "food/cooking/nut_butter_bottle", finished, enabled("nut_butter_bottle"), not(tagEmpty(DelightfulItemTags.NUTS)), not(modLoaded(Mods.VD))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.CACTUS_CHILI.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.BOWL) + .addIngredient(ForgeTags.RAW_PORK) + .addIngredient(ModItems.TOMATO_SAUCE.get()) + .addIngredient(DelightfulItems.CACTUS_FLESH.get()) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_cactus_chunk", has(DelightfulItems.CACTUS_FLESH.get())) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/cactus_chili", finished, enabled(DelightfulItems.CACTUS_CHILI), enabled(DelightfulItems.CACTUS_FLESH)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.CACTUS_SOUP.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.BOWL) + .addIngredient(DelightfulItems.CACTUS_FLESH.get()) + .addIngredient(ForgeTags.VEGETABLES_TOMATO) + .addIngredient(DelightfulItemTags.HOT_SPICE) + .addIngredient(ForgeTags.GRAIN_RICE) + .unlockedBy("has_cactus_chunk", has(DelightfulItems.CACTUS_FLESH.get())) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/cactus_soup", finished, enabled(DelightfulItems.CACTUS_SOUP), enabled(DelightfulItems.CACTUS_FLESH)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.COCONUT_CURRY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(DelightfulItemTags.COCONUT) + .addIngredient(ForgeTags.RAW_CHICKEN) + .addIngredient(ForgeTags.VEGETABLES_TOMATO) + .addIngredient(DelightfulItemTags.TEA_LEAVES_GREEN) + .addIngredient(ForgeTags.SALAD_INGREDIENTS_CABBAGE) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_tea", has(DelightfulItemTags.TEA_LEAVES_GREEN)) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/coconut_curry_no_ginger", finished, enabled("coconut_curry"), not(tagEmpty(DelightfulItemTags.COCONUT)), tagEmpty(DelightfulItemTags.VEGETABLES_GINGER)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.COCONUT_CURRY.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(DelightfulItemTags.COCONUT) + .addIngredient(ForgeTags.RAW_CHICKEN) + .addIngredient(ForgeTags.VEGETABLES_TOMATO) + .addIngredient(DelightfulItemTags.TEA_LEAVES_GREEN) + .addIngredient(DelightfulItemTags.VEGETABLES_GINGER) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_coconut", has(DelightfulItemTags.COCONUT)) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/coconut_curry", finished, enabled("coconut_curry"), not(tagEmpty(DelightfulItemTags.COCONUT)), not(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.SINIGANG.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(ForgeTags.RAW_FISHES) + .addIngredient(ModItems.TOMATO_SAUCE.get()) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .addIngredient(ForgeTags.RAW_PORK) + .addIngredient(DelightfulItemTags.VEGETABLES_GINGER) + .addIngredient(DelightfulItemTags.FRUITS_CITRUS) + .unlockedBy("has_ginger", has(DelightfulItemTags.VEGETABLES_GINGER)) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/sinigang", finished, enabled("sinigang"), not(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER)), not(tagEmpty(DelightfulItemTags.FRUITS_CITRUS))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.SINIGANG.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(ForgeTags.RAW_PORK) + .addIngredient(ForgeTags.RAW_FISHES) + .addIngredient(ForgeTags.GRAIN_RICE) + .addIngredient(ForgeTags.VEGETABLES_TOMATO) + .addIngredient(DelightfulItemTags.FRUITS) + .addIngredient(ForgeTags.VEGETABLES_ONION) + .unlockedBy("has_ginger", has(DelightfulItemTags.FRUITS)) + .setRecipeBookTab(CookingPotRecipeBookTab.MEALS), + "food/cooking/sinigang_no_ginger_citrus", finished, enabled("sinigang"), or(tagEmpty(DelightfulItemTags.VEGETABLES_GINGER), tagEmpty(DelightfulItemTags.FRUITS_CITRUS))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.CRAB_RANGOON.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(ForgeTags.DOUGH) + .addIngredient(DelightfulItemTags.CHEESE) + .addIngredient(DelightfulItemTags.CRAB_MEAT) + .unlockedBy("has_cooked_crab", has(DelightfulItemTags.CRAB_MEAT)), + "food/cooking/crab_rangoon", finished, enabled("crab_rangoon"), not(tagEmpty(DelightfulItemTags.CRAB_MEAT)), not(tagEmpty(DelightfulItemTags.CHEESE))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + DelightfulItems.CRAB_RANGOON.get(), 1, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(ForgeTags.DOUGH) + .addIngredient(ForgeTags.MILK) + .addIngredient(DelightfulItemTags.CRAB_MEAT) + .unlockedBy("has_cooked_crab", has(DelightfulItemTags.CRAB_MEAT)), + "food/cooking/crab_rangoon_from_milk", finished, enabled("crab_rangoon"), not(tagEmpty(DelightfulItemTags.CRAB_MEAT)), tagEmpty(DelightfulItemTags.CHEESE)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + Items.MILK_BUCKET, 1, CookingRecipes.NORMAL_COOKING, 0.35F, Items.WATER_BUCKET) + .addIngredient(DelightfulItemTags.NUT_BUTTER) + .addIngredient(DelightfulItemTags.NUT_BUTTER) + .unlockedBy("has_nut_butter", has(DelightfulItemTags.NUT_BUTTER)), + "food/cooking/nut_milk", finished, enabled("nut_milk"), not(modLoaded(Mods.VD))); + wrap(CookingPotRecipeBuilder.cookingPotRecipe( + Items.HONEY_BOTTLE, 3, CookingRecipes.NORMAL_COOKING, 0.35F) + .addIngredient(Items.HONEY_BOTTLE, 2) + .addIngredient(DelightfulItems.CHOPPED_CLOVER.get(), 4), + "food/clover_honey", finished, enabled("clover_honey"), enabled(DelightfulItems.CHOPPED_CLOVER), not(tagEmpty(DelightfulItemTags.CLOVER))); + wrap(ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, Items.TORCH, 8) + .define('o', DelightfulItems.ANIMAL_OIL_BOTTLE.get()) + .define('s', Tags.Items.RODS_WOODEN) + .pattern("o") + .pattern("s") + .unlockedBy("has_oil_bottle", has(DelightfulItems.ANIMAL_OIL_BOTTLE.get())), + "torch_from_animal_oil_bottle", finished, enabled("animal_oil_bottle")); + wrap(ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, Items.CANDLE, 1) + .define('f', DelightfulItems.ANIMAL_FAT.get()) + .define('s', Tags.Items.STRING) + .pattern("s") + .pattern("f") + .pattern("f") + .unlockedBy("has_fat", has(DelightfulItems.ANIMAL_FAT.get())), + "candle_from_animal_fat", finished, enabled("animal_fat")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItemTags.TEA_LEAVES_GREEN), + Ingredient.of(ForgeTags.TOOLS_SHOVELS), + Items.GREEN_DYE, 1).addResultWithChance(DelightfulItems.MATCHA.get(), 0.4f), + "cutting/green_tea_leaves", finished, enabled("matcha"), not(tagEmpty(DelightfulItemTags.TEA_LEAVES_GREEN)), not(modLoaded(Mods.YH))); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItemTags.CLOVER), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.CHOPPED_CLOVER.get(), 2), + "cutting/clover", finished, enabled(DelightfulItems.CHOPPED_CLOVER), not(tagEmpty(DelightfulItemTags.CLOVER))); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItems.SALMONBERRY_PIE.get()), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.SALMONBERRY_PIE_SLICE.get(), 4), + "cutting/salmonberry_pie", finished, enabled("salmonberry_pie"), enabled("salmonberry_pie_slice")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(Items.PUMPKIN_PIE), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.PUMPKIN_PIE_SLICE.get(), 4), + "cutting/pumpkin_pie", finished, enabled("pumpkin_pie_slice")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItemTags.CACTI), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.CACTUS_FLESH.get(), 2), + "cutting/cactus", finished, enabled("cactus_flesh")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItemTags.SMALL_CACTI), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + DelightfulItems.CACTUS_FLESH.get(), 1), + "cutting/small_cactus", finished, enabled("cactus_flesh")); + wrap(CuttingBoardRecipeBuilder.cuttingRecipe( + Ingredient.of(DelightfulItems.MINI_MELON.get()), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + Items.MELON_SLICE, 6), + "cutting/mini_melon", finished, enabled("mini_melon")); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.MELON_SLICE, 3) + .requires(DelightfulItems.MINI_MELON.get()) + .unlockedBy("has_mini_melon", has(DelightfulItems.MINI_MELON.get())), + "melon_slice", finished, enabled("mini_melon")); + wrap(shaped(RecipeCategory.BUILDING_BLOCKS, DelightfulItems.SALMONBERRY_ICE_CREAM_BLOCK, 8) + .pattern("sss") + .pattern("sis") + .pattern("sss") + .define('s', Blocks.SNOW_BLOCK) + .define('i', DelightfulItems.SALMONBERRY_ICE_CREAM.get()) + .unlockedBy("has_salmonberry_ice_cream", has(DelightfulItems.SALMONBERRY_ICE_CREAM.get())), + "salmonberry_ice_cream_block", finished, enabled(DelightfulItems.SALMONBERRY_ICE_CREAM_BLOCK), enabled(DelightfulItems.SALMONBERRY_ICE_CREAM), modLoaded(Mods.N)); + wrap(shaped(RecipeCategory.BUILDING_BLOCKS, DelightfulItems.MATCHA_ICE_CREAM_BLOCK, 8) + .pattern("sss") + .pattern("sis") + .pattern("sss") + .define('s', Blocks.SNOW_BLOCK) + .define('i', DelightfulItems.MATCHA_ICE_CREAM.get()) + .unlockedBy("has_matcha_ice_cream", has(DelightfulItems.MATCHA_ICE_CREAM.get())), + "matcha_ice_cream_block", finished, enabled(DelightfulItems.MATCHA_ICE_CREAM_BLOCK), enabled(DelightfulItems.MATCHA_ICE_CREAM), enabled(DelightfulItems.MATCHA), modLoaded(Mods.N)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.SALMONBERRY_GUMMY.get(), 1, 200, 1.0F) + .addIngredient(DelightfulItemTags.FRUITS_SALMONBERRIES) + .addIngredient(Items.SUGAR) + .addIngredient(Items.HONEY_BOTTLE) + .addIngredient(Items.KELP) + .unlockedBy("has_salmonberries", has(DelightfulItemTags.FRUITS_SALMONBERRIES)), + "gummy/salmonberries", finished, enabled(DelightfulItems.SALMONBERRIES), enabled(DelightfulItems.SALMONBERRY_GUMMY)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.MATCHA_GUMMY.get(), 1, 200, 1.0F) + .addIngredient(DelightfulItemTags.MATCHA) + .addIngredient(Items.SUGAR) + .addIngredient(Items.HONEY_BOTTLE) + .addIngredient(Items.KELP) + .unlockedBy("has_matcha", has(DelightfulItemTags.MATCHA)), + "gummy/matcha", finished, enabled(DelightfulItems.MATCHA), enabled(DelightfulItems.MATCHA_GUMMY)); + wrap(CookingPotRecipeBuilder.cookingPotRecipe(DelightfulItems.CANTALOUPE_GUMMY.get(), 1, 200, 1.0F) + .addIngredient(DelightfulItemTags.FRUITS_CANTALOUPE) + .addIngredient(Items.SUGAR) + .addIngredient(Items.HONEY_BOTTLE) + .addIngredient(Items.KELP) + .unlockedBy("has_cantaloupe", has(DelightfulItemTags.FRUITS_CANTALOUPE)), + "gummy/cantaloupe", finished, enabled(DelightfulItems.CANTALOUPE), enabled(DelightfulItems.CANTALOUPE_GUMMY)); - // Unwrappables - ConditionalRecipe.builder() - .addCondition(not(tagEmpty(DelightfulItemTags.CHOCOLATE))) - .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, ModItems.CHOCOLATE_PIE.get(), 1) - .pattern("ccc") - .pattern("mmm") - .pattern("xOx") - .define('c', DelightfulItemTags.CHOCOLATE) - .define('m', ForgeTags.MILK) - .define('x', DelightfulItemTags.SUGAR) - .define('O', ModItems.PIE_CRUST.get()) - .unlockedBy("has_pie_crust", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.PIE_CRUST.get())) - .save(f)) - .addCondition(tagEmpty(DelightfulItemTags.CHOCOLATE)) - .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, ModItems.CHOCOLATE_PIE.get(), 1) - .pattern("ccc") - .pattern("mmm") - .pattern("xOx") - .define('c', Items.COCOA_BEANS) - .define('m', ForgeTags.MILK) - .define('x', DelightfulItemTags.SUGAR) - .define('O', ModItems.PIE_CRUST.get()) - .unlockedBy("has_pie_crust", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.PIE_CRUST.get())) - .save(f)) - .generateAdvancement() - .build(finished, ModItems.CHOCOLATE_PIE.getId()); - ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, ModItems.FRUIT_SALAD.get(), 1) - .requires(Items.APPLE) - .requires(Items.MELON_SLICE) - .requires(ModItems.PUMPKIN_SLICE.get()) - .requires(DelightfulItemTags.FRUITS) - .requires(ForgeTags.BERRIES) - .requires(ForgeTags.BERRIES) - .requires(Items.BOWL) - .unlockedBy("has_fruits", has(Items.MELON_SLICE, Items.SWEET_BERRIES, Items.APPLE, ModItems.PUMPKIN_SLICE.get())) - .save(finished, ModItems.FRUIT_SALAD.getId()); - CuttingBoardRecipeBuilder.cuttingRecipe(Ingredient.of(DelightfulItems.WILD_SALMONBERRIES.get()), Ingredient.of(ForgeTags.TOOLS_KNIVES), DelightfulItems.SALMONBERRIES.get(), 1) - .addResult(Items.ORANGE_DYE, 1) - .build(finished, Util.rl(Delightful.MODID, "cutting/wild_salmonberries")); - CuttingBoardRecipeBuilder.cuttingRecipe(Ingredient.of(Items.SUGAR_CANE), - Ingredient.of(ForgeTags.TOOLS_KNIVES), - Items.SUGAR, 1) - .addResultWithChance(Items.SUGAR, 0.5F, 1) - .build(finished, Util.rl(Delightful.MODID, "cutting/sugar_cane")); - } + // Unwrappables + ConditionalRecipe.builder() + .addCondition(not(tagEmpty(DelightfulItemTags.CHOCOLATE))) + .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, ModItems.CHOCOLATE_PIE.get(), 1) + .pattern("ccc") + .pattern("mmm") + .pattern("xOx") + .define('c', DelightfulItemTags.CHOCOLATE) + .define('m', ForgeTags.MILK) + .define('x', DelightfulItemTags.SUGAR) + .define('O', ModItems.PIE_CRUST.get()) + .unlockedBy("has_pie_crust", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.PIE_CRUST.get())) + .save(f)) + .addCondition(tagEmpty(DelightfulItemTags.CHOCOLATE)) + .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.FOOD, ModItems.CHOCOLATE_PIE.get(), 1) + .pattern("ccc") + .pattern("mmm") + .pattern("xOx") + .define('c', Items.COCOA_BEANS) + .define('m', ForgeTags.MILK) + .define('x', DelightfulItemTags.SUGAR) + .define('O', ModItems.PIE_CRUST.get()) + .unlockedBy("has_pie_crust", InventoryChangeTrigger.TriggerInstance.hasItems(ModItems.PIE_CRUST.get())) + .save(f)) + .generateAdvancement() + .build(finished, ModItems.CHOCOLATE_PIE.getId()); + ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, ModItems.FRUIT_SALAD.get(), 1) + .requires(Items.APPLE) + .requires(Items.MELON_SLICE) + .requires(ModItems.PUMPKIN_SLICE.get()) + .requires(DelightfulItemTags.FRUITS) + .requires(ForgeTags.BERRIES) + .requires(ForgeTags.BERRIES) + .requires(Items.BOWL) + .unlockedBy("has_fruits", has(Items.MELON_SLICE, Items.SWEET_BERRIES, Items.APPLE, ModItems.PUMPKIN_SLICE.get())) + .save(finished, ModItems.FRUIT_SALAD.getId()); + CuttingBoardRecipeBuilder.cuttingRecipe(Ingredient.of(DelightfulItems.WILD_SALMONBERRIES.get()), Ingredient.of(ForgeTags.TOOLS_KNIVES), DelightfulItems.SALMONBERRIES.get(), 1) + .addResult(Items.ORANGE_DYE, 1) + .build(finished, Util.rl(Delightful.MODID, "cutting/wild_salmonberries")); + CuttingBoardRecipeBuilder.cuttingRecipe(Ingredient.of(Items.SUGAR_CANE), + Ingredient.of(ForgeTags.TOOLS_KNIVES), + Items.SUGAR, 1) + .addResultWithChance(Items.SUGAR, 0.5F, 1) + .build(finished, Util.rl(Delightful.MODID, "cutting/sugar_cane")); + } - private InventoryChangeTrigger.TriggerInstance has(ItemLike... items) { - return InventoryChangeTrigger.TriggerInstance.hasItems(items); - } + private InventoryChangeTrigger.TriggerInstance has(ItemLike... items) { + return InventoryChangeTrigger.TriggerInstance.hasItems(items); + } - private void wrap(RecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { - wrap(builder, Delightful.MODID, name, consumer, conds); - } + private void wrap(RecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { + wrap(builder, Delightful.MODID, name, consumer, conds); + } - private void wrap(RecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { - ResourceLocation loc = Util.rl(modid, name); - ConditionalRecipe.Builder cond = ConditionalRecipe.builder(); - if (conds.length > 1) { - cond.addCondition(and(conds)); - } else if (conds.length == 1) { - cond.addCondition(conds[0]); - } - FinishedRecipe[] recipe = new FinishedRecipe[1]; - builder.save(f -> recipe[0] = f, loc); - cond.addRecipe(recipe[0]) - .generateAdvancement() - .build(consumer, loc); - } + private void wrap(RecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { + ResourceLocation loc = Util.rl(modid, name); + ConditionalRecipe.Builder cond = ConditionalRecipe.builder(); + if (conds.length > 1) { + cond.addCondition(and(conds)); + } else if (conds.length == 1) { + cond.addCondition(conds[0]); + } + FinishedRecipe[] recipe = new FinishedRecipe[1]; + builder.save(f -> recipe[0] = f, loc); + cond.addRecipe(recipe[0]) + .generateAdvancement() + .build(consumer, loc); + } - private void wrap(SmithingTransformRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { - ResourceLocation loc = Util.rl(Delightful.MODID, name); - ConditionalRecipe.Builder cond = ConditionalRecipe.builder(); - if (conds.length > 1) { - cond.addCondition(and(conds)); - } else if (conds.length == 1) { - cond.addCondition(conds[0]); - } - FinishedRecipe[] recipe = new FinishedRecipe[1]; - builder.save(f -> recipe[0] = f, loc); - cond.addRecipe(recipe[0]) - .generateAdvancement() - .build(consumer, loc); - } + private void wrap(SmithingTransformRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { + ResourceLocation loc = Util.rl(Delightful.MODID, name); + ConditionalRecipe.Builder cond = ConditionalRecipe.builder(); + if (conds.length > 1) { + cond.addCondition(and(conds)); + } else if (conds.length == 1) { + cond.addCondition(conds[0]); + } + FinishedRecipe[] recipe = new FinishedRecipe[1]; + builder.save(f -> recipe[0] = f, loc); + cond.addRecipe(recipe[0]) + .generateAdvancement() + .build(consumer, loc); + } - private void wrap(CuttingBoardRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { - wrap(builder, Delightful.MODID, name, consumer, conds); - } + private void wrap(CuttingBoardRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { + wrap(builder, Delightful.MODID, name, consumer, conds); + } - private void wrap(CuttingBoardRecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { - ResourceLocation loc = Util.rl(modid, name); - ConditionalRecipe.Builder cond; - if (conds.length > 1) { - cond = ConditionalRecipe.builder().addCondition(and(conds)); - } else if (conds.length == 1) { - cond = ConditionalRecipe.builder().addCondition(conds[0]); - } else { - cond = ConditionalRecipe.builder(); - } - FinishedRecipe[] recipe = new FinishedRecipe[1]; - builder.build(f -> recipe[0] = f, loc); - cond.addRecipe(recipe[0]) - .build(consumer, loc); - } + private void wrap(CuttingBoardRecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { + ResourceLocation loc = Util.rl(modid, name); + ConditionalRecipe.Builder cond; + if (conds.length > 1) { + cond = ConditionalRecipe.builder().addCondition(and(conds)); + } else if (conds.length == 1) { + cond = ConditionalRecipe.builder().addCondition(conds[0]); + } else { + cond = ConditionalRecipe.builder(); + } + FinishedRecipe[] recipe = new FinishedRecipe[1]; + builder.build(f -> recipe[0] = f, loc); + cond.addRecipe(recipe[0]) + .build(consumer, loc); + } - private void wrap(CookingPotRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { - wrap(builder, Delightful.MODID, name, consumer, conds); - } + private void wrap(CookingPotRecipeBuilder builder, String name, Consumer consumer, ICondition... conds) { + wrap(builder, Delightful.MODID, name, consumer, conds); + } - private void wrap(CookingPotRecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { - ResourceLocation loc = Util.rl(modid, name); - ConditionalRecipe.Builder cond; - if (conds.length > 1) { - cond = ConditionalRecipe.builder().addCondition(and(conds)); - } else if (conds.length == 1) { - cond = ConditionalRecipe.builder().addCondition(conds[0]); - } else { - cond = ConditionalRecipe.builder(); - } - FinishedRecipe[] recipe = new FinishedRecipe[1]; - builder.build(f -> recipe[0] = f, loc); - cond.addRecipe(recipe[0]) - .generateAdvancement() - .build(consumer, loc); - } + private void wrap(CookingPotRecipeBuilder builder, String modid, String name, Consumer consumer, ICondition... conds) { + ResourceLocation loc = Util.rl(modid, name); + ConditionalRecipe.Builder cond; + if (conds.length > 1) { + cond = ConditionalRecipe.builder().addCondition(and(conds)); + } else if (conds.length == 1) { + cond = ConditionalRecipe.builder().addCondition(conds[0]); + } else { + cond = ConditionalRecipe.builder(); + } + FinishedRecipe[] recipe = new FinishedRecipe[1]; + builder.build(f -> recipe[0] = f, loc); + cond.addRecipe(recipe[0]) + .generateAdvancement() + .build(consumer, loc); + } - private void sack(RegistryObject sack, Supplier ingredient, String name, Consumer finished) { - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, sack.get(), 1) - .requires(ingredient.get(), 9) - .unlockedBy("has_" + name, has(ingredient.get())), - "storage/" + name + "_storage_block", finished, enabled(sack)); - wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ingredient.get(), 9) - .requires(sack.get(), 1) - .unlockedBy("has_" + name + "_storage_block", has(sack.get())), - "storage/unpack_" + name + "_storage_block", finished, enabled(sack)); - } + private void sack(RegistryObject sack, Supplier ingredient, String name, Consumer finished) { + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, sack.get(), 1) + .requires(ingredient.get(), 9) + .unlockedBy("has_" + name, has(ingredient.get())), + "storage/" + name + "_storage_block", finished, enabled(sack)); + wrap(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ingredient.get(), 9) + .requires(sack.get(), 1) + .unlockedBy("has_" + name + "_storage_block", has(sack.get())), + "storage/unpack_" + name + "_storage_block", finished, enabled(sack)); + } - private void cabinet(Block block, Block wood, Block counter, Consumer finished) { - String path = Util.name(block); - ConditionalRecipe.builder() - .addCondition(enabled(path)) - .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, block, 1) - .define('b', ((DelightfulCabinetBlock) block).getIngredient()) - .define('c', wood) - .define('t', counter) - .pattern("ttt") - .pattern("bcb") - .pattern("bbb") - .unlockedBy("has_cabinet", has(wood)) - .save(f)) - .generateAdvancement() - .build(finished, Delightful.MODID, "cabinets/" + path); - } + private void cabinet(Block block, Block wood, Block counter, Consumer finished) { + String path = Util.name(block); + ConditionalRecipe.builder() + .addCondition(enabled(path)) + .addRecipe(f -> ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, block, 1) + .define('b', ((DelightfulCabinetBlock) block).getIngredient()) + .define('c', wood) + .define('t', counter) + .pattern("ttt") + .pattern("bcb") + .pattern("bbb") + .unlockedBy("has_cabinet", has(wood)) + .save(f)) + .generateAdvancement() + .build(finished, Delightful.MODID, "cabinets/" + path); + } - private void knife(DelightfulKnifeItem knife, Consumer finished) { - TagKey tag = knife.getTag(); - if (tag != null) { - String path = Util.name(knife); - ICondition[] conds = new ICondition[] { - enabled(path), - not(tagEmpty(tag)) - }; - String[] conflicts = knife.getConflicts(); - if (conflicts.length > 0) { - conds = ArrayUtils.addAll(conds, Arrays.stream(conflicts).map(conf -> not(modLoaded(conf))).toList().toArray(new ICondition[0])); - } - if (knife instanceof ICompat compat) { - conds = ArrayUtils.addAll(conds, Arrays.stream(compat.getModid()).map(this::modLoaded).toList().toArray(new ICondition[0])); - } - if (knife.getRecipeType() == RecipeType.SMITHING) { - wrap(SmithingTransformRecipeBuilder.smithing(knife.getSmithing().getLeft(), knife.getSmithing().getRight(), Ingredient.of(tag), RecipeCategory.COMBAT, knife) - .unlocks("has_" + tag.location().getPath(), has(tag)), - "knives/smithing/" + path, finished, conds); - } else { - wrap(ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, knife) - .define('m', Ingredient.of(tag)) - .define('s', knife.getRod()) - .pattern("m") - .pattern("s") - .unlockedBy("has_" + tag.location().getPath(), has(tag)), - "knives/" + path, finished, conds); - } - } - } + private void knife(DelightfulKnifeItem knife, Consumer finished) { + TagKey tag = knife.getTag(); + if (tag != null) { + String path = Util.name(knife); + ICondition[] conds = new ICondition[]{ + enabled(path), + not(tagEmpty(tag)) + }; + String[] conflicts = knife.getConflicts(); + if (conflicts.length > 0) { + conds = ArrayUtils.addAll(conds, Arrays.stream(conflicts).map(conf -> not(modLoaded(conf))).toList().toArray(new ICondition[0])); + } + if (knife instanceof ICompat compat) { + conds = ArrayUtils.addAll(conds, Arrays.stream(compat.getModid()).map(this::modLoaded).toList().toArray(new ICondition[0])); + } + if (knife.getRecipeType() == RecipeType.SMITHING) { + wrap(SmithingTransformRecipeBuilder.smithing(knife.getSmithing().getLeft(), knife.getSmithing().getRight(), Ingredient.of(tag), RecipeCategory.COMBAT, knife) + .unlocks("has_" + tag.location().getPath(), has(tag)), + "knives/smithing/" + path, finished, conds); + } else { + wrap(ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, knife) + .define('m', Ingredient.of(tag)) + .define('s', knife.getRod()) + .pattern("m") + .pattern("s") + .unlockedBy("has_" + tag.location().getPath(), has(tag)), + "knives/" + path, finished, conds); + } + } + } - private void knifeSmeltAndBlast(DelightfulKnifeItem knife, String metal, ResourceLocation nugget, Consumer finished) { - ConditionalRecipe.builder() - .addCondition(and(enabled(Util.name(knife)), itemExists(nugget.getNamespace(), nugget.getPath()))) - .addRecipe(f -> SimpleCookingRecipeBuilder.smelting(Ingredient.of(knife), RecipeCategory.COMBAT, Objects.requireNonNull(Util.item(nugget)), 0.1F, 200) - .unlockedBy("has_" + metal + "_knife", InventoryChangeTrigger.TriggerInstance.hasItems(knife)) - .save(f, Util.rl(Delightful.MODID, "knives/smelting/" + metal + "_" + nugget.getNamespace()))) - .generateAdvancement() - .build(finished, Delightful.MODID, "knives/smelting/" + metal + "_" + nugget.getNamespace()); - ConditionalRecipe.builder() - .addCondition(and(enabled(Util.name(knife)), itemExists(nugget.getNamespace(), nugget.getPath()))) - .addRecipe(f -> SimpleCookingRecipeBuilder.blasting(Ingredient.of(knife), RecipeCategory.COMBAT, Objects.requireNonNull(Util.item(nugget)), 0.1F, 100) - .unlockedBy("has_" + metal + "_knife", InventoryChangeTrigger.TriggerInstance.hasItems(knife)) - .save(f, Util.rl(Delightful.MODID, "knives/blasting/" + metal + "_" + nugget.getNamespace()))) - .generateAdvancement() - .build(finished, Delightful.MODID, "knives/blasting/" + metal + "_" + nugget.getNamespace()); - } + private void knifeSmeltAndBlast(DelightfulKnifeItem knife, String metal, ResourceLocation nugget, Consumer finished) { + ConditionalRecipe.builder() + .addCondition(and(enabled(Util.name(knife)), itemExists(nugget.getNamespace(), nugget.getPath()))) + .addRecipe(f -> SimpleCookingRecipeBuilder.smelting(Ingredient.of(knife), RecipeCategory.COMBAT, Objects.requireNonNull(Util.item(nugget)), 0.1F, 200) + .unlockedBy("has_" + metal + "_knife", InventoryChangeTrigger.TriggerInstance.hasItems(knife)) + .save(f, Util.rl(Delightful.MODID, "knives/smelting/" + metal + "_" + nugget.getNamespace()))) + .generateAdvancement() + .build(finished, Delightful.MODID, "knives/smelting/" + metal + "_" + nugget.getNamespace()); + ConditionalRecipe.builder() + .addCondition(and(enabled(Util.name(knife)), itemExists(nugget.getNamespace(), nugget.getPath()))) + .addRecipe(f -> SimpleCookingRecipeBuilder.blasting(Ingredient.of(knife), RecipeCategory.COMBAT, Objects.requireNonNull(Util.item(nugget)), 0.1F, 100) + .unlockedBy("has_" + metal + "_knife", InventoryChangeTrigger.TriggerInstance.hasItems(knife)) + .save(f, Util.rl(Delightful.MODID, "knives/blasting/" + metal + "_" + nugget.getNamespace()))) + .generateAdvancement() + .build(finished, Delightful.MODID, "knives/blasting/" + metal + "_" + nugget.getNamespace()); + } - private EnabledCondition enabled(RegistryObject item) { - return new EnabledCondition(Util.name(item)); - } + private EnabledCondition enabled(RegistryObject item) { + return new EnabledCondition(Util.name(item)); + } - private EnabledCondition enabled(String name) { - return new EnabledCondition(name); - } + private EnabledCondition enabled(String name) { + return new EnabledCondition(name); + } - private void foodSmeltingRecipes(String name, ItemLike ingredient, ItemLike result, float experience, Consumer consumer) { - wrap(SimpleCookingRecipeBuilder.smelting(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 200).unlockedBy(name, has(ingredient)), "smelting/" + name, consumer, enabled(name)); - wrap(SimpleCookingRecipeBuilder.campfireCooking(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 600).unlockedBy(name, has(ingredient)), "campfire/" + name, consumer, enabled(name)); - wrap(SimpleCookingRecipeBuilder.smoking(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 100).unlockedBy(name, has(ingredient)), "smoking/" + name, consumer, enabled(name)); - } + private void foodSmeltingRecipes(String name, ItemLike ingredient, ItemLike result, float experience, Consumer consumer) { + wrap(SimpleCookingRecipeBuilder.smelting(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 200).unlockedBy(name, has(ingredient)), "smelting/" + name, consumer, enabled(name)); + wrap(SimpleCookingRecipeBuilder.campfireCooking(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 600).unlockedBy(name, has(ingredient)), "campfire/" + name, consumer, enabled(name)); + wrap(SimpleCookingRecipeBuilder.smoking(Ingredient.of(ingredient), RecipeCategory.FOOD, result, experience, 100).unlockedBy(name, has(ingredient)), "smoking/" + name, consumer, enabled(name)); + } - private ShapedRecipeBuilder shaped(RecipeCategory category, RegistryObject returns, int count) { - return ShapedRecipeBuilder.shaped(category, returns.get(), count); - } + private ShapedRecipeBuilder shaped(RecipeCategory category, RegistryObject returns, int count) { + return ShapedRecipeBuilder.shaped(category, returns.get(), count); + } - private ShapedRecipeBuilder shaped(RecipeCategory category, RegistryObject returns) { - return shaped(category, returns, 1); - } + private ShapedRecipeBuilder shaped(RecipeCategory category, RegistryObject returns) { + return shaped(category, returns, 1); + } } \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/gen/Generators.java b/src/main/java/net/brnbrd/delightful/data/gen/Generators.java index 36e3ae3f..4409c4b5 100644 --- a/src/main/java/net/brnbrd/delightful/data/gen/Generators.java +++ b/src/main/java/net/brnbrd/delightful/data/gen/Generators.java @@ -15,30 +15,30 @@ import java.util.List; import java.util.concurrent.CompletableFuture; -@Mod.EventBusSubscriber(modid= Delightful.MODID) +@Mod.EventBusSubscriber(modid = Delightful.MODID) public class Generators { - // Gathering data - @SubscribeEvent - public static void gatherData(GatherDataEvent e) { - DataGenerator gen = e.getGenerator(); - PackOutput output = gen.getPackOutput(); - CompletableFuture lookup = e.getLookupProvider(); - ExistingFileHelper helper = e.getExistingFileHelper(); + // Gathering data + @SubscribeEvent + public static void gatherData(GatherDataEvent e) { + DataGenerator gen = e.getGenerator(); + PackOutput output = gen.getPackOutput(); + CompletableFuture lookup = e.getLookupProvider(); + ExistingFileHelper helper = e.getExistingFileHelper(); - gen.addProvider(e.includeServer(), new LootTableProvider(output, Collections.emptySet(), - List.of(new LootTableProvider.SubProviderEntry(DelightfulBlockLoot::new, LootContextParamSets.BLOCK)))); - e.getGenerator().addProvider(e.includeServer(), new DelightfulRecipeProvider(output)); - e.getGenerator().addProvider(e.includeServer(), new ForgeAdvancementProvider(output, lookup, helper, - List.of(new DelightfulAdvancementProvider()))); - DelightfulBlockTagProvider blockTag = new DelightfulBlockTagProvider(output, lookup, helper); - e.getGenerator().addProvider(e.includeServer(), blockTag); - e.getGenerator().addProvider(e.includeServer(), new DelightfulItemTagProvider(output, lookup, blockTag.contentsGetter(), helper)); - e.getGenerator().addProvider(e.includeServer(), new DelightfulEntityTagProvider(output, lookup, helper)); - e.getGenerator().addProvider(e.includeServer(), new DelightfulLootModifierProvider(output)); + gen.addProvider(e.includeServer(), new LootTableProvider(output, Collections.emptySet(), + List.of(new LootTableProvider.SubProviderEntry(DelightfulBlockLoot::new, LootContextParamSets.BLOCK)))); + e.getGenerator().addProvider(e.includeServer(), new DelightfulRecipeProvider(output)); + e.getGenerator().addProvider(e.includeServer(), new ForgeAdvancementProvider(output, lookup, helper, + List.of(new DelightfulAdvancementProvider()))); + DelightfulBlockTagProvider blockTag = new DelightfulBlockTagProvider(output, lookup, helper); + e.getGenerator().addProvider(e.includeServer(), blockTag); + e.getGenerator().addProvider(e.includeServer(), new DelightfulItemTagProvider(output, lookup, blockTag.contentsGetter(), helper)); + e.getGenerator().addProvider(e.includeServer(), new DelightfulEntityTagProvider(output, lookup, helper)); + e.getGenerator().addProvider(e.includeServer(), new DelightfulLootModifierProvider(output)); - e.getGenerator().addProvider(e.includeClient(), new DelightfulBlockStateProvider(output, helper)); - e.getGenerator().addProvider(e.includeClient(), new DelightfulItemModelProvider(output, helper)); - e.getGenerator().addProvider(e.includeClient(), new DelightfulLanguageProvider(output)); - } -} + e.getGenerator().addProvider(e.includeClient(), new DelightfulBlockStateProvider(output, helper)); + e.getGenerator().addProvider(e.includeClient(), new DelightfulItemModelProvider(output, helper)); + e.getGenerator().addProvider(e.includeClient(), new DelightfulLanguageProvider(output)); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/data/tags/DelightfulEntityTags.java b/src/main/java/net/brnbrd/delightful/data/tags/DelightfulEntityTags.java index edbb1a71..880437ea 100644 --- a/src/main/java/net/brnbrd/delightful/data/tags/DelightfulEntityTags.java +++ b/src/main/java/net/brnbrd/delightful/data/tags/DelightfulEntityTags.java @@ -14,10 +14,10 @@ public class DelightfulEntityTags { public static final TagKey> DROPS_RAW_GOAT = create("drops_raw_goat"); // Aether - public static final TagKey> NO_AMBROSIUM_DROPS = Util.et(Mods.AE, "no_ambrosium_drops"); - public static final TagKey> UNLAUNCHABLE = Util.et(Mods.AE, "unlaunchable"); + public static final TagKey> NO_AMBROSIUM_DROPS = Util.et(Mods.AE, "no_ambrosium_drops"); + public static final TagKey> UNLAUNCHABLE = Util.et(Mods.AE, "unlaunchable"); private static TagKey> create(String pName) { return Util.et(Delightful.MODID, pName); } -} +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/network/DPacketHandler.java b/src/main/java/net/brnbrd/delightful/network/DPacketHandler.java index 35023cc3..16a9294e 100644 --- a/src/main/java/net/brnbrd/delightful/network/DPacketHandler.java +++ b/src/main/java/net/brnbrd/delightful/network/DPacketHandler.java @@ -15,23 +15,19 @@ import java.util.function.Supplier; public class DPacketHandler { - interface TriConsumer { - void accept(T var1, U var2, R var3); - } - private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( - Util.rl(Delightful.MODID, "main"), - () -> PROTOCOL_VERSION, - PROTOCOL_VERSION::equals, - PROTOCOL_VERSION::equals + Util.rl(Delightful.MODID, "main"), + () -> PROTOCOL_VERSION, + PROTOCOL_VERSION::equals, + PROTOCOL_VERSION::equals ); public static void init() { // Serverbound if (Mods.loaded(Mods.BTA)) { INSTANCE.registerMessage(0, BotaniaLCP.class, BotaniaLCP::encode, BotaniaLCP::decode, - makeServerBoundHandler(BotaniaLCP::handle)); + makeServerBoundHandler(BotaniaLCP::handle)); } } @@ -48,4 +44,8 @@ private static BiConsumer> makeClientBound ctx.get().setPacketHandled(true); }; } -} + + interface TriConsumer { + void accept(T var1, U var2, R var3); + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/proxy/ClientProxy.java b/src/main/java/net/brnbrd/delightful/proxy/ClientProxy.java index 0ba05757..6d8f7a3a 100644 --- a/src/main/java/net/brnbrd/delightful/proxy/ClientProxy.java +++ b/src/main/java/net/brnbrd/delightful/proxy/ClientProxy.java @@ -3,22 +3,22 @@ import net.brnbrd.delightful.compat.AppleSkinEventHandler; import net.brnbrd.delightful.compat.Mods; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.eventbus.api.SubscribeEvent; public class ClientProxy extends CommonProxy { - @Override - public void start() { - super.start(); - FMLJavaModLoadingContext.get().getModEventBus().register(this); - } + @Override + public void start() { + super.start(); + FMLJavaModLoadingContext.get().getModEventBus().register(this); + } - @SubscribeEvent - public void setupClient(FMLClientSetupEvent e){ - if (Mods.loaded(Mods.AS)) { - MinecraftForge.EVENT_BUS.register(new AppleSkinEventHandler()); - } - } -} + @SubscribeEvent + public void setupClient(FMLClientSetupEvent e) { + if (Mods.loaded(Mods.AS)) { + MinecraftForge.EVENT_BUS.register(new AppleSkinEventHandler()); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/brnbrd/delightful/proxy/CommonProxy.java b/src/main/java/net/brnbrd/delightful/proxy/CommonProxy.java index e846ada5..ec6c24eb 100644 --- a/src/main/java/net/brnbrd/delightful/proxy/CommonProxy.java +++ b/src/main/java/net/brnbrd/delightful/proxy/CommonProxy.java @@ -1,12 +1,12 @@ package net.brnbrd.delightful.proxy; -import net.brnbrd.delightful.common.events.ModEvents; -import net.brnbrd.delightful.common.events.ForgeEvents; import net.brnbrd.delightful.common.block.DelightfulBlocks; +import net.brnbrd.delightful.common.events.ForgeEvents; +import net.brnbrd.delightful.common.events.KnifeEvents; +import net.brnbrd.delightful.common.events.ModEvents; import net.brnbrd.delightful.common.events.pie.PieEvents; import net.brnbrd.delightful.common.fluid.DelightfulFluids; import net.brnbrd.delightful.common.item.DelightfulItems; -import net.brnbrd.delightful.common.events.KnifeEvents; import net.brnbrd.delightful.common.item.knife.Knives; import net.brnbrd.delightful.common.loot.DelightfulLootItemConditions; import net.brnbrd.delightful.common.loot.DelightfulLootModifiers; @@ -16,19 +16,19 @@ public class CommonProxy { - public void start() { - final var modBus = FMLJavaModLoadingContext.get().getModEventBus(); - final var forgeBus = MinecraftForge.EVENT_BUS; - forgeBus.register(new ForgeEvents()); - forgeBus.register(new KnifeEvents()); - forgeBus.register(new PieEvents()); - modBus.register(new ModEvents()); - modBus.register(Generators.class); - DelightfulBlocks.create(modBus); - DelightfulFluids.create(modBus); - Knives.create(); - DelightfulItems.create(modBus); - DelightfulLootItemConditions.create(modBus); - DelightfulLootModifiers.create(modBus); - } + public void start() { + final var modBus = FMLJavaModLoadingContext.get().getModEventBus(); + final var forgeBus = MinecraftForge.EVENT_BUS; + forgeBus.register(new ForgeEvents()); + forgeBus.register(new KnifeEvents()); + forgeBus.register(new PieEvents()); + modBus.register(new ModEvents()); + modBus.register(Generators.class); + DelightfulBlocks.create(modBus); + DelightfulFluids.create(modBus); + Knives.create(); + DelightfulItems.create(modBus); + DelightfulLootItemConditions.create(modBus); + DelightfulLootModifiers.create(modBus); + } } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage0.json b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage0.json index 07c39b88..b3d4b4f8 100644 --- a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage0.json +++ b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage0.json @@ -1,81 +1,422 @@ { - "credit": "Made with Blockbench", - "parent": "block/block", - "render_type": "minecraft:cutout", - "texture_size": [12, 10], - "textures": { - "0": "delightful:block/cantaloupe_plant", - "particle": "delightful:block/cantaloupe_plant" - }, - "elements": [ - { - "from": [5, -3, 9], - "to": [11, -3, 13], - "rotation": {"angle": -22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [4, 0, 12, 6.4], "rotation": 180, "texture": "#0"}, - "down": {"uv": [4, 0, 12, 6.4], "texture": "#0"} - } - }, - { - "from": [9, -3, 5], - "to": [13, -3, 11], - "rotation": {"angle": 22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [4, 0, 12, 6.4], "rotation": 90, "texture": "#0"}, - "down": {"uv": [4, 0, 12, 6.4], "rotation": 90, "texture": "#0"} - } - }, - { - "from": [5, 3, 2], - "to": [11, 3, 6], - "rotation": {"angle": 22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [4, 0, 12, 6.4], "texture": "#0"}, - "down": {"uv": [4, 0, 12, 6.4], "rotation": 180, "texture": "#0"} - } - }, - { - "from": [2, 3, 5], - "to": [6, 3, 11], - "rotation": {"angle": -22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [4, 0, 12, 6.4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [4, 0, 12, 6.4], "rotation": 270, "texture": "#0"} - } - }, - { - "from": [6, 0.025, 6], - "to": [10, 1.025, 10], - "shade": false, - "faces": { - "north": {"uv": [5.33333, 4.8, 10.66667, 6.4], "texture": "#0", "cullface": "north"}, - "east": {"uv": [5.33333, 8, 10.66667, 9.6], "texture": "#0", "cullface": "east"}, - "south": {"uv": [5.33333, 6.4, 10.66667, 8], "texture": "#0", "cullface": "south"}, - "west": {"uv": [5.33333, 4.8, 10.66667, 6.4], "texture": "#0", "cullface": "west"}, - "up": {"uv": [5.33333, 3.2, 10.66667, 9.6], "texture": "#0"}, - "down": {"uv": [5.33333, 3.2, 10.66667, 9.6], "texture": "#0"} - } - } - ] + "credit": "Made with Blockbench", + "parent": "block/block", + "render_type": "minecraft:cutout", + "texture_size": [ + 12, + 10 + ], + "textures": { + "0": "delightful:block/cantaloupe_plant", + "particle": "delightful:block/cantaloupe_plant" + }, + "elements": [ + { + "from": [ + 5, + -3, + 9 + ], + "to": [ + 11, + -3, + 13 + ], + "rotation": { + "angle": -22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + -3, + 5 + ], + "to": [ + 13, + -3, + 11 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 3, + 2 + ], + "to": [ + 11, + 3, + 6 + ], + "rotation": { + "angle": 22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 3, + 5 + ], + "to": [ + 6, + 3, + 11 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 0, + 12, + 6.4 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 0.025, + 6 + ], + "to": [ + 10, + 1.025, + 10 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 5.33333, + 4.8, + 10.66667, + 6.4 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 5.33333, + 8, + 10.66667, + 9.6 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 5.33333, + 6.4, + 10.66667, + 8 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 5.33333, + 4.8, + 10.66667, + 6.4 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 5.33333, + 3.2, + 10.66667, + 9.6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 5.33333, + 3.2, + 10.66667, + 9.6 + ], + "texture": "#0" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage1.json b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage1.json index e9744184..ab9749c9 100644 --- a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage1.json +++ b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage1.json @@ -1,81 +1,422 @@ { - "credit": "Made with Blockbench", - "parent": "block/block", - "render_type": "minecraft:cutout", - "texture_size": [12, 10], - "textures": { - "0": "delightful:block/cantaloupe_plant", - "particle": "delightful:block/cantaloupe_plant" - }, - "elements": [ - { - "from": [4, -4, 10], - "to": [12, -4, 15], - "rotation": {"angle": -22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 180, "texture": "#0"}, - "down": {"uv": [2.66666, 0, 13.33334, 8], "texture": "#0"} - } - }, - { - "from": [10, -4, 4], - "to": [15, -4, 12], - "rotation": {"angle": 22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 90, "texture": "#0"}, - "down": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 90, "texture": "#0"} - } - }, - { - "from": [4, 2, 0], - "to": [12, 2, 5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [2.66666, 0, 13.33334, 8], "texture": "#0"}, - "down": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 180, "texture": "#0"} - } - }, - { - "from": [0, 2, 4], - "to": [5, 2, 12], - "rotation": {"angle": -22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 270, "texture": "#0"}, - "down": {"uv": [2.66666, 0, 13.33334, 8], "rotation": 270, "texture": "#0"} - } - }, - { - "from": [5, 0.025, 5], - "to": [11, 1.025, 11], - "shade": false, - "faces": { - "north": {"uv": [4, 8, 12, 9.6], "texture": "#0", "cullface": "north"}, - "east": {"uv": [4, 8, 12, 9.6], "texture": "#0", "cullface": "east"}, - "south": {"uv": [4, 6.4, 12, 8], "texture": "#0", "cullface": "south"}, - "west": {"uv": [4, 4.8, 12, 6.4], "texture": "#0", "cullface": "west"}, - "up": {"uv": [4, 1.6, 12, 11.2], "texture": "#0"}, - "down": {"uv": [4, 1.6, 12, 11.2], "texture": "#0"} - } - } - ] + "credit": "Made with Blockbench", + "parent": "block/block", + "render_type": "minecraft:cutout", + "texture_size": [ + 12, + 10 + ], + "textures": { + "0": "delightful:block/cantaloupe_plant", + "particle": "delightful:block/cantaloupe_plant" + }, + "elements": [ + { + "from": [ + 4, + -4, + 10 + ], + "to": [ + 12, + -4, + 15 + ], + "rotation": { + "angle": -22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 10, + -4, + 4 + ], + "to": [ + 15, + -4, + 12 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 4, + 2, + 0 + ], + "to": [ + 12, + 2, + 5 + ], + "rotation": { + "angle": 22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 0, + 2, + 4 + ], + "to": [ + 5, + 2, + 12 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 2.66666, + 0, + 13.33334, + 8 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0.025, + 5 + ], + "to": [ + 11, + 1.025, + 11 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 4, + 8, + 12, + 9.6 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 4, + 8, + 12, + 9.6 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 4, + 6.4, + 12, + 8 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 4, + 4.8, + 12, + 6.4 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 4, + 1.6, + 12, + 11.2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 1.6, + 12, + 11.2 + ], + "texture": "#0" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage2.json b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage2.json index 92d2450a..061baaa2 100644 --- a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage2.json +++ b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage2.json @@ -1,82 +1,420 @@ { - "credit": "Made with Blockbench", - "parent": "block/block", - "render_type": "minecraft:cutout", - "texture_size": [12, 10], - "textures": { - "0": "delightful:block/cantaloupe_plant", - "1": "delightful:block/cantaloupe_medium", - "particle": "delightful:block/cantaloupe_plant" - }, - "elements": [ - { - "from": [10, -4, 3], - "to": [19, -4, 13], - "rotation": {"angle": 22.5, "axis": "z", "origin": [0, -1, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 90, "texture": "#0"}, - "down": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 90, "texture": "#0"} - } - }, - { - "from": [5, 0, 5], - "to": [11, 6, 11], - "shade": false, - "faces": { - "north": {"uv": [5, 7, 11, 14], "texture": "#1"}, - "east": {"uv": [5, 7, 11, 14], "texture": "#1"}, - "south": {"uv": [5, 7, 11, 14], "texture": "#1"}, - "west": {"uv": [5, 7, 11, 14], "texture": "#1"}, - "up": {"uv": [5, 2, 11, 7], "texture": "#1"}, - "down": {"uv": [5, 2, 11, 7], "texture": "#1", "cullface": "down"} - } - }, - { - "from": [-4, 2, 3], - "to": [5, 2, 12], - "rotation": {"angle": -22.5, "axis": "z", "origin": [0, -1, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 270, "texture": "#0"}, - "down": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 270, "texture": "#0"} - } - }, - { - "from": [3, 2, -4], - "to": [13, 2, 5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [0, -1, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [1.33333, 0, 14.66667, 14.4], "texture": "#0"}, - "down": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 180, "texture": "#0"} - } - }, - { - "from": [3, -4, 10], - "to": [13, -4, 19], - "rotation": {"angle": -22.5, "axis": "x", "origin": [0, -1, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [1.33333, 0, 14.66667, 14.4], "rotation": 180, "texture": "#0"}, - "down": {"uv": [1.33333, 0, 14.66667, 14.4], "texture": "#0"} - } - } - ] + "credit": "Made with Blockbench", + "parent": "block/block", + "render_type": "minecraft:cutout", + "texture_size": [ + 12, + 10 + ], + "textures": { + "0": "delightful:block/cantaloupe_plant", + "1": "delightful:block/cantaloupe_medium", + "particle": "delightful:block/cantaloupe_plant" + }, + "elements": [ + { + "from": [ + 10, + -4, + 3 + ], + "to": [ + 19, + -4, + 13 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 0, + -1, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0, + 5 + ], + "to": [ + 11, + 6, + 11 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 5, + 7, + 11, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 5, + 7, + 11, + 14 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 5, + 7, + 11, + 14 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 5, + 7, + 11, + 14 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 5, + 2, + 11, + 7 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 5, + 2, + 11, + 7 + ], + "texture": "#1", + "cullface": "down" + } + } + }, + { + "from": [ + -4, + 2, + 3 + ], + "to": [ + 5, + 2, + 12 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 0, + -1, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 3, + 2, + -4 + ], + "to": [ + 13, + 2, + 5 + ], + "rotation": { + "angle": 22.5, + "axis": "x", + "origin": [ + 0, + -1, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 3, + -4, + 10 + ], + "to": [ + 13, + -4, + 19 + ], + "rotation": { + "angle": -22.5, + "axis": "x", + "origin": [ + 0, + -1, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 1.33333, + 0, + 14.66667, + 14.4 + ], + "texture": "#0" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage3.json b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage3.json index a331cb8e..b3a96d63 100644 --- a/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage3.json +++ b/src/main/resources/assets/delightful/models/block/cantaloupe_plant_stage3.json @@ -1,83 +1,420 @@ { - "credit": "Made with Blockbench", - "parent": "block/block", - "render_type": "minecraft:cutout", - "texture_size": [12, 10], - "textures": { - "1": "delightful:block/cantaloupe_top", - "2": "delightful:block/cantaloupe_side_small", - "3": "delightful:block/cantaloupe_plant", - "particle": "delightful:block/cantaloupe_plant" - }, - "elements": [ - { - "from": [-5, 2, 2], - "to": [5, 2, 14], - "rotation": {"angle": -22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#3", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#3", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#3", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#3", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#3"}, - "down": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#3"} - } - }, - { - "from": [10, -4, 2], - "to": [20, -4, 14], - "rotation": {"angle": 22.5, "axis": "z", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#3"}, - "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#3"} - } - }, - { - "from": [2, 2, -5], - "to": [14, 2, 5], - "rotation": {"angle": 22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, - "down": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#3"} - } - }, - { - "from": [2, -4, 10], - "to": [14, -4, 20], - "rotation": {"angle": -22.5, "axis": "x", "origin": [0, 0, 0]}, - "shade": false, - "faces": { - "north": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "north"}, - "east": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "east"}, - "south": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "south"}, - "west": {"uv": [0, 0, 6, 0], "texture": "#0", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#3"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#3"} - } - }, - { - "from": [4, 0, 4], - "to": [12, 8, 12], - "shade": false, - "faces": { - "north": {"uv": [4, 8, 12, 16], "texture": "#2"}, - "east": {"uv": [4, 8, 12, 16], "texture": "#2"}, - "south": {"uv": [4, 8, 12, 16], "texture": "#2"}, - "west": {"uv": [4, 8, 12, 16], "texture": "#2"}, - "up": {"uv": [4, 4, 12, 12], "texture": "#1"}, - "down": {"uv": [4, 4, 12, 12], "texture": "#1"} - } - } - ] + "credit": "Made with Blockbench", + "parent": "block/block", + "render_type": "minecraft:cutout", + "texture_size": [ + 12, + 10 + ], + "textures": { + "1": "delightful:block/cantaloupe_top", + "2": "delightful:block/cantaloupe_side_small", + "3": "delightful:block/cantaloupe_plant", + "particle": "delightful:block/cantaloupe_plant" + }, + "elements": [ + { + "from": [ + -5, + 2, + 2 + ], + "to": [ + 5, + 2, + 14 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#3", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#3", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#3", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#3", + "cullface": "west" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 270, + "texture": "#3" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 270, + "texture": "#3" + } + } + }, + { + "from": [ + 10, + -4, + 2 + ], + "to": [ + 20, + -4, + 14 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 90, + "texture": "#3" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 90, + "texture": "#3" + } + } + }, + { + "from": [ + 2, + 2, + -5 + ], + "to": [ + 14, + 2, + 5 + ], + "rotation": { + "angle": 22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#3" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 180, + "texture": "#3" + } + } + }, + { + "from": [ + 2, + -4, + 10 + ], + "to": [ + 14, + -4, + 20 + ], + "rotation": { + "angle": -22.5, + "axis": "x", + "origin": [ + 0, + 0, + 0 + ] + }, + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "north" + }, + "east": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "east" + }, + "south": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "south" + }, + "west": { + "uv": [ + 0, + 0, + 6, + 0 + ], + "texture": "#0", + "cullface": "west" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "rotation": 180, + "texture": "#3" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#3" + } + } + }, + { + "from": [ + 4, + 0, + 4 + ], + "to": [ + 12, + 8, + 12 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 4, + 8, + 12, + 16 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 4, + 8, + 12, + 16 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 4, + 8, + 12, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 8, + 12, + 16 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 4, + 4, + 12, + 12 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 4, + 4, + 12, + 12 + ], + "texture": "#1" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage0.json b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage0.json index a6b83e48..5605f592 100644 --- a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage0.json +++ b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage0.json @@ -1,87 +1,332 @@ { - "credit": "Made with Blockbench, by Championhestu.", - "ambientocclusion": false, - "textures": { - "1": "delightful:block/cantaloupe_side_small", - "2": "delightful:block/cantaloupe_top", - "3": "delightful:block/cantaloupe_inside_small", - "4": "delightful:block/stuffed_cantaloupe_details", - "particle": "delightful:block/cantaloupe_top" - }, - "elements": [ - { - "name": "spoon", - "from": [6, 8, 7], - "to": [8, 18, 9], - "rotation": {"angle": 22.5, "axis": "z", "origin": [9, 9, 8]}, - "faces": { - "north": {"uv": [2, 3, 4, 13], "texture": "#4"}, - "east": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#4"}, - "south": {"uv": [2, 3, 4, 13], "texture": "#4"}, - "west": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#4"}, - "up": {"uv": [2, 1, 4, 3], "texture": "#4"}, - "down": {"uv": [2, 1, 4, 3], "texture": "#4"} - } - }, - { - "name": "stuffing", - "from": [4, 10, 4], - "to": [12, 12, 12], - "faces": { - "north": {"uv": [6, 4, 14, 6], "rotation": 180, "texture": "#4"}, - "east": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#4"}, - "south": {"uv": [6, 10, 14, 12], "texture": "#4"}, - "west": {"uv": [6, 4, 8, 12], "rotation": 270, "texture": "#4"}, - "up": {"uv": [6, 4, 14, 12], "texture": "#4"}, - "down": {"uv": [6, 4, 14, 12], "texture": "#4"} - } - }, - { - "name": "cantaloupe", - "from": [3, 0, 3], - "to": [13, 10, 13], - "faces": { - "north": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "east": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "south": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "west": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "up": {"uv": [3, 6, 13, 16], "texture": "#3"}, - "down": {"uv": [3, 3, 13, 13], "texture": "#2"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "thirdperson_lefthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "firstperson_righthand": { - "rotation": [0, 45, 0], - "scale": [0.4, 0.4, 0.4] - }, - "firstperson_lefthand": { - "rotation": [0, 225, 0], - "scale": [0.4, 0.4, 0.4] - }, - "ground": { - "translation": [0, 3, 0], - "scale": [0.25, 0.25, 0.25] - }, - "gui": { - "rotation": [30, 225, 0], - "scale": [0.625, 0.625, 0.625] - }, - "head": { - "translation": [0, 14.25, 0] - }, - "fixed": { - "scale": [0.5, 0.5, 0.5] - } - } + "credit": "Made with Blockbench, by Championhestu.", + "ambientocclusion": false, + "textures": { + "1": "delightful:block/cantaloupe_side_small", + "2": "delightful:block/cantaloupe_top", + "3": "delightful:block/cantaloupe_inside_small", + "4": "delightful:block/stuffed_cantaloupe_details", + "particle": "delightful:block/cantaloupe_top" + }, + "elements": [ + { + "name": "spoon", + "from": [ + 6, + 8, + 7 + ], + "to": [ + 8, + 18, + 9 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 9, + 9, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#4" + }, + "east": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#4" + }, + "south": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#4" + }, + "west": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#4" + }, + "up": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#4" + }, + "down": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#4" + } + } + }, + { + "name": "stuffing", + "from": [ + 4, + 10, + 4 + ], + "to": [ + 12, + 12, + 12 + ], + "faces": { + "north": { + "uv": [ + 6, + 4, + 14, + 6 + ], + "rotation": 180, + "texture": "#4" + }, + "east": { + "uv": [ + 12, + 4, + 14, + 12 + ], + "rotation": 90, + "texture": "#4" + }, + "south": { + "uv": [ + 6, + 10, + 14, + 12 + ], + "texture": "#4" + }, + "west": { + "uv": [ + 6, + 4, + 8, + 12 + ], + "rotation": 270, + "texture": "#4" + }, + "up": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#4" + }, + "down": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#4" + } + } + }, + { + "name": "cantaloupe", + "from": [ + 3, + 0, + 3 + ], + "to": [ + 13, + 10, + 13 + ], + "faces": { + "north": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#3" + }, + "down": { + "uv": [ + 3, + 3, + 13, + 13 + ], + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 75, + 45, + 0 + ], + "translation": [ + 0, + 2.5, + 0 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 75, + 45, + 0 + ], + "translation": [ + 0, + 2.5, + 0 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + }, + "firstperson_righthand": { + "rotation": [ + 0, + 45, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_lefthand": { + "rotation": [ + 0, + 225, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "ground": { + "translation": [ + 0, + 3, + 0 + ], + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "gui": { + "rotation": [ + 30, + 225, + 0 + ], + "scale": [ + 0.625, + 0.625, + 0.625 + ] + }, + "head": { + "translation": [ + 0, + 14.25, + 0 + ] + }, + "fixed": { + "scale": [ + 0.5, + 0.5, + 0.5 + ] + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage1.json b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage1.json index a4578130..07cdadae 100644 --- a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage1.json +++ b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage1.json @@ -1,53 +1,234 @@ { - "credit": "Made with Blockbench, by Championhestu.", - "ambientocclusion": false, - "textures": { - "0": "delightful:block/stuffed_cantaloupe_details", - "1": "delightful:block/cantaloupe_inside_small", - "2": "delightful:block/cantaloupe_side_small", - "3": "delightful:block/cantaloupe_top", - "particle": "delightful:block/cantaloupe_top" - }, - "elements": [ - { - "name": "spoon", - "from": [6, 5, 7], - "to": [8, 15, 9], - "rotation": {"angle": 22.5, "axis": "z", "origin": [9, 9, 8]}, - "faces": { - "north": {"uv": [2, 3, 4, 13], "texture": "#0"}, - "east": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#0"}, - "south": {"uv": [2, 3, 4, 13], "texture": "#0"}, - "west": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#0"}, - "up": {"uv": [2, 1, 4, 3], "texture": "#0"}, - "down": {"uv": [2, 1, 4, 3], "texture": "#0"} - } - }, - { - "name": "stuffing", - "from": [4, 7, 4], - "to": [12, 9, 12], - "faces": { - "north": {"uv": [6, 4, 14, 6], "rotation": 180, "texture": "#0"}, - "east": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#0"}, - "south": {"uv": [6, 10, 14, 12], "texture": "#0"}, - "west": {"uv": [6, 4, 8, 12], "rotation": 270, "texture": "#0"}, - "up": {"uv": [6, 4, 14, 12], "texture": "#0"}, - "down": {"uv": [6, 4, 14, 12], "texture": "#0"} - } - }, - { - "name": "cantaloupe", - "from": [3, 0, 3], - "to": [13, 8, 13], - "faces": { - "north": {"uv": [3, 8, 13, 16], "texture": "#2"}, - "east": {"uv": [3, 8, 13, 16], "texture": "#2"}, - "south": {"uv": [3, 8, 13, 16], "texture": "#2"}, - "west": {"uv": [3, 8, 13, 16], "texture": "#2"}, - "up": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "down": {"uv": [3, 3, 13, 13], "texture": "#3"} - } - } - ] + "credit": "Made with Blockbench, by Championhestu.", + "ambientocclusion": false, + "textures": { + "0": "delightful:block/stuffed_cantaloupe_details", + "1": "delightful:block/cantaloupe_inside_small", + "2": "delightful:block/cantaloupe_side_small", + "3": "delightful:block/cantaloupe_top", + "particle": "delightful:block/cantaloupe_top" + }, + "elements": [ + { + "name": "spoon", + "from": [ + 6, + 5, + 7 + ], + "to": [ + 8, + 15, + 9 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 9, + 9, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#0" + } + } + }, + { + "name": "stuffing", + "from": [ + 4, + 7, + 4 + ], + "to": [ + 12, + 9, + 12 + ], + "faces": { + "north": { + "uv": [ + 6, + 4, + 14, + 6 + ], + "rotation": 180, + "texture": "#0" + }, + "east": { + "uv": [ + 12, + 4, + 14, + 12 + ], + "rotation": 90, + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 10, + 14, + 12 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 4, + 8, + 12 + ], + "rotation": 270, + "texture": "#0" + }, + "up": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + } + } + }, + { + "name": "cantaloupe", + "from": [ + 3, + 0, + 3 + ], + "to": [ + 13, + 8, + 13 + ], + "faces": { + "north": { + "uv": [ + 3, + 8, + 13, + 16 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 3, + 8, + 13, + 16 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 3, + 8, + 13, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 3, + 8, + 13, + 16 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 3, + 3, + 13, + 13 + ], + "texture": "#3" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage2.json b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage2.json index 31b5879a..e103b7a2 100644 --- a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage2.json +++ b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage2.json @@ -1,53 +1,234 @@ { - "credit": "Made with Blockbench, by Championhestu.", - "ambientocclusion": false, - "textures": { - "0": "delightful:block/stuffed_cantaloupe_details", - "1": "delightful:block/cantaloupe_inside_small", - "2": "delightful:block/cantaloupe_side_small", - "3": "delightful:block/cantaloupe_top", - "particle": "delightful:block/cantaloupe_top" - }, - "elements": [ - { - "name": "spoon", - "from": [7, 3, 7], - "to": [9, 13, 9], - "rotation": {"angle": 45, "axis": "z", "origin": [8, 4, 8]}, - "faces": { - "north": {"uv": [2, 3, 4, 13], "texture": "#0"}, - "east": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#0"}, - "south": {"uv": [2, 3, 4, 13], "texture": "#0"}, - "west": {"uv": [2, 3, 4, 13], "rotation": 180, "texture": "#0"}, - "up": {"uv": [2, 1, 4, 3], "texture": "#0"}, - "down": {"uv": [2, 1, 4, 3], "texture": "#0"} - } - }, - { - "name": "stuffing", - "from": [4, 4, 4], - "to": [12, 6, 12], - "faces": { - "north": {"uv": [6, 4, 14, 6], "rotation": 180, "texture": "#0"}, - "east": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#0"}, - "south": {"uv": [6, 10, 14, 12], "texture": "#0"}, - "west": {"uv": [6, 4, 8, 12], "rotation": 270, "texture": "#0"}, - "up": {"uv": [6, 4, 14, 12], "texture": "#0"}, - "down": {"uv": [6, 4, 14, 12], "texture": "#0"} - } - }, - { - "name": "cantaloupe", - "from": [3, 0, 3], - "to": [13, 5, 13], - "faces": { - "north": {"uv": [3, 11, 13, 16], "texture": "#2"}, - "east": {"uv": [3, 11, 13, 16], "texture": "#2"}, - "south": {"uv": [3, 11, 13, 16], "texture": "#2"}, - "west": {"uv": [3, 11, 13, 16], "texture": "#2"}, - "up": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "down": {"uv": [3, 3, 13, 13], "texture": "#3"} - } - } - ] + "credit": "Made with Blockbench, by Championhestu.", + "ambientocclusion": false, + "textures": { + "0": "delightful:block/stuffed_cantaloupe_details", + "1": "delightful:block/cantaloupe_inside_small", + "2": "delightful:block/cantaloupe_side_small", + "3": "delightful:block/cantaloupe_top", + "particle": "delightful:block/cantaloupe_top" + }, + "elements": [ + { + "name": "spoon", + "from": [ + 7, + 3, + 7 + ], + "to": [ + 9, + 13, + 9 + ], + "rotation": { + "angle": 45, + "axis": "z", + "origin": [ + 8, + 4, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 180, + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "texture": "#0" + } + } + }, + { + "name": "stuffing", + "from": [ + 4, + 4, + 4 + ], + "to": [ + 12, + 6, + 12 + ], + "faces": { + "north": { + "uv": [ + 6, + 4, + 14, + 6 + ], + "rotation": 180, + "texture": "#0" + }, + "east": { + "uv": [ + 12, + 4, + 14, + 12 + ], + "rotation": 90, + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 10, + 14, + 12 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 4, + 8, + 12 + ], + "rotation": 270, + "texture": "#0" + }, + "up": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + } + } + }, + { + "name": "cantaloupe", + "from": [ + 3, + 0, + 3 + ], + "to": [ + 13, + 5, + 13 + ], + "faces": { + "north": { + "uv": [ + 3, + 11, + 13, + 16 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 3, + 11, + 13, + 16 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 3, + 11, + 13, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 3, + 11, + 13, + 16 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 3, + 3, + 13, + 13 + ], + "texture": "#3" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage3.json b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage3.json index eb47f31a..e442c4e8 100644 --- a/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage3.json +++ b/src/main/resources/assets/delightful/models/block/stuffed_cantaloupe_block_stage3.json @@ -1,53 +1,238 @@ { - "credit": "Made with Blockbench, by Championhestu.", - "ambientocclusion": false, - "textures": { - "0": "delightful:block/stuffed_cantaloupe_details", - "1": "delightful:block/cantaloupe_inside_small", - "2": "delightful:block/cantaloupe_side_small", - "3": "delightful:block/cantaloupe_top", - "particle": "delightful:block/cantaloupe_top" - }, - "elements": [ - { - "name": "spoon", - "from": [-1, 1.1, 7], - "to": [9, 3.1, 9], - "rotation": {"angle": -22.5, "axis": "z", "origin": [8, 4, 8]}, - "faces": { - "north": {"uv": [2, 3, 4, 13], "rotation": 90, "texture": "#0"}, - "east": {"uv": [2, 1, 4, 3], "rotation": 270, "texture": "#0"}, - "south": {"uv": [2, 3, 4, 13], "rotation": 270, "texture": "#0"}, - "west": {"uv": [2, 1, 4, 3], "rotation": 270, "texture": "#0"}, - "up": {"uv": [2, 3, 4, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [2, 3, 4, 13], "rotation": 90, "texture": "#0"} - } - }, - { - "name": "stuffing", - "from": [4, 1, 4], - "to": [12, 3, 12], - "faces": { - "north": {"uv": [6, 4, 14, 6], "rotation": 180, "texture": "#0"}, - "east": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#0"}, - "south": {"uv": [6, 10, 14, 12], "texture": "#0"}, - "west": {"uv": [6, 4, 8, 12], "rotation": 270, "texture": "#0"}, - "up": {"uv": [6, 4, 14, 12], "texture": "#0"}, - "down": {"uv": [6, 4, 14, 12], "texture": "#0"} - } - }, - { - "name": "cantaloupe", - "from": [3, 0, 3], - "to": [13, 2, 13], - "faces": { - "north": {"uv": [3, 14, 13, 16], "texture": "#2"}, - "east": {"uv": [3, 14, 13, 16], "texture": "#2"}, - "south": {"uv": [3, 14, 13, 16], "texture": "#2"}, - "west": {"uv": [3, 14, 13, 16], "texture": "#2"}, - "up": {"uv": [3, 6, 13, 16], "texture": "#1"}, - "down": {"uv": [3, 3, 13, 13], "texture": "#3"} - } - } - ] + "credit": "Made with Blockbench, by Championhestu.", + "ambientocclusion": false, + "textures": { + "0": "delightful:block/stuffed_cantaloupe_details", + "1": "delightful:block/cantaloupe_inside_small", + "2": "delightful:block/cantaloupe_side_small", + "3": "delightful:block/cantaloupe_top", + "particle": "delightful:block/cantaloupe_top" + }, + "elements": [ + { + "name": "spoon", + "from": [ + -1, + 1.1, + 7 + ], + "to": [ + 9, + 3.1, + 9 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 8, + 4, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 90, + "texture": "#0" + }, + "east": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "rotation": 270, + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 270, + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 1, + 4, + 3 + ], + "rotation": 270, + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 3, + 4, + 13 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "name": "stuffing", + "from": [ + 4, + 1, + 4 + ], + "to": [ + 12, + 3, + 12 + ], + "faces": { + "north": { + "uv": [ + 6, + 4, + 14, + 6 + ], + "rotation": 180, + "texture": "#0" + }, + "east": { + "uv": [ + 12, + 4, + 14, + 12 + ], + "rotation": 90, + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 10, + 14, + 12 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 4, + 8, + 12 + ], + "rotation": 270, + "texture": "#0" + }, + "up": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 6, + 4, + 14, + 12 + ], + "texture": "#0" + } + } + }, + { + "name": "cantaloupe", + "from": [ + 3, + 0, + 3 + ], + "to": [ + 13, + 2, + 13 + ], + "faces": { + "north": { + "uv": [ + 3, + 14, + 13, + 16 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 3, + 14, + 13, + 16 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 3, + 14, + 13, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 3, + 14, + 13, + 16 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 3, + 6, + 13, + 16 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 3, + 3, + 13, + 13 + ], + "texture": "#3" + } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/additionaladditions/recipes/honeyed_apple.json b/src/main/resources/data/additionaladditions/recipes/honeyed_apple.json index 61730956..fce488eb 100644 --- a/src/main/resources/data/additionaladditions/recipes/honeyed_apple.json +++ b/src/main/resources/data/additionaladditions/recipes/honeyed_apple.json @@ -9,7 +9,7 @@ { "type": "forge:item_exists", "item": "additionaladditions:honeyed_apple" - } , + }, { "type": "forge:not", "value": { diff --git a/src/main/resources/data/farmersdelight/recipes/cutting/cooked_crab.json b/src/main/resources/data/farmersdelight/recipes/cutting/cooked_crab.json index 9df21be9..a7d458a0 100644 --- a/src/main/resources/data/farmersdelight/recipes/cutting/cooked_crab.json +++ b/src/main/resources/data/farmersdelight/recipes/cutting/cooked_crab.json @@ -9,7 +9,7 @@ }, { "type": "forge:not", - "value": { + "value": { "type": "forge:item_exists", "item": "ecologics:crab_meat" } @@ -34,4 +34,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 6c1d47a1..d65367fb 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { - "pack": { - "description": "Delightful resources", - "pack_format": 15 - } -} + "pack": { + "description": "Delightful resources", + "pack_format": 15 + } +} \ No newline at end of file