From f5ca1ad4c0174e6cc4cf3387b7798c4638d5d0f2 Mon Sep 17 00:00:00 2001 From: Vos Date: Sat, 31 Jan 2026 21:12:38 -0600 Subject: [PATCH] Stabilizer and Eviscerator --- build.gradle | 1 - ...e_endtropy_from_blasting_endtropy_ore.json | 32 --- ...e_endtropy_from_blasting_raw_endtropy.json | 32 --- ...y_from_blasting_deepslate_entropy_ore.json | 32 --- ...ble_entropy_from_blasting_entropy_ore.json | 32 --- ...ble_entropy_from_blasting_raw_entropy.json | 32 --- ...cerator.json => entropic_eviscerator.json} | 2 +- ...e_endtropy_from_blasting_endtropy_ore.json | 13 - ...e_endtropy_from_blasting_raw_endtropy.json | 13 - ...y_from_blasting_deepslate_entropy_ore.json | 13 - ...ble_entropy_from_blasting_entropy_ore.json | 13 - ...ble_entropy_from_blasting_raw_entropy.json | 13 - .../tags/block/mineable/pickaxe.json | 2 +- .../tags/block/needs_diamond_tool.json | 2 +- .../acethewildfire/acesbs/AcesBSClient.java | 2 + .../acesbs/block/ModBlocks.java | 14 +- .../block/custom/EntropicEviscerator.java | 95 ++++++ .../block/custom/EntropicStabilizer.java | 2 - .../acesbs/block/entity/ModBlockEntities.java | 5 +- .../custom/EntropicEvisceratorEntity.java | 270 ++++++++++++++++++ .../custom/EntropicStabilizerEntity.java | 12 +- .../acesbs/compat/AcesBSREIClient.java | 11 +- .../compat/EntropicEvisceratorCategory.java | 63 ++++ .../compat/EntropicEvisceratorDisplay.java | 29 ++ .../compat/EntropicStabilizerCategory.java | 2 +- .../acesbs/datagen/ModBlockTagProvider.java | 4 +- .../acesbs/datagen/ModLootTableProvider.java | 6 +- .../acesbs/item/ModItemGroups.java | 2 +- .../acethewildfire/acesbs/item/ModItems.java | 8 +- .../recipe/EntropicEvisceratorRecipe.java | 85 ++++++ .../EntropicEvisceratorRecipeInput.java | 16 ++ .../acesbs/recipe/ModRecipies.java | 13 + .../acesbs/screen/ModScreenHandlers.java | 5 + .../custom/EntropicEvisceratorScreen.java | 59 ++++ .../EntropicEvisceratorScreenHandler.java | 142 +++++++++ .../custom/EntropicStabilizerScreen.java | 2 +- .../EntropicStabilizerScreenHandler.java | 4 +- .../blockstates/entropic_evicerator.json | 7 - .../blockstates/entropic_eviscerator.json | 8 + .../resources/assets/acesbs/lang/en_us.json | 2 +- ...cerator.json => entropic_eviscerator.json} | 4 +- .../models/item/entropic_evicerator.json | 3 - .../models/item/entropic_eviscerator.json | 3 + ...vicerator.png => entropic_eviscerator.png} | Bin .../entropic_eviscerator_gui.png | Bin 0 -> 1078 bytes .../entropic_eviscerator_gui_rei.png | Bin 0 -> 805 bytes .../textures/gui/eviscerate_progress.png | Bin 0 -> 246 bytes ...bacco_seeds_from_entropic_eviscerator.json | 10 + 48 files changed, 839 insertions(+), 281 deletions(-) delete mode 100644 src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_endtropy_ore.json delete mode 100644 src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_raw_endtropy.json delete mode 100644 src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_deepslate_entropy_ore.json delete mode 100644 src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_entropy_ore.json delete mode 100644 src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_raw_entropy.json rename src/main/generated/data/acesbs/loot_table/blocks/{entropic_evicerator.json => entropic_eviscerator.json} (86%) delete mode 100644 src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_endtropy_ore.json delete mode 100644 src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_raw_endtropy.json delete mode 100644 src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_deepslate_entropy_ore.json delete mode 100644 src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_entropy_ore.json delete mode 100644 src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_raw_entropy.json create mode 100644 src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java create mode 100644 src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java create mode 100644 src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorCategory.java create mode 100644 src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java create mode 100644 src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java create mode 100644 src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java create mode 100644 src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreen.java create mode 100644 src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreenHandler.java delete mode 100644 src/main/resources/assets/acesbs/blockstates/entropic_evicerator.json create mode 100644 src/main/resources/assets/acesbs/blockstates/entropic_eviscerator.json rename src/main/resources/assets/acesbs/models/block/{entropic_evicerator.json => entropic_eviscerator.json} (92%) delete mode 100644 src/main/resources/assets/acesbs/models/item/entropic_evicerator.json create mode 100644 src/main/resources/assets/acesbs/models/item/entropic_eviscerator.json rename src/main/resources/assets/acesbs/textures/block/{entropic_evicerator.png => entropic_eviscerator.png} (100%) create mode 100644 src/main/resources/assets/acesbs/textures/gui/entropic_eviscerator/entropic_eviscerator_gui.png create mode 100644 src/main/resources/assets/acesbs/textures/gui/entropic_eviscerator/entropic_eviscerator_gui_rei.png create mode 100644 src/main/resources/assets/acesbs/textures/gui/eviscerate_progress.png create mode 100644 src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json diff --git a/build.gradle b/build.gradle index 16038e1..6f912b7 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,6 @@ dependencies { modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:16.0.777" modApi "dev.architectury:architectury-fabric:13.0.8" modApi "me.shedaniel.cloth:cloth-config-fabric:15.0.140" - } processResources { diff --git a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_endtropy_ore.json b/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_endtropy_ore.json deleted file mode 100644 index c9931c6..0000000 --- a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_endtropy_ore.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_endtropy_ore": { - "conditions": { - "items": [ - { - "items": "acesbs:endtropy_ore" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "acesbs:stable_endtropy_from_blasting_endtropy_ore" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_endtropy_ore" - ] - ], - "rewards": { - "recipes": [ - "acesbs:stable_endtropy_from_blasting_endtropy_ore" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_raw_endtropy.json b/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_raw_endtropy.json deleted file mode 100644 index 5d29ca1..0000000 --- a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_endtropy_from_blasting_raw_endtropy.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_raw_endtropy": { - "conditions": { - "items": [ - { - "items": "acesbs:raw_endtropy" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "acesbs:stable_endtropy_from_blasting_raw_endtropy" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_raw_endtropy" - ] - ], - "rewards": { - "recipes": [ - "acesbs:stable_endtropy_from_blasting_raw_endtropy" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_deepslate_entropy_ore.json b/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_deepslate_entropy_ore.json deleted file mode 100644 index 9999e79..0000000 --- a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_deepslate_entropy_ore.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_deepslate_entropy_ore": { - "conditions": { - "items": [ - { - "items": "acesbs:deepslate_entropy_ore" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "acesbs:stable_entropy_from_blasting_deepslate_entropy_ore" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_deepslate_entropy_ore" - ] - ], - "rewards": { - "recipes": [ - "acesbs:stable_entropy_from_blasting_deepslate_entropy_ore" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_entropy_ore.json b/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_entropy_ore.json deleted file mode 100644 index 7c7d5bd..0000000 --- a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_entropy_ore.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_entropy_ore": { - "conditions": { - "items": [ - { - "items": "acesbs:entropy_ore" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "acesbs:stable_entropy_from_blasting_entropy_ore" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_entropy_ore" - ] - ], - "rewards": { - "recipes": [ - "acesbs:stable_entropy_from_blasting_entropy_ore" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_raw_entropy.json b/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_raw_entropy.json deleted file mode 100644 index e873b01..0000000 --- a/src/main/generated/data/acesbs/advancement/recipes/misc/stable_entropy_from_blasting_raw_entropy.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_raw_entropy": { - "conditions": { - "items": [ - { - "items": "acesbs:raw_entropy" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "acesbs:stable_entropy_from_blasting_raw_entropy" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_raw_entropy" - ] - ], - "rewards": { - "recipes": [ - "acesbs:stable_entropy_from_blasting_raw_entropy" - ] - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/loot_table/blocks/entropic_evicerator.json b/src/main/generated/data/acesbs/loot_table/blocks/entropic_eviscerator.json similarity index 86% rename from src/main/generated/data/acesbs/loot_table/blocks/entropic_evicerator.json rename to src/main/generated/data/acesbs/loot_table/blocks/entropic_eviscerator.json index c42dc58..400a5ca 100644 --- a/src/main/generated/data/acesbs/loot_table/blocks/entropic_evicerator.json +++ b/src/main/generated/data/acesbs/loot_table/blocks/entropic_eviscerator.json @@ -11,7 +11,7 @@ "entries": [ { "type": "minecraft:item", - "name": "acesbs:entropic_evicerator" + "name": "acesbs:entropic_eviscerator" } ], "rolls": 1.0 diff --git a/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_endtropy_ore.json b/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_endtropy_ore.json deleted file mode 100644 index eaa0849..0000000 --- a/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_endtropy_ore.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "minecraft:blasting", - "category": "misc", - "cookingtime": 2000, - "experience": 0.5, - "group": "stable_endtropy", - "ingredient": { - "item": "acesbs:endtropy_ore" - }, - "result": { - "id": "acesbs:stable_endtropy" - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_raw_endtropy.json b/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_raw_endtropy.json deleted file mode 100644 index 95aa3d8..0000000 --- a/src/main/generated/data/acesbs/recipe/stable_endtropy_from_blasting_raw_endtropy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "minecraft:blasting", - "category": "misc", - "cookingtime": 2000, - "experience": 0.5, - "group": "stable_endtropy", - "ingredient": { - "item": "acesbs:raw_endtropy" - }, - "result": { - "id": "acesbs:stable_endtropy" - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_deepslate_entropy_ore.json b/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_deepslate_entropy_ore.json deleted file mode 100644 index ba4ee88..0000000 --- a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_deepslate_entropy_ore.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "minecraft:blasting", - "category": "misc", - "cookingtime": 2000, - "experience": 0.5, - "group": "stable_entropy", - "ingredient": { - "item": "acesbs:deepslate_entropy_ore" - }, - "result": { - "id": "acesbs:stable_entropy" - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_entropy_ore.json b/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_entropy_ore.json deleted file mode 100644 index bdedd8f..0000000 --- a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_entropy_ore.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "minecraft:blasting", - "category": "misc", - "cookingtime": 2000, - "experience": 0.5, - "group": "stable_entropy", - "ingredient": { - "item": "acesbs:entropy_ore" - }, - "result": { - "id": "acesbs:stable_entropy" - } -} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_raw_entropy.json b/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_raw_entropy.json deleted file mode 100644 index 77b9f92..0000000 --- a/src/main/generated/data/acesbs/recipe/stable_entropy_from_blasting_raw_entropy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "minecraft:blasting", - "category": "misc", - "cookingtime": 2000, - "experience": 0.5, - "group": "stable_entropy", - "ingredient": { - "item": "acesbs:raw_entropy" - }, - "result": { - "id": "acesbs:stable_entropy" - } -} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json index 44cb2d4..d551150 100644 --- a/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json +++ b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json @@ -8,7 +8,7 @@ "acesbs:infernal_ashes_ore", "acesbs:endtropy_ore", "acesbs:entropic_stabilizer", - "acesbs:entropic_evicerator", + "acesbs:entropic_eviscerator", "acesbs:entropic_entangler" ] } \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/needs_diamond_tool.json b/src/main/generated/data/minecraft/tags/block/needs_diamond_tool.json index 36aa72b..11e38fd 100644 --- a/src/main/generated/data/minecraft/tags/block/needs_diamond_tool.json +++ b/src/main/generated/data/minecraft/tags/block/needs_diamond_tool.json @@ -7,7 +7,7 @@ "acesbs:stable_entropy_block", "acesbs:prisma_steel_block", "acesbs:entropic_stabilizer", - "acesbs:entropic_evicerator", + "acesbs:entropic_eviscerator", "acesbs:entropic_entangler" ] } \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/AcesBSClient.java b/src/main/java/com/acethewildfire/acesbs/AcesBSClient.java index 0c9f802..a81c857 100644 --- a/src/main/java/com/acethewildfire/acesbs/AcesBSClient.java +++ b/src/main/java/com/acethewildfire/acesbs/AcesBSClient.java @@ -7,6 +7,7 @@ import com.acethewildfire.acesbs.entity.client.CombustibleLemonRenderer; import com.acethewildfire.acesbs.entity.client.FrenModel; import com.acethewildfire.acesbs.entity.client.FrenRenderer; import com.acethewildfire.acesbs.screen.ModScreenHandlers; +import com.acethewildfire.acesbs.screen.custom.EntropicEvisceratorScreen; import com.acethewildfire.acesbs.screen.custom.EntropicStabilizerScreen; import com.acethewildfire.acesbs.util.ModModelPredicates; import net.fabricmc.api.ClientModInitializer; @@ -37,5 +38,6 @@ public class AcesBSClient implements ClientModInitializer { EntityRendererRegistry.register(ModEntities.C_LEMON, CombustibleLemonRenderer::new); HandledScreens.register(ModScreenHandlers.ENTROPIC_STABILIZER_SCREEN_HANDLER, EntropicStabilizerScreen::new); + HandledScreens.register(ModScreenHandlers.ENTROPIC_EVISCERATOR_SCREEN_HANDLER, EntropicEvisceratorScreen::new); } } diff --git a/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java b/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java index 853d41e..a8ffece 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java +++ b/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java @@ -8,24 +8,14 @@ import com.mojang.serialization.MapCodec; import net.minecraft.block.*; import net.minecraft.block.enums.NoteBlockInstrument; import net.minecraft.block.piston.PistonBehavior; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; -import net.minecraft.item.Items; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryKey; import net.minecraft.sound.BlockSoundGroup; -import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; -import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; -import net.minecraft.util.hit.BlockHitResult; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.world.World; -import net.minecraft.world.WorldAccess; -import org.jetbrains.annotations.Nullable; import java.util.function.ToIntFunction; @@ -91,8 +81,8 @@ public class ModBlocks { .requiresTool() )); - public static final Block ENTROPIC_EVICERATOR = registerBlock("entropic_evicerator", - new Block( + public static final Block ENTROPIC_EVISCERATOR = registerBlock("entropic_eviscerator", + new EntropicEviscerator( AbstractBlock.Settings.create() .mapColor(MapColor.LIGHT_GRAY) .strength(2.0F, 3.0F) diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java new file mode 100644 index 0000000..b24f2ae --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java @@ -0,0 +1,95 @@ +package com.acethewildfire.acesbs.block.custom; + +import com.acethewildfire.acesbs.block.entity.ModBlockEntities; +import com.acethewildfire.acesbs.block.entity.custom.EntropicEvisceratorEntity; +import com.mojang.serialization.MapCodec; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityTicker; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.item.ItemStack; +import net.minecraft.screen.NamedScreenHandlerFactory; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.Hand; +import net.minecraft.util.ItemActionResult; +import net.minecraft.util.ItemScatterer; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +public class EntropicEviscerator extends BlockWithEntity implements BlockEntityProvider { + public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final MapCodec CODEC = EntropicEviscerator.createCodec(EntropicEviscerator::new); + + public EntropicEviscerator(Settings settings) { + super(settings); + setDefaultState(getStateManager().getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + protected MapCodec getCodec() { + return CODEC; + } + + @Override + public @Nullable BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new EntropicEvisceratorEntity(pos, state); + } + + @Override + protected BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.MODEL; + } + + @Override + protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { + if(state.getBlock() != newState.getBlock()) { + BlockEntity blockEntity = world.getBlockEntity(pos); + if(blockEntity instanceof EntropicEvisceratorEntity) { + ItemScatterer.spawn(world, pos, ((EntropicEvisceratorEntity) blockEntity)); + world.updateComparators(pos, this); + } + super.onStateReplaced(state, world, pos, newState, moved); + } + } + + @Override + protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + + if (!world.isClient) { + NamedScreenHandlerFactory screenHandlerFactory = ((EntropicEvisceratorEntity) world.getBlockEntity(pos)); + if (screenHandlerFactory != null) { + player.openHandledScreen(screenHandlerFactory); + } + } + return ItemActionResult.SUCCESS; + + } + + @Nullable + @Override + public BlockEntityTicker getTicker(World world, BlockState state, BlockEntityType type) { + if(world.isClient()) { + return null; + } + + return validateTicker(type, ModBlockEntities.E_EVISCERATOR_BE, + (world1, pos, state1, blockEntity) -> blockEntity.tick(world1, pos, state1)); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite()); + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java index 3121db6..416d774 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java @@ -11,8 +11,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.screen.NamedScreenHandlerFactory; -import net.minecraft.sound.SoundCategory; -import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; import net.minecraft.state.property.DirectionProperty; import net.minecraft.state.property.Properties; diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java b/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java index 56dd10e..b4269f7 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java @@ -2,8 +2,8 @@ package com.acethewildfire.acesbs.block.entity; import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.block.ModBlocks; +import com.acethewildfire.acesbs.block.entity.custom.EntropicEvisceratorEntity; import com.acethewildfire.acesbs.block.entity.custom.EntropicStabilizerEntity; -import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -14,6 +14,9 @@ public class ModBlockEntities { public static final BlockEntityType E_STABILIZER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "e_stabilizer_be"), BlockEntityType.Builder.create(EntropicStabilizerEntity::new, ModBlocks.ENTROPIC_STABILIZER).build(null)); + public static final BlockEntityType E_EVISCERATOR_BE = + Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "e_eviscerator_be"), + BlockEntityType.Builder.create(EntropicEvisceratorEntity::new, ModBlocks.ENTROPIC_EVISCERATOR).build(null)); public static void registerBlockEntities() { AcesBS.LOGGER.info("Registering Block Entities for " + AcesBS.MOD_ID); diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java new file mode 100644 index 0000000..4594c0c --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java @@ -0,0 +1,270 @@ +package com.acethewildfire.acesbs.block.entity.custom; + +import com.acethewildfire.acesbs.block.custom.EntropicEviscerator; +import com.acethewildfire.acesbs.block.entity.ImplementedInventory; +import com.acethewildfire.acesbs.block.entity.ModBlockEntities; +import com.acethewildfire.acesbs.item.ModItems; +import com.acethewildfire.acesbs.recipe.EntropicEvisceratorRecipe; +import com.acethewildfire.acesbs.recipe.EntropicEvisceratorRecipeInput; +import com.acethewildfire.acesbs.recipe.ModRecipies; +import com.acethewildfire.acesbs.screen.custom.EntropicEvisceratorScreenHandler; +import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.Inventories; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.network.listener.ClientPlayPacketListener; +import net.minecraft.network.packet.Packet; +import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket; +import net.minecraft.recipe.RecipeEntry; +import net.minecraft.registry.RegistryWrapper; +import net.minecraft.screen.PropertyDelegate; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.text.Text; +import net.minecraft.util.collection.DefaultedList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +import java.util.Optional; + +public class EntropicEvisceratorEntity extends BlockEntity implements ImplementedInventory, ExtendedScreenHandlerFactory { + private final DefaultedList inventory = DefaultedList.ofSize(3, ItemStack.EMPTY); + private Direction facing; + + private static final int INPUT_SLOT = 0; + private static final int FUEL_SLOT = 1; + private static final int OUTPUT_SLOT = 2; + + private static final int FUEL_PROGRESS = 0; + private static final int FUEL_MAX_PROGRESS = 1; + private static final int EVISCERATE_PROGRESS = 2; + private static final int EVISCERATE_MAX_PROGRESS = 3; + + private int fuel_progress = -1; + private int fuel_max_progress = 400; + private int eviscerate_progress = 0; + private int eviscerate_max_progress = 200; + + protected final PropertyDelegate propertyDelegate; + + public EntropicEvisceratorEntity(BlockPos pos, BlockState state) { + super(ModBlockEntities.E_EVISCERATOR_BE, pos, state); + this.facing = state.get(EntropicEviscerator.FACING); + this.propertyDelegate = new PropertyDelegate() { + @Override + public int get(int index) { + return switch (index) { + case 0 -> EntropicEvisceratorEntity.this.fuel_progress; + case 1 -> EntropicEvisceratorEntity.this.fuel_max_progress; + case 2 -> EntropicEvisceratorEntity.this.eviscerate_progress; + case 3 -> EntropicEvisceratorEntity.this.eviscerate_max_progress; + default -> 0; + }; + } + + @Override + public void set(int index, int value) { + switch (index) { + case 0 -> EntropicEvisceratorEntity.this.fuel_progress = value; + case 1 -> EntropicEvisceratorEntity.this.fuel_max_progress = value; + case 2 -> EntropicEvisceratorEntity.this.eviscerate_progress = value; + case 3 -> EntropicEvisceratorEntity.this.eviscerate_max_progress = value; + } + } + + @Override + public int size() { + return 4; + } + }; + } + + public Direction getFacing() { + return facing; + } + + public void setFacing(Direction newFacing) { + this.facing = newFacing; + // sync to blockstate for rendering + if (world != null && !world.isClient) { + world.setBlockState(pos, getCachedState().with(EntropicEviscerator.FACING, newFacing), 3); + markDirty(); + } + } + + @Override + protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) { + super.writeNbt(nbt, registryLookup); + Inventories.writeNbt(nbt, inventory, registryLookup); + nbt.putInt("Facing", facing.getId()); + nbt.putInt("eviscerator.fuel_progress", fuel_progress); + nbt.putInt("eviscerator.fuel_max_progress", fuel_max_progress); + nbt.putInt("eviscerator.eviscerate_progress", eviscerate_progress); + nbt.putInt("eviscerator.eviscerate_max_progress", eviscerate_max_progress); + } + + @Override + protected void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) { + Inventories.readNbt(nbt, inventory, registryLookup); + this.facing = Direction.byId(nbt.getInt("Facing")); + this.fuel_progress = nbt.getInt("eviscerator.fuel_progress"); + this.fuel_max_progress = nbt.getInt("eviscerator.fuel_max_progress"); + this.eviscerate_progress = nbt.getInt("eviscerator.eviscerate_progress"); + this.eviscerate_max_progress = nbt.getInt("eviscerator.eviscerate_max_progress"); + super.readNbt(nbt, registryLookup); + } + + @Override + public DefaultedList getItems() { + return inventory; + } + + @Override + public BlockPos getScreenOpeningData(ServerPlayerEntity serverPlayerEntity) { + return this.pos; + } + + @Override + public Text getDisplayName() { + return Text.translatable("block.acesbs.entropic_eviscerator"); + } + + @Override + public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) { + return new EntropicEvisceratorScreenHandler(syncId, playerInventory, this, propertyDelegate); + } + + public float getCookProgress() { + int i = this.propertyDelegate.get(EVISCERATE_PROGRESS); + int j = this.propertyDelegate.get(EVISCERATE_MAX_PROGRESS); + return j != 0 && i != 0 ? MathHelper.clamp((float)i / (float)j, 0.0F, 1.0F) : 0.0F; + } + + public float getFuelProgress() { + int i = this.propertyDelegate.get(FUEL_MAX_PROGRESS); + if (i == 0) { + i = 200; + } + + return MathHelper.clamp((float)this.propertyDelegate.get(FUEL_PROGRESS) / (float) i, 0.0F, 1.0F); + } + +// public boolean canInsertIntoSlot(int index) { +// return index != 1; +// } + + public void tick(World world, BlockPos pos, BlockState state) { + if(hasRecipe()) { + if (hasFuel() || hasUnfinishedFuel()){ + if (this.fuel_progress == -1){ + // No fuel has been used yet + consumeFuel(); + resetFuelProgress(); + } + increaseCraftingProgress(); + markDirty(world, pos, state); + + if(hasCraftingFinished()) { + craftItem(); + resetProgress(); + } + + if(hasFuel() && hasFuelFinished()) { + consumeFuel(); + resetFuelProgress(); + } + } + } else { + resetProgress(); + } + } + + private boolean hasFuel() { + return this.getStack(FUEL_SLOT).isOf(ModItems.STABLE_ENTROPY); + } + + private boolean hasUnfinishedFuel() { + return this.fuel_progress > -1 && !hasFuelFinished(); + } + + private void resetProgress() { + this.eviscerate_progress = 0; + this.eviscerate_max_progress = 200; + } + + private void resetFuelProgress() { + this.fuel_progress = 0; + this.fuel_max_progress = 400; + } + + private void craftItem() { + Optional> recipe = getCurrentRecipe(); + ItemStack output = recipe.get().value().output(); + + this.removeStack(INPUT_SLOT, 1); + this.setStack(OUTPUT_SLOT, new ItemStack(output.getItem(), + this.getStack(OUTPUT_SLOT).getCount() + output.getCount())); + } + + private void consumeFuel() { + this.setStack(FUEL_SLOT, new ItemStack(this.getStack(FUEL_SLOT).getItem(), + this.getStack(FUEL_SLOT).getCount() - 1)); + } + + private boolean hasCraftingFinished() { + return this.eviscerate_progress >= this.eviscerate_max_progress; + } + + private boolean hasFuelFinished() { + return this.fuel_progress >= this.fuel_max_progress; + } + + private void increaseCraftingProgress() { + this.eviscerate_progress++; + this.fuel_progress++; + } + + private boolean hasRecipe() { + Optional> recipe = getCurrentRecipe(); + + if (recipe.isEmpty()){ return false; } + + ItemStack output = recipe.get().value().output(); + + return canInsertAmountIntoOutputSlot(output.getCount()) && canInsertItemIntoOutputSlot(output); + } + + private Optional> getCurrentRecipe() { + return this.getWorld().getRecipeManager() + .getFirstMatch(ModRecipies.ENTROPIC_EVISCERATOR_TYPE, new EntropicEvisceratorRecipeInput(inventory.get(INPUT_SLOT)), this.getWorld()); + } + + private boolean canInsertItemIntoOutputSlot(ItemStack output) { + return this.getStack(OUTPUT_SLOT).isEmpty() || this.getStack(OUTPUT_SLOT).getItem() == output.getItem(); + } + + private boolean canInsertAmountIntoOutputSlot(int count) { + int maxCount = this.getStack(OUTPUT_SLOT).isEmpty() ? 64 : this.getStack(OUTPUT_SLOT).getMaxCount(); + int currentCount = this.getStack(OUTPUT_SLOT).getCount(); + + return maxCount >= currentCount + count; + } + + @Nullable + @Override + public Packet toUpdatePacket() { + return BlockEntityUpdateS2CPacket.create(this); + } + + @Override + public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registryLookup) { + return createNbt(registryLookup); + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java index 7e4e582..03de53a 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java @@ -164,7 +164,7 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented public void tick(World world, BlockPos pos, BlockState state) { if(hasRecipe()) { - if (hasFuel()){ + if (hasFuel() || hasUnfinishedFuel()){ if (this.fuel_progress == -1){ // No fuel has been used yet consumeFuel(); @@ -178,7 +178,7 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented resetProgress(); } - if(hasFuelFinished()) { + if(hasFuel() && hasFuelFinished()) { consumeFuel(); resetFuelProgress(); } @@ -189,7 +189,11 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented } private boolean hasFuel() { - return this.getStack(FUEL_SLOT).isOf(Items.SNOWBALL); + return this.getStack(FUEL_SLOT).isOf(Items.BLUE_ICE); + } + + private boolean hasUnfinishedFuel() { + return this.fuel_progress > -1 && !hasFuelFinished(); } private void resetProgress() { @@ -234,7 +238,7 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented if (recipe.isEmpty()){ return false; } - ItemStack output = new ItemStack(ModItems.STABLE_ENTROPY, 1); + ItemStack output = recipe.get().value().output(); return canInsertAmountIntoOutputSlot(output.getCount()) && canInsertItemIntoOutputSlot(output); } diff --git a/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java b/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java index 0fc1d0a..34c332d 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java @@ -1,8 +1,10 @@ package com.acethewildfire.acesbs.compat; import com.acethewildfire.acesbs.block.ModBlocks; +import com.acethewildfire.acesbs.recipe.EntropicEvisceratorRecipe; import com.acethewildfire.acesbs.recipe.EntropicStabilizerRecipe; import com.acethewildfire.acesbs.recipe.ModRecipies; +import com.acethewildfire.acesbs.screen.custom.EntropicEvisceratorScreen; import com.acethewildfire.acesbs.screen.custom.EntropicStabilizerScreen; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.plugins.REIClientPlugin; @@ -11,25 +13,28 @@ import me.shedaniel.rei.api.client.registry.display.DisplayRegistry; import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; import me.shedaniel.rei.api.common.util.EntryStacks; -import java.awt.*; - public class AcesBSREIClient implements REIClientPlugin { @Override public void registerCategories(CategoryRegistry registry) { registry.add(new EntropicStabilizerCategory()); - registry.addWorkstations(EntropicStabilizerCategory.ENTROPIC_STABILIZER, EntryStacks.of(ModBlocks.ENTROPIC_STABILIZER)); + + registry.add(new EntropicEvisceratorCategory()); + registry.addWorkstations(EntropicEvisceratorCategory.ENTROPIC_EVISCERATOR, EntryStacks.of(ModBlocks.ENTROPIC_EVISCERATOR)); } @Override public void registerDisplays(DisplayRegistry registry) { registry.registerRecipeFiller(EntropicStabilizerRecipe.class, ModRecipies.ENTROPIC_STABILIZER_TYPE, EntropicStabilizerDisplay::new); + registry.registerRecipeFiller(EntropicEvisceratorRecipe.class, ModRecipies.ENTROPIC_EVISCERATOR_TYPE, EntropicEvisceratorDisplay::new); } @Override public void registerScreens(ScreenRegistry registry) { registry.registerClickArea(screen -> new Rectangle(((screen.width - 176) / 2) + 78, ((screen.height - 166) / 2) + 30, 20, 25 ), EntropicStabilizerScreen.class, EntropicStabilizerCategory.ENTROPIC_STABILIZER); + registry.registerClickArea(screen -> new Rectangle(((screen.width - 176) / 2) + 78, + ((screen.height - 166) / 2) + 30, 20, 25 ), EntropicEvisceratorScreen.class, EntropicEvisceratorCategory.ENTROPIC_EVISCERATOR); } } diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorCategory.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorCategory.java new file mode 100644 index 0000000..5892976 --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorCategory.java @@ -0,0 +1,63 @@ +package com.acethewildfire.acesbs.compat; + +import com.acethewildfire.acesbs.AcesBS; +import com.acethewildfire.acesbs.block.ModBlocks; +import com.acethewildfire.acesbs.item.ModItems; +import me.shedaniel.math.Point; +import me.shedaniel.math.Rectangle; +import me.shedaniel.rei.api.client.gui.Renderer; +import me.shedaniel.rei.api.client.gui.widgets.Widget; +import me.shedaniel.rei.api.client.gui.widgets.Widgets; +import me.shedaniel.rei.api.client.registry.display.DisplayCategory; +import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.display.basic.BasicDisplay; +import me.shedaniel.rei.api.common.entry.EntryIngredient; +import me.shedaniel.rei.api.common.util.EntryStacks; +import net.minecraft.item.Items; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; + +import java.util.LinkedList; +import java.util.List; + +public class EntropicEvisceratorCategory implements DisplayCategory { + public static final Identifier GUI_TEXTURE = + Identifier.of(AcesBS.MOD_ID, "textures/gui/entropic_eviscerator/entropic_eviscerator_gui_rei.png"); + + public static final CategoryIdentifier ENTROPIC_EVISCERATOR = + CategoryIdentifier.of(AcesBS.MOD_ID, "entropic_eviscerator"); + + @Override + public CategoryIdentifier getCategoryIdentifier() { + return ENTROPIC_EVISCERATOR; + } + + @Override + public Text getTitle() { + return Text.translatable("block.acesbs.entropic_eviscerator"); + } + + @Override + public Renderer getIcon() { + return EntryStacks.of(ModBlocks.ENTROPIC_EVISCERATOR.asItem().getDefaultStack()); + } + + @Override + public List setupDisplay(BasicDisplay display, Rectangle bounds) { + Point startPoint = new Point(bounds.getCenterX() - 87, bounds.getCenterY() - 41); + List widgets = new LinkedList<>(); + + widgets.add(Widgets.createTexturedWidget(GUI_TEXTURE, new Rectangle(startPoint.x, startPoint.y, 175, 82))); + + widgets.add(Widgets.createSlot(new Point(startPoint.x + 80, startPoint.y + 17)).entries(display.getInputEntries().get(0)).markInput()); + widgets.add(Widgets.createSlot(new Point(startPoint.x + 8, startPoint.y + 17)).entries(EntryIngredient.of(EntryStacks.of(ModItems.STABLE_ENTROPY)))); + widgets.add(Widgets.createSlot(new Point(startPoint.x + 80, startPoint.y + 53)).entries(display.getOutputEntries().get(0)).markOutput()); + + return widgets; + } + + @Override + public int getDisplayHeight() { + return 90; + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java new file mode 100644 index 0000000..706b284 --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java @@ -0,0 +1,29 @@ +package com.acethewildfire.acesbs.compat; + +import com.acethewildfire.acesbs.recipe.EntropicEvisceratorRecipe; +import com.acethewildfire.acesbs.recipe.EntropicStabilizerRecipe; +import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.display.basic.BasicDisplay; +import me.shedaniel.rei.api.common.entry.EntryIngredient; +import me.shedaniel.rei.api.common.util.EntryIngredients; +import me.shedaniel.rei.api.common.util.EntryStacks; +import net.minecraft.recipe.RecipeEntry; + +import java.util.List; + +public class EntropicEvisceratorDisplay extends BasicDisplay { + private RecipeEntry recipe; + private float xp; + private double cookTime; + + public EntropicEvisceratorDisplay(RecipeEntry recipe){ + super( + List.of(EntryIngredients.ofIngredient(recipe.value().getIngredients().get(0))), + List.of(EntryIngredient.of(EntryStacks.of(recipe.value().getResult(null))))); + } + + @Override + public CategoryIdentifier getCategoryIdentifier() { + return EntropicEvisceratorCategory.ENTROPIC_EVISCERATOR; + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerCategory.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerCategory.java index 913e2da..bdff416 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerCategory.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerCategory.java @@ -51,7 +51,7 @@ public class EntropicStabilizerCategory implements DisplayCategory widgets.add(Widgets.createTexturedWidget(GUI_TEXTURE, new Rectangle(startPoint.x, startPoint.y, 175, 82))); widgets.add(Widgets.createSlot(new Point(startPoint.x + 56, startPoint.y + 17)).entries(display.getInputEntries().get(0)).markInput()); - widgets.add(Widgets.createSlot(new Point(startPoint.x + 56, startPoint.y + 53)).entries(EntryIngredient.of(EntryStacks.of(Items.SNOWBALL)))); + widgets.add(Widgets.createSlot(new Point(startPoint.x + 56, startPoint.y + 53)).entries(EntryIngredient.of(EntryStacks.of(Items.BLUE_ICE)))); widgets.add(Widgets.createSlot(new Point(startPoint.x + 116, startPoint.y + 35)).entries(display.getOutputEntries().get(0)).markOutput()); return widgets; diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModBlockTagProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModBlockTagProvider.java index 18ec11a..92854b0 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModBlockTagProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModBlockTagProvider.java @@ -25,7 +25,7 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider { .add(ModBlocks.INFERNAL_ASHES_ORE) .add(ModBlocks.ENDTROPY_ORE) .add(ModBlocks.ENTROPIC_STABILIZER) - .add(ModBlocks.ENTROPIC_EVICERATOR) + .add(ModBlocks.ENTROPIC_EVISCERATOR) .add(ModBlocks.ENTROPIC_ENTANGLER); getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL) .add(ModBlocks.INFERNAL_ASHES_ORE); @@ -37,7 +37,7 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider { .add(ModBlocks.STABLE_ENTROPY_BLOCK) .add(ModBlocks.PRISMA_STEEL_BLOCK) .add(ModBlocks.ENTROPIC_STABILIZER) - .add(ModBlocks.ENTROPIC_EVICERATOR) + .add(ModBlocks.ENTROPIC_EVISCERATOR) .add(ModBlocks.ENTROPIC_ENTANGLER); getOrCreateTagBuilder(BlockTags.AXE_MINEABLE) .add(ModBlocks.LEMONWOOD_PLANKS) diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java index 45a1eb7..fc012ea 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java @@ -1,15 +1,12 @@ package com.acethewildfire.acesbs.datagen; -import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.block.ModBlocks; import com.acethewildfire.acesbs.block.custom.TobaccoCrop; import com.acethewildfire.acesbs.item.ModItems; import com.acethewildfire.acesbs.util.ModTags; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; -import net.fabricmc.fabric.api.loot.v3.LootTableEvents; import net.minecraft.block.Block; -import net.minecraft.block.Blocks; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantments; import net.minecraft.item.Item; @@ -35,7 +32,6 @@ import net.minecraft.predicate.item.EnchantmentPredicate; import net.minecraft.predicate.item.EnchantmentsPredicate; import net.minecraft.predicate.item.ItemPredicate; import net.minecraft.predicate.item.ItemSubPredicateTypes; -import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryWrapper; @@ -59,7 +55,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { addDrop(ModBlocks.STABLE_ENTROPY_BLOCK); addDrop(ModBlocks.PRISMA_STEEL_BLOCK); addDrop(ModBlocks.ENTROPIC_STABILIZER); - addDrop(ModBlocks.ENTROPIC_EVICERATOR); + addDrop(ModBlocks.ENTROPIC_EVISCERATOR); addDrop(ModBlocks.ENTROPIC_ENTANGLER); addDropWithSilkTouch(ModBlocks.CRYSTAL_ENTROPY); diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModItemGroups.java b/src/main/java/com/acethewildfire/acesbs/item/ModItemGroups.java index a6c024f..9bef0d8 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModItemGroups.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModItemGroups.java @@ -51,7 +51,7 @@ public class ModItemGroups { entries.add(ModBlocks.PRISMA_STEEL_BLOCK); entries.add(ModBlocks.ENTROPIC_STABILIZER); - entries.add(ModBlocks.ENTROPIC_EVICERATOR); + entries.add(ModBlocks.ENTROPIC_EVISCERATOR); entries.add(ModBlocks.ENTROPIC_ENTANGLER); entries.add(ModBlocks.LIZARD_PLANKS); diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java index af010b1..89989cc 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java @@ -2,12 +2,8 @@ package com.acethewildfire.acesbs.item; import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.block.ModBlocks; -import com.acethewildfire.acesbs.item.custom.CombustibleLemon; +import com.acethewildfire.acesbs.item.custom.*; import com.acethewildfire.acesbs.entity.ModEntities; -import com.acethewildfire.acesbs.item.custom.HammerItem; -import com.acethewildfire.acesbs.item.custom.ModArmorItem; -import com.acethewildfire.acesbs.item.custom.OracleLemon; -import com.acethewildfire.acesbs.item.custom.Wand; import com.acethewildfire.acesbs.potion.ModPotions; import com.acethewildfire.acesbs.sounds.ModSounds; import net.minecraft.client.gui.screen.Screen; @@ -20,11 +16,13 @@ import net.minecraft.item.tooltip.TooltipType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.resource.featuretoggle.FeatureFlags; +import net.minecraft.text.RawFilteredPair; import net.minecraft.text.Text; import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import java.util.List; +import java.util.Optional; public class ModItems { public static final Item ORACLE_LEMON = registerItem("oracle_lemon", new OracleLemon(new Item.Settings().component(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(ModPotions.LEMON)))); diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java new file mode 100644 index 0000000..b9f470d --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java @@ -0,0 +1,85 @@ +package com.acethewildfire.acesbs.recipe; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.item.ItemStack; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.recipe.Ingredient; +import net.minecraft.recipe.Recipe; +import net.minecraft.recipe.RecipeSerializer; +import net.minecraft.recipe.RecipeType; +import net.minecraft.registry.RegistryWrapper; +import net.minecraft.util.collection.DefaultedList; +import net.minecraft.world.World; + +public record EntropicEvisceratorRecipe(Ingredient inputItem, ItemStack output) implements Recipe { + + @Override + public DefaultedList getIngredients() { + DefaultedList list = DefaultedList.of(); + list.add(this.inputItem); + return list; + } + + // Read JSON Files + // Turns into new EntropicEvisceratorRecipe + + @Override + public boolean matches(EntropicEvisceratorRecipeInput input, World world) { + if(world.isClient()) { + return false; + } + + return inputItem.test(input.getStackInSlot(0)); + } + + @Override + public ItemStack craft(EntropicEvisceratorRecipeInput input, RegistryWrapper.WrapperLookup lookup) { + return output.copy(); + } + + @Override + public boolean fits(int width, int height) { + return true; + } + + @Override + public ItemStack getResult(RegistryWrapper.WrapperLookup registriesLookup) { + return output; + } + + @Override + public RecipeSerializer getSerializer() { + return ModRecipies.ENTROPIC_EVISCERATOR_SERIALIZER; + } + + @Override + public RecipeType getType() { + return ModRecipies.ENTROPIC_EVISCERATOR_TYPE; + } + + public static class Serializer implements RecipeSerializer { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(inst -> inst.group( + Ingredient.DISALLOW_EMPTY_CODEC.fieldOf("ingredient").forGetter(EntropicEvisceratorRecipe::inputItem), + ItemStack.CODEC.fieldOf("result").forGetter(EntropicEvisceratorRecipe::output) + ).apply(inst, EntropicEvisceratorRecipe::new)); + + public static final PacketCodec STREAM_CODEC = + PacketCodec.tuple( + Ingredient.PACKET_CODEC, EntropicEvisceratorRecipe::inputItem, + ItemStack.PACKET_CODEC, EntropicEvisceratorRecipe::output, + EntropicEvisceratorRecipe::new); + + @Override + public MapCodec codec() { + return CODEC; + } + + @Override + public PacketCodec packetCodec() { + return STREAM_CODEC; + } + + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java new file mode 100644 index 0000000..9e29f27 --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java @@ -0,0 +1,16 @@ +package com.acethewildfire.acesbs.recipe; + +import net.minecraft.item.ItemStack; +import net.minecraft.recipe.input.RecipeInput; + +public record EntropicEvisceratorRecipeInput(ItemStack input) implements RecipeInput { + @Override + public ItemStack getStackInSlot(int slot) { + return input; + } + + @Override + public int getSize() { + return 2; + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/ModRecipies.java b/src/main/java/com/acethewildfire/acesbs/recipe/ModRecipies.java index 47f5301..203f277 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/ModRecipies.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/ModRecipies.java @@ -21,6 +21,19 @@ public class ModRecipies { } }); + public static final RecipeSerializer ENTROPIC_EVISCERATOR_SERIALIZER = + Registry.register(Registries.RECIPE_SERIALIZER, Identifier.of(AcesBS.MOD_ID, "entropic_eviscerator"), + new EntropicEvisceratorRecipe.Serializer()); + + public static final RecipeType ENTROPIC_EVISCERATOR_TYPE = + Registry.register(Registries.RECIPE_TYPE, Identifier.of(AcesBS.MOD_ID, "entropic_eviscerator"), + new RecipeType() { + @Override + public String toString() { + return "entropic_eviscerator"; + } + }); + public static void registerRecipes() { AcesBS.LOGGER.info("Registering Custom Recipes for " + AcesBS.MOD_ID); } diff --git a/src/main/java/com/acethewildfire/acesbs/screen/ModScreenHandlers.java b/src/main/java/com/acethewildfire/acesbs/screen/ModScreenHandlers.java index 571970a..29c0af3 100644 --- a/src/main/java/com/acethewildfire/acesbs/screen/ModScreenHandlers.java +++ b/src/main/java/com/acethewildfire/acesbs/screen/ModScreenHandlers.java @@ -1,6 +1,7 @@ package com.acethewildfire.acesbs.screen; import com.acethewildfire.acesbs.AcesBS; +import com.acethewildfire.acesbs.screen.custom.EntropicEvisceratorScreenHandler; import com.acethewildfire.acesbs.screen.custom.EntropicStabilizerScreenHandler; import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType; import net.minecraft.registry.Registries; @@ -15,6 +16,10 @@ public class ModScreenHandlers { Registry.register(Registries.SCREEN_HANDLER, Identifier.of(AcesBS.MOD_ID, "entropic_stabilizer_screen_handler"), new ExtendedScreenHandlerType<>(EntropicStabilizerScreenHandler::new, BlockPos.PACKET_CODEC)); + public static final ScreenHandlerType ENTROPIC_EVISCERATOR_SCREEN_HANDLER = + Registry.register(Registries.SCREEN_HANDLER, Identifier.of(AcesBS.MOD_ID, "entropic_eviscerator_screen_handler"), + new ExtendedScreenHandlerType<>(EntropicEvisceratorScreenHandler::new, BlockPos.PACKET_CODEC)); + public static void registerScreenHandlers() { AcesBS.LOGGER.info("Registering Screen Handlers for " + AcesBS.MOD_ID); } diff --git a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreen.java b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreen.java new file mode 100644 index 0000000..2a193bd --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreen.java @@ -0,0 +1,59 @@ +package com.acethewildfire.acesbs.screen.custom; + +import com.acethewildfire.acesbs.AcesBS; +import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.screen.ingame.HandledScreen; +import net.minecraft.client.render.GameRenderer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; + +public class EntropicEvisceratorScreen extends HandledScreen { + + public static final Identifier GUI_TEXTURE = + Identifier.of(AcesBS.MOD_ID, "textures/gui/entropic_eviscerator/entropic_eviscerator_gui.png"); + public static final Identifier EVISCERATE_TEXTURE = + Identifier.of(AcesBS.MOD_ID, "textures/gui/eviscerate_progress.png"); + + public EntropicEvisceratorScreen(EntropicEvisceratorScreenHandler handler, PlayerInventory inventory, Text title) { + super(handler, inventory, title); + } + + @Override + protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { + RenderSystem.setShader(GameRenderer::getPositionTexProgram); + RenderSystem.setShaderColor(1f, 1f, 1f, 1f); + RenderSystem.setShaderTexture(0, GUI_TEXTURE); + + int x = (width - backgroundWidth) / 2; + int y = (height - backgroundHeight) / 2; + + context.drawTexture(GUI_TEXTURE, x, y, 0, 0, backgroundWidth, backgroundHeight); + +// renderProgressArrow(context, x, y); + renderEviscerateProgress(context, x, y); + } + +// private void renderProgressArrow(DrawContext context, int x, int y) { +// +// if(handler.isCrafting()) { +// context.drawTexture(ARROW_TEXTURE, x + 79, y + 35, 0, 0, +// handler.getScaledArrowProgress(), 16, 24, 16); +// } +// } + + private void renderEviscerateProgress(DrawContext context, int x, int y) { + if(handler.isCooking()) { + context.drawTexture(EVISCERATE_TEXTURE, x + 80, y + 35, 0, 0, + 16, handler.getScaledEviscerateProgress(), 16, 16); + } + } + + @Override + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + super.render(context, mouseX, mouseY, delta); + drawMouseoverTooltip(context, mouseX, mouseY); + } + +} diff --git a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreenHandler.java b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreenHandler.java new file mode 100644 index 0000000..2abd5ba --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEvisceratorScreenHandler.java @@ -0,0 +1,142 @@ +package com.acethewildfire.acesbs.screen.custom; + +import com.acethewildfire.acesbs.block.entity.custom.EntropicEvisceratorEntity; +import com.acethewildfire.acesbs.block.entity.custom.EntropicStabilizerEntity; +import com.acethewildfire.acesbs.item.ModItems; +import com.acethewildfire.acesbs.screen.ModScreenHandlers; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.Inventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.screen.ArrayPropertyDelegate; +import net.minecraft.screen.PropertyDelegate; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.screen.slot.Slot; +import net.minecraft.util.math.BlockPos; + +public class EntropicEvisceratorScreenHandler extends ScreenHandler { + private final Inventory inventory; + private final PropertyDelegate propertyDelegate; + public final EntropicEvisceratorEntity blockEntity; + + public EntropicEvisceratorScreenHandler(int syncId, PlayerInventory playerInventory, BlockPos pos) { + this(syncId, playerInventory, playerInventory.player.getWorld().getBlockEntity(pos), new ArrayPropertyDelegate(4)); + } + + public EntropicEvisceratorScreenHandler(int syncId, PlayerInventory playerInventory, BlockEntity blockEntity, PropertyDelegate arrayPropertyDelegate) { + super(ModScreenHandlers.ENTROPIC_EVISCERATOR_SCREEN_HANDLER, syncId); + this.inventory = ((Inventory) blockEntity); + this.blockEntity = ((EntropicEvisceratorEntity) blockEntity); + this.propertyDelegate = arrayPropertyDelegate; + + this.addSlot(new Slot(inventory, 0, 80, 17)); //Item + this.addSlot(new Slot(inventory, 1, 8, 17)); //Fuel + this.addSlot(new Slot(inventory, 2, 80, 53)); // Output + + addPlayerInventory(playerInventory); + addPlayerHotbar(playerInventory); + + addProperties(arrayPropertyDelegate); + } + + public boolean isCrafting() { + return propertyDelegate.get(2) > 0; + } + + public boolean isCooking() { + return propertyDelegate.get(0) > 0; + } + +// public int getScaledArrowProgress() { +// int progress = this.propertyDelegate.get(2); +// int maxProgress = this.propertyDelegate.get(3); // Max Progress +// int arrowPixelSize = 24; // This is the width in pixels of your arrow +// +// return maxProgress != 0 && progress != 0 ? progress * arrowPixelSize / maxProgress : 0; +// } + + public int getScaledEviscerateProgress() { + int progress = this.propertyDelegate.get(2); + int maxProgress = this.propertyDelegate.get(3); // Max Progress + int evisceratePixelSize = 16; // This is the width in pixels of your bar + + return maxProgress != 0 && progress != 0 ? progress * evisceratePixelSize / maxProgress : 0; + } + + @Override + public ItemStack quickMove(PlayerEntity player, int invSlot) { + ItemStack newStack = ItemStack.EMPTY; + Slot slot = this.slots.get(invSlot); + if (slot != null && slot.hasStack()) { + ItemStack originalStack = slot.getStack(); + newStack = originalStack.copy(); + if (invSlot == 2) { + if (!this.insertItem(originalStack, 3, 39, true)) { + return ItemStack.EMPTY; + } + + slot.onQuickTransfer(originalStack, newStack); + } else if (invSlot != 1 && invSlot != 0) { + if (this.isEviscerateable(originalStack)) { + if (!this.insertItem(originalStack, 0, 1, false)) { + return ItemStack.EMPTY; + } + } else if (this.isFuel(originalStack)) { + if (!this.insertItem(originalStack, 1, 2, false)) { + return ItemStack.EMPTY; + } + } else if (invSlot >= 3 && invSlot < 30) { + if (!this.insertItem(originalStack, 30, 39, false)) { + return ItemStack.EMPTY; + } + } else if (invSlot >= 30 && invSlot < 39 && !this.insertItem(originalStack, 3, 30, false)) { + return ItemStack.EMPTY; + } + } else if (!this.insertItem(originalStack, 3, 39, false)) { + return ItemStack.EMPTY; + } + + if (originalStack.isEmpty()) { + slot.setStack(ItemStack.EMPTY); + } else { + slot.markDirty(); + } + + if (newStack.getCount() == originalStack.getCount()) { + return ItemStack.EMPTY; + } + + slot.onTakeItem(player, originalStack); + } + return newStack; + } + + protected boolean isEviscerateable(ItemStack itemStack) { + return itemStack.isOf(ModItems.RAW_ENTROPY) || itemStack.isOf(ModItems.RAW_ENDTROPY); + } + + protected boolean isFuel(ItemStack itemStack) { + return itemStack.isOf(ModItems.STABLE_ENTROPY); + } + + @Override + public boolean canUse(PlayerEntity player) { + return this.inventory.canPlayerUse(player); + } + + private void addPlayerInventory(PlayerInventory playerInventory) { + for (int i = 0; i < 3; ++i) { + for (int l = 0; l < 9; ++l) { + this.addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); + } + } + } + + private void addPlayerHotbar(PlayerInventory playerInventory) { + for (int i = 0; i < 9; ++i) { + this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); + } + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicStabilizerScreen.java b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicStabilizerScreen.java index d86f439..fc0ea6c 100644 --- a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicStabilizerScreen.java +++ b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicStabilizerScreen.java @@ -48,7 +48,7 @@ public class EntropicStabilizerScreen extends HandledScreenQL70(Y)*K0-AbW|YuPgg2CPpTHqpy4HfqIyGJY5_^DsH{K8<;o8K*Zsq z`_xe0+aKH}?BN$9^ zJ9udpoeMkpDk79-0u7T%5VSg-)CoJkYRkc;cfiBTl)LoMKs7VC@_@&*Gc%Q{OT`xne2TG4GauS3>-kq(HS3d&Gt)Xte3C1?OSa5Y>(~n ze*gaq8Fcg=I_DJkJkIE|%s>B8b~+vd6o7_K1G;I&g=e)4)qj6v7oT}JXI96I=aqdO zKVCm#HD{Vx+-CV&x)B<8)4m(HzhRgrzMw@q|BU9`$8HMq8F9D`#_^+z_U4Z ze8&s54W>U1OMqxuuQL70(Y)*K0-AbW|YuPgg2CPrpH?M}Wk*BBU>sy$sCLn>~)y>mCW*+8V> z;%lwoquF;{C+uNwHgG=?@r85iN#`pZtF9HCOI~DlN%Y@_-_D)--VX9zf^V!(q(-i( zx7wNEE!a4>CgRVRw0Y^)*JR5X_!)QHf4}U|ezU%07Z;z)De4;z^Bs7^&d9*RAi&@N z@-hlzf&BFFe7?gQeli;wXRU3QnfJ5c1;ZNg7h-F-I{%+M@#g~$1`Y-Vh6bQ(aWD?( zSNybTIMZ`&mgY?UbRLJbR}X8QVRvVEP-4wc_pEHU?Heu!1_5rC15Vp72sSuxJ|M_& zgo*Kh({lMb-W{KJ{{MaR|K0DvkallS&iQ?P_upT;k{Qc@7RvlhXM8PNzxTEEZ)FB` z8!j7pW(NkpZQKlu8-UoNn#X~mq5j}~#vB8l!_VGNoLR=f;jrGQ`11Ab*KERg+_Cr- z)%Wu%6vDM8aJ=kbdB?PAur{`#uP yi(@9ff`Ug?wpGeKNKz@OddmcieK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a z5n0T@z%2~Ij105pNB{-dOFVsD*)^o7lQ!@bMnXk z@qYPBJyx?Txp(RF(ESti! h+>~aX)$5z>n)^1!{L>Hp%^+Vfc)I$ztaD0e0s!{2MmGQe literal 0 HcmV?d00001 diff --git a/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json b/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json new file mode 100644 index 0000000..09225bc --- /dev/null +++ b/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json @@ -0,0 +1,10 @@ +{ + "type": "acesbs:entropic_eviscerator", + "ingredient": { + "item": "minecraft:wheat_seeds" + }, + "result": { + "count": 1, + "id": "acesbs:tobacco_seeds" + } +} \ No newline at end of file