From 23791da5a2480ada639cf409bffe7c41d5d11a6f Mon Sep 17 00:00:00 2001 From: rearth Date: Sat, 24 Feb 2024 01:20:20 +0100 Subject: [PATCH] Add powered furnace block --- .../19c08d24c255c2719fbb8ac01f9dff290b763461 | 29 +- .../blockstates/powered_furnace_block.json | 7 + .../block/base/entity/MachineBlockEntity.java | 51 ++- .../custom/machines/PoweredFurnaceBlock.java | 20 + .../machines/PoweredFurnaceBlockEntity.java | 154 +++++++ .../oritech/client/init/ModRenderers.java | 1 + .../oritech/client/init/ModScreens.java | 2 + .../oritech/client/ui/BasicMachineScreen.java | 7 +- .../rearth/oritech/init/BlockContent.java | 3 + .../oritech/init/BlockEntitiesContent.java | 8 +- .../oritech/init/datagen/ModelGenerator.java | 1 + .../rearth/oritech/util/ScreenProvider.java | 2 + .../powered_furnace_block.animation.json | 418 ++++++++++++++++++ .../models/powered_furnace_block.geo.json | 385 ++++++++++++++++ .../resources/assets/oritech/lang/en_us.json | 1 + .../models/item/powered_furnace_block.json | 95 ++++ .../block/models/powered_furnace_block.png | Bin 0 -> 1831 bytes 17 files changed, 1139 insertions(+), 45 deletions(-) create mode 100644 src/main/generated/assets/oritech/blockstates/powered_furnace_block.json create mode 100644 src/main/java/rearth/oritech/block/custom/machines/PoweredFurnaceBlock.java create mode 100644 src/main/java/rearth/oritech/block/entity/machines/PoweredFurnaceBlockEntity.java create mode 100644 src/main/resources/assets/oritech/animations/block/models/powered_furnace_block.animation.json create mode 100644 src/main/resources/assets/oritech/geo/block/models/powered_furnace_block.geo.json create mode 100644 src/main/resources/assets/oritech/models/item/powered_furnace_block.json create mode 100644 src/main/resources/assets/oritech/textures/block/models/powered_furnace_block.png diff --git a/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 b/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 index 9699e2b23..dc1d18deb 100644 --- a/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 +++ b/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 @@ -1,31 +1,24 @@ -// 1.20.4 2024-02-21T21:51:37.9684867 Oritech/Model Definitions +// 1.20.4 2024-02-23T22:04:26.5787369 Oritech/Model Definitions +c641d411ad252487b93d779cee9028b9ee920281 assets\oritech\blockstates\machine_core_basic.json 3d6f377b938592ac22aca17bd64561a6579ad217 assets\oritech\blockstates\grinder_block.json 90e28b721796ff7ee21c8eefe4525f03a251d2fb assets\oritech\models\block\machine_extender.json -16b697f4a40bfdcd8c39629776b97696e80681c7 assets\oritech\blockstates\machine_efficiency_addon.json -e9e01eaa866f29f36a31fd6872a4b1a499ce830b assets\oritech\models\item\machine_inventory_proxy_addon.json -b5ee97616ae0d2da17dfaecf45aa42f2cf19f691 assets\oritech\blockstates\machine_extender.json -eafe84c787830ab2a866e0878e9ed718d58659f5 assets\oritech\blockstates\banana_block.json -c9c5614f832a38e30b60d0a15d75292159b16455 assets\oritech\models\item\machine_speed_addon.json -25864df3cd7786f2bf4fe6fa9855b3cf366c28ca assets\oritech\models\item\banana.json -b8bc03092cb1eb686ede01daffc7421253af860c assets\oritech\models\item\machine_extender.json -746b98d721e5ae0d96dd769e71b786afa8c2d142 assets\oritech\models\item\banana_block.json -63f14855c688ce7ec236097ce232dd381cbc1538 assets\oritech\blockstates\addon_indicator_block.json -7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\machine_speed_addon.json -95eae9b13fb2835f15057d2fd4d9550192064ca4 assets\oritech\models\item\grinder_block.json -c641d411ad252487b93d779cee9028b9ee920281 assets\oritech\blockstates\machine_core_basic.json -6c9c0c9fbf5c26f5e8146a956b9e0567572acb45 assets\oritech\blockstates\machine_inventory_proxy_addon.json f29468ff950a191567ab35557334666099ccd7cc assets\oritech\blockstates\assembler_block.json 964457f56e25b66dfef2160c8618bcaba2b640aa assets\oritech\blockstates\pulverizer_block.json -24c3ad5133727ec3d6d075af18fd96cf2687ec03 assets\oritech\models\block\machine_efficiency_addon.json -801af982fe394c02734dd407d3d6b960d9501dba assets\oritech\models\block\machine_speed_addon.json 505d30e3b61ee0ba1f2616e1226689e2cdb7ab58 assets\oritech\models\block\addon_indicator_block.json e4497bad8afbd4f4b4e830d892284a05718b06dd assets\oritech\models\block\machine_core_basic.json 1b9cd3719105dc1e03398de41f2cab37337816fe assets\oritech\blockstates\machine_core_good.json 5462a2453fcdd2f8b99129894aec60f282d29ca9 assets\oritech\models\item\pulverizer_block.json a3f9b72f6f36d42af4e5c3a87d7e180b2e36a2ed assets\oritech\models\item\machine_core_good.json +b5ee97616ae0d2da17dfaecf45aa42f2cf19f691 assets\oritech\blockstates\machine_extender.json +eafe84c787830ab2a866e0878e9ed718d58659f5 assets\oritech\blockstates\banana_block.json a5651b8d4a27308b40c404f7cd3abcf9769b64b6 assets\oritech\models\item\machine_core_basic.json 469ea8a66c529fe26bc029c21092e7f062ed0e40 assets\oritech\models\block\banana_block.json +25864df3cd7786f2bf4fe6fa9855b3cf366c28ca assets\oritech\models\item\banana.json d35ecef5df9198b12dc04267780c727c144b1959 assets\oritech\models\item\assembler_block.json -020ab18ae7f8883ba8928eb4a2d93defb0274c6b assets\oritech\models\block\machine_inventory_proxy_addon.json -823e02e06a2ca976d021d4ab1a0b63ffa6a89bea assets\oritech\models\item\machine_efficiency_addon.json +b8bc03092cb1eb686ede01daffc7421253af860c assets\oritech\models\item\machine_extender.json +746b98d721e5ae0d96dd769e71b786afa8c2d142 assets\oritech\models\item\banana_block.json +63f14855c688ce7ec236097ce232dd381cbc1538 assets\oritech\blockstates\addon_indicator_block.json +d54a0ed3dde3549c889fe4a585acb78301108fbe assets\oritech\blockstates\powedred_furnace_block.json +95eae9b13fb2835f15057d2fd4d9550192064ca4 assets\oritech\models\item\grinder_block.json +fe13536a509021e4ee1594cf477eb5ddd4e7d306 assets\oritech\models\item\powedred_furnace_block.json 3166a5959c87c4465c5eed82034d3178c4b8b518 assets\oritech\models\block\machine_core_good.json diff --git a/src/main/generated/assets/oritech/blockstates/powered_furnace_block.json b/src/main/generated/assets/oritech/blockstates/powered_furnace_block.json new file mode 100644 index 000000000..ea3af3caf --- /dev/null +++ b/src/main/generated/assets/oritech/blockstates/powered_furnace_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "oritech:block/powered_furnace_block" + } + } +} \ No newline at end of file diff --git a/src/main/java/rearth/oritech/block/base/entity/MachineBlockEntity.java b/src/main/java/rearth/oritech/block/base/entity/MachineBlockEntity.java index d08852370..332f475f1 100644 --- a/src/main/java/rearth/oritech/block/base/entity/MachineBlockEntity.java +++ b/src/main/java/rearth/oritech/block/base/entity/MachineBlockEntity.java @@ -55,7 +55,6 @@ public abstract class MachineBlockEntity extends BlockEntity public static final RawAnimation WORKING = RawAnimation.begin().thenLoop("working"); protected final AnimatableInstanceCache animatableInstanceCache = GeckoLibUtil.createInstanceCache(this); private final AnimationController animationController = getAnimationController(); - private int idleTicks = 0; // crafting / processing protected int progress; @@ -92,12 +91,12 @@ public void tick(World world, BlockPos pos, BlockState state, MachineBlockEntity if (recipeCandidate.isPresent() && canOutputRecipe(recipeCandidate.get().value())) { // this is separate so that progress is not reset when out of energy - if (hasEnoughEnergy(recipeCandidate.get().value())) { + if (hasEnoughEnergy()) { var activeRecipe = recipeCandidate.get().value(); currentRecipe = activeRecipe; // check energy - useEnergy(activeRecipe); + useEnergy(); // increase progress progress++; @@ -120,12 +119,12 @@ public void tick(World world, BlockPos pos, BlockState state, MachineBlockEntity } } - private boolean hasEnoughEnergy(OritechRecipe recipe) { + protected boolean hasEnoughEnergy() { return energyStorage.amount > calculateEnergyUsage(); } @SuppressWarnings("lossy-conversions") - private void useEnergy(OritechRecipe recipe) { + protected void useEnergy() { energyStorage.amount -= calculateEnergyUsage(); } @@ -133,7 +132,7 @@ private float calculateEnergyUsage() { return energyPerTick * getEfficiencyMultiplier() * (1 / getSpeedMultiplier()); } - private void updateNetwork() { + protected void updateNetwork() { if (!networkDirty) return; @@ -175,6 +174,8 @@ private void craftItem(OritechRecipe activeRecipe, List outputInvento var results = activeRecipe.getResults(); var inputs = activeRecipe.getInputs(); + + // create outputs for (int i = 0; i < results.size(); i++) { var result = results.get(i); var slot = outputInventory.get(i); @@ -187,6 +188,7 @@ private void craftItem(OritechRecipe activeRecipe, List outputInvento } } + // remove inputs for (int i = 0; i < inputs.size(); i++) { var taken = Inventories.splitStack(inputInventory, i, 1); // amount is not configurable, because ingredient doesn't parse amount in recipe } @@ -197,12 +199,12 @@ private boolean checkCraftingFinished(OritechRecipe activeRecipe) { return progress >= activeRecipe.getTime() * getSpeedMultiplier(); } - private void resetProgress() { + protected void resetProgress() { progress = 0; markNetDirty(); } - private void markNetDirty() { + protected void markNetDirty() { networkDirty = true; markDirty(); } @@ -221,14 +223,20 @@ private boolean canOutputRecipe(OritechRecipe recipe) { if (outSlot.isEmpty()) continue; - if (!result.getItem().equals(outSlot.getItem())) return false; // type mismatches - if (outSlot.getCount() + result.getCount() > outSlot.getMaxCount()) return false; // count too high + if (!canAddToSlot(result, outSlot)) return false; } return true; } + protected boolean canAddToSlot(ItemStack input, ItemStack slot) { + if (slot.isEmpty()) return true; + if (!slot.getItem().equals(input.getItem())) return false; // type mismatch + if (slot.getCount() + input.getCount() > slot.getMaxCount()) return false; // count too high + return true; + } + private Optional> getRecipe() { return Objects.requireNonNull(world).getRecipeManager().getFirstMatch(getOwnRecipeType(), getInputInventory(), world); } @@ -448,17 +456,8 @@ public AnimationController getAnimationController() { if (isActive(getCachedState())) { - if (getProgress() == 0) { - idleTicks++; - } else { - idleTicks = 0; - } - - if (idleTicks < 3) { - var recipeTicks = getCurrentRecipe().getTime() * getSpeedMultiplier(); - var animationTicks = 60f; // 3s - var animSpeed = animationTicks / recipeTicks; - state.getController().setAnimationSpeed(animSpeed); + if (progress > 0) { + state.getController().setAnimationSpeed(getAnimationSpeed()); return state.setAndContinue(WORKING); } else { return state.setAndContinue(IDLE); @@ -469,6 +468,16 @@ public AnimationController getAnimationController() { }); } + protected float getAnimationSpeed() { + var recipeTicks = getRecipeDuration() * getSpeedMultiplier(); + var animationTicks = 60f; // 3s + return animationTicks / recipeTicks; + } + + protected int getRecipeDuration() { + return getCurrentRecipe().getTime(); + } + @Override public AnimatableInstanceCache getAnimatableInstanceCache() { return animatableInstanceCache; diff --git a/src/main/java/rearth/oritech/block/custom/machines/PoweredFurnaceBlock.java b/src/main/java/rearth/oritech/block/custom/machines/PoweredFurnaceBlock.java new file mode 100644 index 000000000..2d5f97a32 --- /dev/null +++ b/src/main/java/rearth/oritech/block/custom/machines/PoweredFurnaceBlock.java @@ -0,0 +1,20 @@ +package rearth.oritech.block.custom.machines; + +import net.minecraft.block.BlockEntityProvider; +import net.minecraft.block.entity.BlockEntity; +import org.jetbrains.annotations.NotNull; +import rearth.oritech.block.base.block.MultiblockMachine; +import rearth.oritech.block.entity.machines.GrinderBlockEntity; +import rearth.oritech.block.entity.machines.PoweredFurnaceBlockEntity; + +public class PoweredFurnaceBlock extends MultiblockMachine implements BlockEntityProvider { + + public PoweredFurnaceBlock(Settings settings) { + super(settings); + } + + @Override + public @NotNull Class getBlockEntityType() { + return PoweredFurnaceBlockEntity.class; + } +} diff --git a/src/main/java/rearth/oritech/block/entity/machines/PoweredFurnaceBlockEntity.java b/src/main/java/rearth/oritech/block/entity/machines/PoweredFurnaceBlockEntity.java new file mode 100644 index 000000000..6865c8ad6 --- /dev/null +++ b/src/main/java/rearth/oritech/block/entity/machines/PoweredFurnaceBlockEntity.java @@ -0,0 +1,154 @@ +package rearth.oritech.block.entity.machines; + +import net.minecraft.block.BlockState; +import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.SmeltingRecipe; +import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3i; +import net.minecraft.world.World; +import rearth.oritech.block.base.entity.MachineBlockEntity; +import rearth.oritech.block.base.entity.MultiblockMachineEntity; +import rearth.oritech.client.init.ModScreens; +import rearth.oritech.init.BlockEntitiesContent; +import rearth.oritech.init.recipes.OritechRecipeType; +import rearth.oritech.init.recipes.RecipeContent; +import rearth.oritech.util.InventorySlotAssignment; + +import java.util.List; +import java.util.Objects; + +public class PoweredFurnaceBlockEntity extends MultiblockMachineEntity { + + private final float FURNACE_SPEED_MULTIPLIER = 0.5f; + + public PoweredFurnaceBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntitiesContent.POWERED_FURNACE_ENTITY, pos, state, 30); + } + + @Override + protected OritechRecipeType getOwnRecipeType() { + return RecipeContent.ASSEMBLER; + } // not used in this special case + + @Override + public void tick(World world, BlockPos pos, BlockState state, MachineBlockEntity blockEntity) { + + if (world.isClient || !isActive(state)) return; + + var recipeCandidate = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, getInputInventory(), world); + + if (recipeCandidate.isPresent() && canAddToSlot(recipeCandidate.get().value().getResult(world.getRegistryManager()), this.getItems().get(1))) { + if (hasEnoughEnergy()) { + + var activeRecipe = recipeCandidate.get().value(); + useEnergy(); + progress++; + + if (furnaceCraftingFinished(activeRecipe)) { + craftFurnaceItem(activeRecipe); + resetProgress(); + } + + markNetDirty(); + + } + } else { + // this happens if either the input slot is empty, or the output slot is blocked + if (progress > 0) resetProgress(); + } + + if (networkDirty) { + updateNetwork(); + } + } + + private void craftFurnaceItem(SmeltingRecipe activeRecipe) { + var result = activeRecipe.getResult(world.getRegistryManager()); + var outSlot = inventory.get(1); + var inSlot = inventory.get(0); + + inSlot.decrement(1); + if (outSlot.isEmpty()) { + inventory.set(1, result.copy()); + } else { + outSlot.increment(result.getCount()); + } + + } + + private boolean furnaceCraftingFinished(SmeltingRecipe activeRecipe) { + return progress >= activeRecipe.getCookingTime() * getSpeedMultiplier(); + } + + @SuppressWarnings("OptionalIsPresent") + @Override + public float getProgress() { + if (progress == 0) return 0; + + var recipeCandidate = Objects.requireNonNull(world).getRecipeManager().getFirstMatch(RecipeType.SMELTING, getInputInventory(), world); + if (recipeCandidate.isPresent()) { + return (float) progress / getRecipeDuration(); + } + + return 0; + } + + @SuppressWarnings("OptionalIsPresent") + @Override + protected int getRecipeDuration() { + var recipeCandidate = Objects.requireNonNull(world).getRecipeManager().getFirstMatch(RecipeType.SMELTING, getInputInventory(), world); + if (recipeCandidate.isPresent()) { + return (int) (recipeCandidate.get().value().getCookingTime() * getSpeedMultiplier()); + } + + return 1; + } + + @Override + public float getSpeedMultiplier() { + return super.getSpeedMultiplier() * FURNACE_SPEED_MULTIPLIER; + } + + @Override + public InventorySlotAssignment getSlots() { + return new InventorySlotAssignment(0, 1, 1, 1); + } + + @Override + public boolean inputOptionsEnabled() { + return false; + } + + @Override + public List getGuiSlots() { + return List.of( + new GuiSlot(0, 80, 11), + new GuiSlot(1, 80, 59)); + } + + @Override + public ScreenHandlerType getScreenHandlerType() { + return ModScreens.POWERED_FURNACE_SCREEN; + } + + @Override + public int getInventorySize() { + return 2; + } + + @Override + public List getCorePositions() { + return List.of( + new Vec3i(0, 1,0) + ); + } + + @Override + public List getAddonSlots() { + + return List.of( + new Vec3i(0, -1,0) + ); + } +} diff --git a/src/main/java/rearth/oritech/client/init/ModRenderers.java b/src/main/java/rearth/oritech/client/init/ModRenderers.java index 183249b0c..54736fee7 100644 --- a/src/main/java/rearth/oritech/client/init/ModRenderers.java +++ b/src/main/java/rearth/oritech/client/init/ModRenderers.java @@ -12,6 +12,7 @@ public static void registerRenderers() { BlockEntityRendererFactories.register(BlockEntitiesContent.PULVERIZER_ENTITY, ctx -> new MachineRenderer<>("models/pulverizer_block")); BlockEntityRendererFactories.register(BlockEntitiesContent.GRINDER_ENTITY, ctx -> new MachineRenderer<>("models/grinder_block")); BlockEntityRendererFactories.register(BlockEntitiesContent.ASSEMBLER_ENTITY, ctx -> new MachineRenderer<>("models/assembler_block")); + BlockEntityRendererFactories.register(BlockEntitiesContent.POWERED_FURNACE_ENTITY, ctx -> new MachineRenderer<>("models/powered_furnace_block")); Oritech.LOGGER.info("Registering Entities Renderers for " + Oritech.MOD_ID); } diff --git a/src/main/java/rearth/oritech/client/init/ModScreens.java b/src/main/java/rearth/oritech/client/init/ModScreens.java index 9894d7531..856a6684e 100644 --- a/src/main/java/rearth/oritech/client/init/ModScreens.java +++ b/src/main/java/rearth/oritech/client/init/ModScreens.java @@ -13,12 +13,14 @@ public class ModScreens implements AutoRegistryContainer> { public static final ExtendedScreenHandlerType PULVERIZER_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType GRINDER_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType ASSEMBLER_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); + public static final ExtendedScreenHandlerType POWERED_FURNACE_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType INVENTORY_PROXY_SCREEN = new ExtendedScreenHandlerType<>(InventoryProxyScreenHandler::new); public static void assignScreens() { HandledScreens.register(PULVERIZER_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(GRINDER_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(ASSEMBLER_SCREEN, UpgradableMachineScreen::new); + HandledScreens.register(POWERED_FURNACE_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(INVENTORY_PROXY_SCREEN, InventoryProxyScreen::new); } diff --git a/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java b/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java index 36d28b727..0aab6b6c0 100644 --- a/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java +++ b/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java @@ -99,7 +99,8 @@ public Text getEnergyTooltip(long amount, long max) { var percentage = (float) amount / max; var energyFill = String.format("%.1f", percentage * 100); var energyUsage = ((MachineBlockEntity) handler.blockEntity).getEffectiveEnergyPerTick(); - return Text.literal(amount + " / " + max + " RF\n" + energyFill + "% Charged\n\nMaximum Usage: " + energyUsage + " RF/t"); + var energyUsageText = String.format("%.1f", energyUsage); + return Text.literal(amount + " / " + max + " RF\n" + energyFill + "% Charged\n\nMaximum Usage: " + energyUsageText + " RF/t"); } public void updateSettingsButtons() { @@ -136,7 +137,9 @@ public void addExtensionComponents(FlowLayout container) { cycleInputButton.margins(Insets.of(3)); container.child(Components.label(Text.literal("Options")).margins(Insets.of(3, 1, 1, 1))); - container.child(cycleInputButton); + + if (handler.screenData.inputOptionsEnabled()) + container.child(cycleInputButton); } private FlowLayout buildOverlay() { diff --git a/src/main/java/rearth/oritech/init/BlockContent.java b/src/main/java/rearth/oritech/init/BlockContent.java index 1dc6a5182..653b5914d 100644 --- a/src/main/java/rearth/oritech/init/BlockContent.java +++ b/src/main/java/rearth/oritech/init/BlockContent.java @@ -12,6 +12,7 @@ import rearth.oritech.block.custom.MachineCoreBlock; import rearth.oritech.block.custom.machines.AssemblerBlock; import rearth.oritech.block.custom.machines.GrinderBlock; +import rearth.oritech.block.custom.machines.PoweredFurnaceBlock; import rearth.oritech.block.custom.machines.PulverizerBlock; import rearth.oritech.block.custom.machines.addons.EnergyAddonBlock; import rearth.oritech.block.custom.machines.addons.InventoryProxyAddonBlock; @@ -38,6 +39,8 @@ public class BlockContent implements BlockRegistryContainer { public static final Block GRINDER_BLOCK = new GrinderBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); @UseGeoBlockItem(scale = 0.7f) public static final Block ASSEMBLER_BLOCK = new AssemblerBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); + @UseGeoBlockItem(scale = 0.7f) + public static final Block POWERED_FURNACE_BLOCK = new PoweredFurnaceBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); public static final Block MACHINE_CORE_BASIC = new MachineCoreBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque(), 1); public static final Block MACHINE_CORE_GOOD = new MachineCoreBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque(), 6); diff --git a/src/main/java/rearth/oritech/init/BlockEntitiesContent.java b/src/main/java/rearth/oritech/init/BlockEntitiesContent.java index 5c577f6fd..089aaec48 100644 --- a/src/main/java/rearth/oritech/init/BlockEntitiesContent.java +++ b/src/main/java/rearth/oritech/init/BlockEntitiesContent.java @@ -5,10 +5,7 @@ import net.minecraft.block.entity.BlockEntityType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import rearth.oritech.block.entity.machines.AssemblerBlockEntity; -import rearth.oritech.block.entity.machines.GrinderBlockEntity; -import rearth.oritech.block.entity.machines.MachineCoreEntity; -import rearth.oritech.block.entity.machines.PulverizerBlockEntity; +import rearth.oritech.block.entity.machines.*; import rearth.oritech.block.entity.machines.addons.AddonBlockEntity; import rearth.oritech.block.entity.machines.addons.EnergyAcceptorAddonBlockEntity; import rearth.oritech.block.entity.machines.addons.InventoryProxyAddonBlockEntity; @@ -32,6 +29,9 @@ public class BlockEntitiesContent implements AutoRegistryContainer ASSEMBLER_ENTITY = FabricBlockEntityTypeBuilder.create(AssemblerBlockEntity::new, BlockContent.ASSEMBLER_BLOCK).build(); + @AssignSidedEnergy + public static final BlockEntityType POWERED_FURNACE_ENTITY = FabricBlockEntityTypeBuilder.create(PoweredFurnaceBlockEntity::new, BlockContent.POWERED_FURNACE_BLOCK).build(); + @AssignSidedEnergy public static final BlockEntityType ENERGY_ACCEPTOR_ADDON_ENTITY = FabricBlockEntityTypeBuilder.create(EnergyAcceptorAddonBlockEntity::new, BlockContent.MACHINE_ACCEPTOR_ADDON).build(); diff --git a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java index f2e5994b5..c97293884 100644 --- a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java +++ b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java @@ -21,6 +21,7 @@ public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGen blockStateModelGenerator.registerSimpleState(BlockContent.PULVERIZER_BLOCK); blockStateModelGenerator.registerSimpleState(BlockContent.GRINDER_BLOCK); blockStateModelGenerator.registerSimpleState(BlockContent.ASSEMBLER_BLOCK); + blockStateModelGenerator.registerSimpleState(BlockContent.POWERED_FURNACE_BLOCK); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_BASIC); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_GOOD); diff --git a/src/main/java/rearth/oritech/util/ScreenProvider.java b/src/main/java/rearth/oritech/util/ScreenProvider.java index 3e8af2de7..850efee19 100644 --- a/src/main/java/rearth/oritech/util/ScreenProvider.java +++ b/src/main/java/rearth/oritech/util/ScreenProvider.java @@ -25,6 +25,8 @@ default boolean showEnergy() { InventoryInputMode getInventoryInputMode(); ScreenHandlerType getScreenHandlerType(); + + default boolean inputOptionsEnabled() {return true;} default EnergyConfiguration getEnergyConfiguration() { return new EnergyConfiguration(7, 24, 15, 54); diff --git a/src/main/resources/assets/oritech/animations/block/models/powered_furnace_block.animation.json b/src/main/resources/assets/oritech/animations/block/models/powered_furnace_block.animation.json new file mode 100644 index 000000000..ea00f7971 --- /dev/null +++ b/src/main/resources/assets/oritech/animations/block/models/powered_furnace_block.animation.json @@ -0,0 +1,418 @@ +{ + "format_version": "1.8.0", + "animations": { + "deploy": { + "animation_length": 2.6, + "bones": { + "upper_part": { + "rotation": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [0, 180, 0], + "easing": "easeOutCirc" + } + }, + "position": { + "0.76": { + "vector": [0, -13, 0] + }, + "1.56": { + "vector": [0, 0, 0], + "easing": "easeOutCirc" + } + } + }, + "beam": { + "scale": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.36": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [1, 1, 1], + "easing": "easeInOutBack" + } + } + }, + "capsule": { + "scale": { + "0.76": { + "vector": [1, 0.5, 1] + }, + "1.56": { + "vector": [1, 1, 1], + "easing": "easeOutExpo" + } + } + }, + "southclip": { + "position": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.16": { + "vector": [0, 0, -0.75], + "easing": "easeOutBack", + "easingArgs": [2] + }, + "1.32": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [0, 1, 0], + "easing": "easeOutBack" + } + } + }, + "eastclip": { + "position": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.12": { + "vector": [-0.75, 0, 0], + "easing": "easeOutBack", + "easingArgs": [2] + }, + "1.28": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [0, 1, 0], + "easing": "easeOutBack" + } + } + }, + "northclip": { + "position": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.08": { + "vector": [0, 0, 0.75], + "easing": "easeOutBack", + "easingArgs": [2] + }, + "1.24": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [0, 1, 0], + "easing": "easeOutBack" + } + } + }, + "westclip": { + "position": { + "0.76": { + "vector": [0, 0, 0] + }, + "1.12": { + "vector": [0.75, 0, 0], + "easing": "easeOutBack", + "easingArgs": [2] + }, + "1.28": { + "vector": [0, 0, 0] + }, + "1.56": { + "vector": [0, 1, 0], + "easing": "easeOutBack" + } + } + } + } + }, + "idle": { + "animation_length": 0.25 + }, + "packaged": { + "animation_length": 0.76, + "bones": { + "upper_part": { + "rotation": { + "vector": [0, 0, 0] + }, + "position": { + "vector": [0, -13, 0] + } + }, + "beam": { + "scale": { + "vector": [0, 0, 0] + } + }, + "capsule": { + "scale": { + "vector": [1, 0.5, 1] + } + }, + "southclip": { + "position": { + "vector": [0, 0, 0] + } + }, + "eastclip": { + "position": { + "vector": [0, 0, 0] + } + }, + "northclip": { + "position": { + "vector": [0, 0, 0] + } + }, + "westclip": { + "position": { + "vector": [0, 0, 0] + } + } + } + }, + "working": { + "loop": true, + "animation_length": 3, + "bones": { + "upper_part": { + "rotation": { + "vector": [0, 180, 0], + "easing": "easeOutCirc" + }, + "position": { + "vector": [0, 0, 0], + "easing": "easeOutCirc" + } + }, + "beam": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "2.88": { + "vector": [0, 1800, 0], + "easing": "easeInOutSine" + } + }, + "scale": { + "0.0": { + "vector": [1, 1, 1] + }, + "0.88": { + "vector": [1.3, 1.3, 1.3], + "easing": "easeInCirc" + }, + "2.88": { + "vector": [1, 1, 1], + "easing": "easeOutBack", + "easingArgs": [2] + } + } + }, + "bone2": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.24": { + "vector": [0.07, 0, 0.07], + "easing": "step" + }, + "0.4": { + "vector": [-0.07, 0, -0.07], + "easing": "step" + }, + "0.68": { + "vector": [0.07, 0, -0.07], + "easing": "step" + }, + "0.88": { + "vector": [-0.07, 0, 0.07], + "easing": "step" + }, + "1.12": { + "vector": [0.07, 0, 0.07], + "easing": "step" + }, + "1.44": { + "vector": [-0.07, 0, -0.07], + "easing": "step" + }, + "1.6": { + "vector": [0.07, 0, 0.07], + "easing": "step" + }, + "1.8": { + "vector": [0.07, 0, -0.07], + "easing": "step" + }, + "1.96": { + "vector": [-0.07, 0, 0.07], + "easing": "step" + }, + "2.16": { + "vector": [-0.07, 0, -0.07], + "easing": "step" + }, + "2.4": { + "vector": [0.07, 0, 0.07], + "easing": "step" + }, + "2.56": { + "vector": [-0.07, 0, -0.07], + "easing": "step" + }, + "2.88": { + "vector": [0, 0, 0] + } + }, + "scale": { + "vector": [1, 1, 1] + } + }, + "capsule": { + "scale": { + "vector": [1, 1, 1], + "easing": "easeOutExpo" + } + }, + "southclip": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.4": { + "vector": [-0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "0.76": { + "vector": [0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "1.12": { + "vector": [-0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "1.56": { + "vector": [0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "1.8": { + "vector": [-0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "2.12": { + "vector": [0.3, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "2.28": { + "vector": [0, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + } + } + }, + "eastclip": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.4": { + "vector": [0, 0, 0.3], + "easing": "easeInBounce" + }, + "0.68": { + "vector": [0, 0, -0.3], + "easing": "easeInBounce" + }, + "1.2": { + "vector": [0, 0, 0.3], + "easing": "easeInBounce" + }, + "1.56": { + "vector": [0, 0, -0.3], + "easing": "easeInBounce" + }, + "1.92": { + "vector": [0, 0, 0.3], + "easing": "easeInBounce" + }, + "2.16": { + "vector": [0, 0, -0.3], + "easing": "easeInBounce" + }, + "2.88": { + "vector": [0.07, 0, 1] + } + } + }, + "northclip": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.36": { + "vector": [-0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "0.64": { + "vector": [0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "0.88": { + "vector": [-0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "1.24": { + "vector": [0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "1.64": { + "vector": [-0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "1.88": { + "vector": [0.2, 0, 0], + "easing": "easeInOutBounce" + }, + "2.2": { + "vector": [0, 0, 0] + } + } + }, + "westclip": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.76": { + "vector": [0, 0, 0.3], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "1.64": { + "vector": [0, 0, -0.3], + "easing": "easeInOutBounce", + "easingArgs": [1] + }, + "2.28": { + "vector": [0, 0, 0], + "easing": "easeInOutBounce", + "easingArgs": [1] + } + } + } + } + } + }, + "geckolib_format_version": 2 +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/geo/block/models/powered_furnace_block.geo.json b/src/main/resources/assets/oritech/geo/block/models/powered_furnace_block.geo.json new file mode 100644 index 000000000..e957ff516 --- /dev/null +++ b/src/main/resources/assets/oritech/geo/block/models/powered_furnace_block.geo.json @@ -0,0 +1,385 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 128, + "texture_height": 128, + "visible_bounds_width": 2, + "visible_bounds_height": 3.5, + "visible_bounds_offset": [0, 1.25, 0] + }, + "bones": [ + { + "name": "machine", + "pivot": [0, 0, 0] + }, + { + "name": "base_machine", + "parent": "machine", + "pivot": [5, -4, 0], + "cubes": [ + { + "origin": [-7, 0, -7], + "size": [14, 2, 14], + "inflate": 0.01, + "uv": { + "north": {"uv": [28, 47], "uv_size": [14, 2]}, + "east": {"uv": [28, 47], "uv_size": [14, 2]}, + "south": {"uv": [28, 47], "uv_size": [14, 2]}, + "west": {"uv": [28, 47], "uv_size": [14, 2]}, + "up": {"uv": [14, 33], "uv_size": [14, 14]}, + "down": {"uv": [28, 47], "uv_size": [14, -14]} + } + }, + { + "origin": [-6, 2, -6], + "size": [12, 3, 12], + "uv": { + "north": {"uv": [80, 17], "uv_size": [12, 3]}, + "east": {"uv": [80, 17], "uv_size": [12, 3]}, + "south": {"uv": [80, 17], "uv_size": [12, 3]}, + "west": {"uv": [80, 17], "uv_size": [12, 3]}, + "up": {"uv": [56, 5], "uv_size": [12, 12]}, + "down": {"uv": [68, 17], "uv_size": [12, -12]} + } + }, + { + "origin": [-7, 5, -7], + "size": [14, 2, 14], + "uv": { + "north": {"uv": [42, 31], "uv_size": [14, 2]}, + "east": {"uv": [42, 31], "uv_size": [14, 2]}, + "south": {"uv": [42, 31], "uv_size": [14, 2]}, + "west": {"uv": [42, 31], "uv_size": [14, 2]}, + "up": {"uv": [14, 17], "uv_size": [14, 14]}, + "down": {"uv": [28, 31], "uv_size": [14, -14]} + } + }, + { + "origin": [-6, 7, -6], + "size": [12, 2, 12], + "inflate": 0.001, + "uv": { + "north": {"uv": [80, 59], "uv_size": [12, 2]}, + "east": {"uv": [80, 59], "uv_size": [12, 2]}, + "south": {"uv": [80, 59], "uv_size": [12, 2]}, + "west": {"uv": [80, 59], "uv_size": [12, 2]}, + "up": {"uv": [56, 47], "uv_size": [12, 12]}, + "down": {"uv": [68, 59], "uv_size": [12, -12]} + } + } + ] + }, + { + "name": "westclip", + "parent": "base_machine", + "pivot": [-7, 4, 0], + "cubes": [ + { + "origin": [-8, 0, -2], + "size": [2, 8, 4], + "uv": { + "north": {"uv": [44, 5], "uv_size": [-2, 8]}, + "east": {"uv": [44, 5], "uv_size": [4, 8]}, + "south": {"uv": [42, 5], "uv_size": [2, 8]}, + "west": {"uv": [6, 21], "uv_size": [4, 8]}, + "up": {"uv": [4, 17], "uv_size": [2, 4]}, + "down": {"uv": [6, 21], "uv_size": [2, -4]} + } + } + ] + }, + { + "name": "eastclip", + "parent": "base_machine", + "pivot": [7, 4, 0], + "cubes": [ + { + "origin": [6, 0, -2], + "size": [2, 8, 4], + "uv": { + "north": {"uv": [42, 5], "uv_size": [2, 8]}, + "east": {"uv": [0, 4], "uv_size": [4, 8]}, + "south": {"uv": [44, 5], "uv_size": [-2, 8]}, + "west": {"uv": [44, 5], "uv_size": [4, 8]}, + "up": {"uv": [4, 0], "uv_size": [2, 4]}, + "down": {"uv": [6, 4], "uv_size": [2, -4]} + } + } + ] + }, + { + "name": "northclip", + "parent": "base_machine", + "pivot": [0, 4, -7], + "cubes": [ + { + "origin": [-2, 0, -8], + "size": [4, 8, 2], + "uv": { + "north": {"uv": [44, 5], "uv_size": [4, 8]}, + "east": {"uv": [42, 5], "uv_size": [2, 8]}, + "south": {"uv": [50, 5], "uv_size": [4, 8]}, + "west": {"uv": [44, 5], "uv_size": [-2, 8]}, + "up": {"uv": [44, 3], "uv_size": [4, 2]}, + "down": {"uv": [48, 5], "uv_size": [4, -2]} + } + } + ] + }, + { + "name": "southclip", + "parent": "base_machine", + "pivot": [0, 4, 7], + "cubes": [ + { + "origin": [-2, 0, 6], + "size": [4, 8, 2], + "uv": { + "north": {"uv": [2, 35], "uv_size": [4, 8]}, + "east": {"uv": [44, 5], "uv_size": [-2, 8]}, + "south": {"uv": [44, 5], "uv_size": [4, 8]}, + "west": {"uv": [42, 5], "uv_size": [2, 8]}, + "up": {"uv": [2, 33], "uv_size": [4, 2]}, + "down": {"uv": [6, 35], "uv_size": [4, -2]} + } + } + ] + }, + { + "name": "upper_part", + "parent": "machine", + "pivot": [0, 0, 0] + }, + { + "name": "bone2", + "parent": "upper_part", + "pivot": [5, 16, 0], + "cubes": [ + { + "origin": [-6, 22, -6], + "size": [12, 2, 12], + "uv": { + "north": {"uv": [42, 45], "uv_size": [12, 2]}, + "east": {"uv": [42, 45], "uv_size": [12, 2]}, + "south": {"uv": [42, 45], "uv_size": [12, 2]}, + "west": {"uv": [42, 45], "uv_size": [12, 2]}, + "up": {"uv": [54, 33], "uv_size": [12, 12]}, + "down": {"uv": [56, 47], "uv_size": [12, 12]} + } + }, + { + "origin": [-7, 24, -7], + "size": [14, 3, 14], + "uv": { + "north": {"uv": [14, 14], "uv_size": [14, 3]}, + "east": {"uv": [14, 14], "uv_size": [14, 3]}, + "south": {"uv": [14, 14], "uv_size": [14, 3]}, + "west": {"uv": [14, 14], "uv_size": [14, 3]}, + "up": {"uv": [14, 0], "uv_size": [14, 14]}, + "down": {"uv": [28, 14], "uv_size": [14, -14]} + } + }, + { + "origin": [-6, 27, -6], + "size": [12, 1, 2], + "uv": { + "north": {"uv": [26, 51], "uv_size": [12, 1]}, + "east": {"uv": [24, 51], "uv_size": [2, 1]}, + "south": {"uv": [40, 51], "uv_size": [12, 1]}, + "west": {"uv": [38, 51], "uv_size": [2, 1]}, + "up": {"uv": [26, 49], "uv_size": [12, 2]}, + "down": {"uv": [38, 51], "uv_size": [12, -2]} + } + }, + { + "origin": [4, 27, -4], + "size": [2, 1, 8], + "uv": { + "north": {"uv": [20, 69], "uv_size": [2, 1]}, + "east": {"uv": [12, 69], "uv_size": [8, 1]}, + "south": {"uv": [30, 69], "uv_size": [2, 1]}, + "west": {"uv": [22, 69], "uv_size": [8, 1]}, + "up": {"uv": [20, 61], "uv_size": [2, 8]}, + "down": {"uv": [22, 69], "uv_size": [2, -8]} + } + }, + { + "origin": [-6, 27, -4], + "size": [2, 1, 8], + "uv": { + "north": {"uv": [8, 66], "uv_size": [2, 1]}, + "east": {"uv": [0, 66], "uv_size": [8, 1]}, + "south": {"uv": [18, 66], "uv_size": [2, 1]}, + "west": {"uv": [10, 66], "uv_size": [8, 1]}, + "up": {"uv": [8, 58], "uv_size": [2, 8]}, + "down": {"uv": [10, 66], "uv_size": [2, -8]} + } + }, + { + "origin": [-6, 27, 4], + "size": [12, 1, 2], + "uv": { + "north": {"uv": [44, 2], "uv_size": [12, 1]}, + "east": {"uv": [42, 2], "uv_size": [2, 1]}, + "south": {"uv": [58, 2], "uv_size": [12, 1]}, + "west": {"uv": [56, 2], "uv_size": [2, 1]}, + "up": {"uv": [44, 0], "uv_size": [12, 2]}, + "down": {"uv": [56, 2], "uv_size": [12, -2]} + } + } + ] + }, + { + "name": "capsule", + "parent": "upper_part", + "pivot": [0, 21, 0], + "rotation": [0, -45, 0], + "cubes": [ + { + "origin": [-3.01005, 10, -3.01005], + "size": [1, 11, 0], + "uv": { + "north": {"uv": [45, 33], "uv_size": [1, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [45, 33], "uv_size": [1, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [48, 33], "uv_size": [1, 0]}, + "down": {"uv": [49, 33], "uv_size": [1, 0]} + } + }, + { + "origin": [-3.01005, 10, 2.01005], + "size": [0, 11, 1], + "uv": { + "north": {"uv": [46, 17], "uv_size": [0, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [44, 17], "uv_size": [0, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [43, 16], "uv_size": [0, 1]}, + "down": {"uv": [43, 17], "uv_size": [0, -1]} + } + }, + { + "origin": [3.01005, 10, -3.01005], + "size": [0, 11, 1], + "uv": { + "north": {"uv": [13, 33], "uv_size": [0, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [14, 33], "uv_size": [0, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [13, 32], "uv_size": [0, 1]}, + "down": {"uv": [13, 33], "uv_size": [0, -1]} + } + }, + { + "origin": [2.01005, 10, -3.01005], + "size": [1, 11, 0], + "uv": { + "north": {"uv": [45, 33], "uv_size": [1, 11]}, + "east": {"uv": [46, 33], "uv_size": [0, 11]}, + "south": {"uv": [45, 33], "uv_size": [1, 11]}, + "west": {"uv": [46, 33], "uv_size": [0, 11]}, + "up": {"uv": [46, 33], "uv_size": [1, 0]}, + "down": {"uv": [47, 33], "uv_size": [1, 0]} + } + }, + { + "origin": [2.01005, 10, 3.01005], + "size": [1, 11, 0], + "uv": { + "north": {"uv": [45, 33], "uv_size": [1, 11]}, + "east": {"uv": [44, 33], "uv_size": [0, 11]}, + "south": {"uv": [45, 33], "uv_size": [1, 11]}, + "west": {"uv": [44, 33], "uv_size": [0, 11]}, + "up": {"uv": [44, 33], "uv_size": [1, 0]}, + "down": {"uv": [45, 33], "uv_size": [1, 0]} + } + }, + { + "origin": [-3.01005, 10, 3.01005], + "size": [1, 11, 0], + "uv": { + "north": {"uv": [45, 33], "uv_size": [1, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [45, 33], "uv_size": [1, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [42, 33], "uv_size": [1, 0]}, + "down": {"uv": [43, 33], "uv_size": [1, 0]} + } + }, + { + "origin": [-3.01005, 10, -3.01005], + "size": [0, 11, 1], + "uv": { + "north": {"uv": [13, 17], "uv_size": [0, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [14, 17], "uv_size": [0, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [13, 16], "uv_size": [0, 1]}, + "down": {"uv": [13, 17], "uv_size": [0, -1]} + } + }, + { + "origin": [3.01005, 10, 2.01005], + "size": [0, 11, 1], + "uv": { + "north": {"uv": [45, 34], "uv_size": [0, 11]}, + "east": {"uv": [45, 33], "uv_size": [1, 11]}, + "south": {"uv": [46, 34], "uv_size": [0, 11]}, + "west": {"uv": [45, 33], "uv_size": [1, 11]}, + "up": {"uv": [45, 33], "uv_size": [0, 1]}, + "down": {"uv": [45, 34], "uv_size": [0, -1]} + } + }, + { + "origin": [-4, 9, -4], + "size": [8, 1, 8], + "uv": { + "north": {"uv": [0, 57], "uv_size": [8, 1]}, + "east": {"uv": [0, 57], "uv_size": [8, 1]}, + "south": {"uv": [0, 57], "uv_size": [8, 1]}, + "west": {"uv": [0, 57], "uv_size": [8, 1]}, + "up": {"uv": [8, 49], "uv_size": [8, 8]}, + "down": {"uv": [16, 57], "uv_size": [8, -8]} + } + }, + { + "origin": [-4, 21, -4], + "size": [8, 1, 8], + "uv": { + "north": {"uv": [0, 57], "uv_size": [8, 1]}, + "east": {"uv": [0, 57], "uv_size": [8, 1]}, + "south": {"uv": [0, 57], "uv_size": [8, 1]}, + "west": {"uv": [0, 57], "uv_size": [8, 1]}, + "up": {"uv": [50, 20], "uv_size": [8, 8]}, + "down": {"uv": [8, 49], "uv_size": [8, 8]} + } + } + ] + }, + { + "name": "beam", + "parent": "capsule", + "pivot": [0, 21, 0], + "cubes": [ + { + "origin": [-2, 10, -2], + "size": [4, 11, 4], + "uv": { + "north": {"uv": [40, 58], "uv_size": [4, 11]}, + "east": {"uv": [40, 58], "uv_size": [4, 11]}, + "south": {"uv": [40, 58], "uv_size": [4, 11]}, + "west": {"uv": [40, 58], "uv_size": [4, 11]}, + "up": {"uv": [32, 54], "uv_size": [4, 4]}, + "down": {"uv": [36, 58], "uv_size": [4, -4]} + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/lang/en_us.json b/src/main/resources/assets/oritech/lang/en_us.json index a9895b52a..2d5c3fe88 100644 --- a/src/main/resources/assets/oritech/lang/en_us.json +++ b/src/main/resources/assets/oritech/lang/en_us.json @@ -10,6 +10,7 @@ "block.oritech.pulverizer_block": "Pulverizer", "block.oritech.grinder_block": "Grinder", "block.oritech.assembler_block": "Assembler", + "block.oritech.powered_furnace_block": "Assembler", "block.oritech.machine_core": "Machine core", "block.oritech.machine_speed_addon": "Speed Addon", "block.oritech.machine_efficiency_addon": "Energy Efficiency Addon", diff --git a/src/main/resources/assets/oritech/models/item/powered_furnace_block.json b/src/main/resources/assets/oritech/models/item/powered_furnace_block.json new file mode 100644 index 000000000..a49bb4dd6 --- /dev/null +++ b/src/main/resources/assets/oritech/models/item/powered_furnace_block.json @@ -0,0 +1,95 @@ +{ + "parent": "builtin/entity", + "texture_size": [ + 96, + 96 + ], + "display": { + "thirdperson_righthand": { + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "thirdperson_lefthand": { + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "firstperson_righthand": { + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "firstperson_lefthand": { + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "ground": { + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.3, + 0.3, + 0.3 + ] + }, + "gui": { + "rotation": [ + 30, + 140, + 0 + ], + "translation": [ + 0, + -2, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "head": { + "translation": [ + 0, + -6.5, + 0 + ] + }, + "fixed": { + "translation": [ + 0, + -4, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/textures/block/models/powered_furnace_block.png b/src/main/resources/assets/oritech/textures/block/models/powered_furnace_block.png new file mode 100644 index 0000000000000000000000000000000000000000..e13aef21d34cb25a1223a297dbca70396d4fa490 GIT binary patch literal 1831 zcmbW2`8OMQ7skH{lF*`NP%TAiM{9|$LyB0ct?iAqX;GvjRjQ4xOl=W#1~o#*RvM*K zuU&#zT3fWHcBv9OMQxRkpw`4P=KT}id(M5HAD*A?dCvLVI2+6jak1lK0041wGgG?* zC;ht!*nu{q?{)$JcqJ3OH*jeqhU^^k)v)8wyCzc{VwWl={B!bRuJl-;ct9?309 z53-Td+emqT#{IYVNP$w&$X)lI^C4bbdH4K^K2OUW7sTjmR&>H?0zIfbtv70Vqo)8a zc<$Eu=ekA6z0QHn0Dt_jUCI3JF8d}-Le0_=OVEtryPg2PKD!<*?XQ;(rU*OYIy=f0)A!(?@Z8~=c7=Y1i=$W#yXv|uUAsR6kl(+ z!VV4mq{J<{Nyl;@g7k@xarQ9=jN4G-@ZDB+&?uTMBJs6tt(?lUzQox0%)}P(tdq&0 zr(ECAov$C(-Ib=5Bb5{3vsbu_x~zlnrzCVZsryHfL0iIXjx5BL#S*kM??b@$D%!@A zPy(&05&|R!88e(cOdWvc?<_qKmrun?DbLTPSq95E&LE4^3QZce2)s~r0Pmy&(tH8% zhB14L#W7h%|K*yRe27An0|wq7 zS*GNm5zLI21gfp^31c~vD;cDyfjM*QZy;yt$Q8f}LKiiCuM%?|o2b-jc*}^J_wH6{ zTDk}^cci6lYwo|fXa_GSJ>iMnQtz%{NFAwC%3KL#{cU?j;ySbm`)FYAC2hJ1OLB}9 z!p$;a0Qb&`t`XSFY?U4H-XW(bRPYptd3OrqCtRwDgv@2 z{N8{0>FiiW?Km4joNY``)nGIQkDc<}Gh|}P-*+uJdU5I(uK1J2_k$o$HXDiqAh{pr z`&)U3W6#X`8O|wxOWOa;iAW}uMZ8(hdPPY`(oYzlozdwu_a~L1+{UgzajQMKSV4&M z0;2cc*Bi@4fj1s?Yla65S`ARjq`CR-Cb0n+T#o3;OTKq*2nDu$X}&Z+By6R~gqxvY zMjhvY9r7{IeQD?y{`*%MBAT>f|5*>2kt#aUWuNa1UxNEe92WV^lYLrFjCv}ne=^tY z_jTx+b1oIPurF~z&b0l9U=uUi!ePT=-o^QE1RN~-RE;f1ii%>Y2T+t3S+-94_uFmC zMoCF58GJY?t229uw=J%i@wU{P-%(RKU3x1?qx+X&B244gpUdj`ZghD@JE;s zu3lHH1gi8Ug!V{K^^qf|P3F%Dv!fNCG80b>Ml04ods*4r0U4VcT42_3Hj{P6Djw6| znA~!a_teRhzJr82cfbf6eFK?oVPZsnPt`I00IlB))n-bpc(b@!6m2!5W}kj&3r0#= z8I+~{>HvlNE!0$|Z)2QLO$QVk&5Vq$=4R(^5yqRn77wsfq7Qn#12qI2RQMF3dO6(V z(*Uu6*MHivwj_M!I+8e25dqpp4jm0CA)G#;Yn?gk$s#Al9R2c8G8X9~N~7!{_N5yM zqx)4nB@r}{pxJs}ShDe&5rf_m7Cb@R!!_0?_A;ipTYhy-KOt+!B6H<&<{Xs5i%_BD z55;oN%VC$_zkOtRd>S&j7@DZCB2uYn#JWOhAdh~#ya`hRMws4ENJ497e`9J5csqa6q1iKt7CNb~e0Rr=D K7*nbVF6tlejDh0- literal 0 HcmV?d00001