diff --git a/src/generated/resources/assets/create/blockstates/mechanical_saw.json b/src/generated/resources/assets/create/blockstates/mechanical_saw.json index 8dc2adc8f..bad1bc6d7 100644 --- a/src/generated/resources/assets/create/blockstates/mechanical_saw.json +++ b/src/generated/resources/assets/create/blockstates/mechanical_saw.json @@ -1,94 +1,48 @@ { "variants": { - "axis_along_first=false,facing=down,running=false": { - "model": "create:block/mechanical_saw/vertical_inactive", - "x": 180 - }, - "axis_along_first=true,facing=down,running=false": { - "model": "create:block/mechanical_saw/vertical_inactive", - "x": 180, - "y": 90 - }, - "axis_along_first=false,facing=up,running=false": { - "model": "create:block/mechanical_saw/vertical_inactive" - }, - "axis_along_first=true,facing=up,running=false": { - "model": "create:block/mechanical_saw/vertical_inactive", - "y": 90 - }, - "axis_along_first=false,facing=north,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 180 - }, - "axis_along_first=true,facing=north,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 180 - }, - "axis_along_first=false,facing=south,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive" - }, - "axis_along_first=true,facing=south,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive" - }, - "axis_along_first=false,facing=west,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 90 - }, - "axis_along_first=true,facing=west,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 90 - }, - "axis_along_first=false,facing=east,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 270 - }, - "axis_along_first=true,facing=east,running=false": { - "model": "create:block/mechanical_saw/horizontal_inactive", - "y": 270 - }, - "axis_along_first=false,facing=down,running=true": { + "axis_along_first=false,facing=down": { "model": "create:block/mechanical_saw/vertical", "x": 180 }, - "axis_along_first=true,facing=down,running=true": { + "axis_along_first=true,facing=down": { "model": "create:block/mechanical_saw/vertical", "x": 180, "y": 90 }, - "axis_along_first=false,facing=up,running=true": { + "axis_along_first=false,facing=up": { "model": "create:block/mechanical_saw/vertical" }, - "axis_along_first=true,facing=up,running=true": { + "axis_along_first=true,facing=up": { "model": "create:block/mechanical_saw/vertical", "y": 90 }, - "axis_along_first=false,facing=north,running=true": { + "axis_along_first=false,facing=north": { "model": "create:block/mechanical_saw/horizontal", "y": 180 }, - "axis_along_first=true,facing=north,running=true": { + "axis_along_first=true,facing=north": { "model": "create:block/mechanical_saw/horizontal", "y": 180 }, - "axis_along_first=false,facing=south,running=true": { + "axis_along_first=false,facing=south": { "model": "create:block/mechanical_saw/horizontal" }, - "axis_along_first=true,facing=south,running=true": { + "axis_along_first=true,facing=south": { "model": "create:block/mechanical_saw/horizontal" }, - "axis_along_first=false,facing=west,running=true": { + "axis_along_first=false,facing=west": { "model": "create:block/mechanical_saw/horizontal", "y": 90 }, - "axis_along_first=true,facing=west,running=true": { + "axis_along_first=true,facing=west": { "model": "create:block/mechanical_saw/horizontal", "y": 90 }, - "axis_along_first=false,facing=east,running=true": { + "axis_along_first=false,facing=east": { "model": "create:block/mechanical_saw/horizontal", "y": 270 }, - "axis_along_first=true,facing=east,running=true": { + "axis_along_first=true,facing=east": { "model": "create:block/mechanical_saw/horizontal", "y": 270 } diff --git a/src/generated/resources/assets/create/models/item/mechanical_saw.json b/src/generated/resources/assets/create/models/item/mechanical_saw.json index 1f3cf51dd..2811abfa3 100644 --- a/src/generated/resources/assets/create/models/item/mechanical_saw.json +++ b/src/generated/resources/assets/create/models/item/mechanical_saw.json @@ -1,3 +1,3 @@ { - "parent": "create:block/mechanical_saw/horizontal" + "parent": "create:block/mechanical_saw/item" } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 9bbae39ee..a04c4a9eb 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -45,7 +45,14 @@ public class AllBlockPartials { MECHANICAL_MIXER_HEAD = get("mechanical_mixer/head"), MECHANICAL_CRAFTER_LID = get("mechanical_crafter/lid"), MECHANICAL_CRAFTER_ARROW = get("mechanical_crafter/arrow"), MECHANICAL_CRAFTER_BELT_FRAME = get("mechanical_crafter/belt"), - MECHANICAL_CRAFTER_BELT = get("mechanical_crafter/belt_animated"), GAUGE_DIAL = get("gauge/dial"), + MECHANICAL_CRAFTER_BELT = get("mechanical_crafter/belt_animated"), + SAW_BLADE_HORIZONTAL_ACTIVE = get("mechanical_saw/blade_horizontal_active"), + SAW_BLADE_HORIZONTAL_INACTIVE = get("mechanical_saw/blade_horizontal_inactive"), + SAW_BLADE_HORIZONTAL_REVERSED = get("mechanical_saw/blade_horizontal_reversed"), + SAW_BLADE_VERTICAL_ACTIVE = get("mechanical_saw/blade_vertical_active"), + SAW_BLADE_VERTICAL_INACTIVE = get("mechanical_saw/blade_vertical_inactive"), + SAW_BLADE_VERTICAL_REVERSED = get("mechanical_saw/blade_vertical_reversed"), + GAUGE_DIAL = get("gauge/dial"), GAUGE_INDICATOR = get("gauge/indicator"), GAUGE_HEAD_SPEED = get("gauge/speedometer/head"), GAUGE_HEAD_STRESS = get("gauge/stressometer/head"), BEARING_TOP = get("bearing/top"), DRILL_HEAD = get("mechanical_drill/head"), HARVESTER_BLADE = get("mechanical_harvester/blade"), diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java index be4b7a1f3..12d0f3469 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSaw.java @@ -1,6 +1,7 @@ package com.simibubi.create.compat.jei.category.animations; import com.mojang.blaze3d.systems.RenderSystem; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.saw.SawBlock; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -29,12 +30,16 @@ public class AnimatedSaw extends AnimatedKinetics { .render(); GuiGameElement.of(AllBlocks.MECHANICAL_SAW.getDefaultState() - .with(SawBlock.FACING, Direction.UP) - .with(SawBlock.RUNNING, true)) + .with(SawBlock.FACING, Direction.UP)) .rotateBlock(0, 0, 0) .scale(scale) .render(); + GuiGameElement.of(AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE) + .rotateBlock(0, -90, -90) + .scale(scale) + .render(); + RenderSystem.popMatrix(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java index 39e060e39..7f0e1a778 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java @@ -1,6 +1,8 @@ package com.simibubi.create.content.contraptions.components.actors; +import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.components.saw.SawBlock; +import com.simibubi.create.content.contraptions.components.saw.SawRenderer; import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.utility.BlockHelper; @@ -9,6 +11,7 @@ import com.simibubi.create.foundation.utility.TreeCutter.Tree; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.tags.BlockTags; @@ -16,6 +19,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.items.ItemHandlerHelper; public class SawMovementBehaviour extends BlockBreakingMovementBehaviour { @@ -62,6 +67,13 @@ public class SawMovementBehaviour extends BlockBreakingMovementBehaviour { world.addEntity(entity); } + @Override + @OnlyIn(value = Dist.CLIENT) + public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal, + IRenderTypeBuffer buffer) { + SawRenderer.renderInContraption(context, ms, msLocal, buffer); + } + @Override protected DamageSource getDamageSource() { return SawBlock.damageSourceSaw; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java index 56bbebc51..c7dade697 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java @@ -35,13 +35,10 @@ import net.minecraft.world.World; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class SawBlock extends DirectionalAxisKineticBlock implements ITE { - - public static final BooleanProperty RUNNING = BooleanProperty.create("running"); public static DamageSource damageSourceSaw = new DamageSource("create.mechanical_saw").setDamageBypassesArmor(); public SawBlock(Properties properties) { super(properties); - setDefaultState(getDefaultState().with(RUNNING, false)); } @Override @@ -53,12 +50,6 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE builder) { - builder.add(RUNNING); - super.fillStateContainer(builder); - } - @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return AllTileEntities.SAW.create(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawGenerator.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawGenerator.java index d369bec96..3883a3787 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawGenerator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawGenerator.java @@ -33,10 +33,9 @@ public class SawGenerator extends SpecialBlockStateGen { String orientation = state.get(SawBlock.FACING) .getAxis() .isVertical() ? "vertical" : "horizontal"; - String active = state.get(SawBlock.RUNNING) ? "" : "_inactive"; return prov.models() - .getExistingFile(prov.modLoc(path + orientation + active)); + .getExistingFile(prov.modLoc(path + orientation)); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java index daf43ee93..e467d3c2e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java @@ -7,9 +7,10 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer; import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; -import com.simibubi.create.foundation.utility.SuperByteBuffer; +import com.simibubi.create.foundation.utility.*; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; @@ -34,11 +35,46 @@ public class SawRenderer extends SafeTileEntityRenderer { @Override protected void renderSafe(SawTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + renderBlade(te, ms, buffer, light); renderItems(te, partialTicks, ms, buffer, light, overlay); FilteringRenderer.renderOnTileEntity(te, partialTicks, ms, buffer, light, overlay); renderShaft(te, ms, buffer, light, overlay); } + protected void renderBlade(SawTileEntity te, MatrixStack ms, IRenderTypeBuffer buffer, int light){ + BlockState blockState = te.getBlockState(); + SuperByteBuffer superBuffer; + AllBlockPartials partial; + float speed = te.getSpeed(); + + ms.push(); + + if(SawBlock.isHorizontal(blockState)) { + if(speed > 0) { + partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_ACTIVE; + } else if(speed < 0) { + partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_REVERSED; + } else { + partial = AllBlockPartials.SAW_BLADE_HORIZONTAL_INACTIVE; + } + } else { + if(te.getSpeed() > 0) { + partial = AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE; + } else if(speed < 0) { + partial = AllBlockPartials.SAW_BLADE_VERTICAL_REVERSED; + } else { + partial = AllBlockPartials.SAW_BLADE_VERTICAL_INACTIVE; + } + + if(!blockState.get(SawBlock.AXIS_ALONG_FIRST_COORDINATE)) + MatrixStacker.of(ms).centre().rotateY(90).unCentre(); + } + superBuffer = partial.renderOnDirectional(blockState); + superBuffer.light(light).renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped())); + + ms.pop(); + } + protected void renderShaft(SawTileEntity te, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { KineticTileEntityRenderer.renderRotatingBuffer(te, getRotatedModel(te), ms, buffer.getBuffer(RenderType.getSolid()), light); @@ -96,4 +132,33 @@ public class SawRenderer extends SafeTileEntityRenderer { return KineticTileEntityRenderer.shaft(KineticTileEntityRenderer.getRotationAxisOf(te)); } + public static void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal, + IRenderTypeBuffer buffer) { + MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal }; + BlockState state = context.state; + SuperByteBuffer superBuffer; + Direction facing = state.get(SawBlock.FACING); + + if(SawBlock.isHorizontal(state)) { + superBuffer = AllBlockPartials.SAW_BLADE_HORIZONTAL_ACTIVE.renderOn(state); + } else { + superBuffer = AllBlockPartials.SAW_BLADE_VERTICAL_INACTIVE.renderOn(state); + } + + for (MatrixStack m : matrixStacks) { + MatrixStacker.of(m) + .centre() + .rotateY(AngleHelper.horizontalAngle(facing)) + .rotateX(AngleHelper.verticalAngle(facing)); + if(!SawBlock.isHorizontal(state)) + MatrixStacker.of(m).rotateZ(state.get(SawBlock.AXIS_ALONG_FIRST_COORDINATE) ? 0 : 90); + MatrixStacker.of(m).unCentre(); + } + + superBuffer + .light(msLocal.peek() + .getModel()) + .renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped())); + } + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java index e824c1ebc..70b3cce8a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java @@ -1,7 +1,5 @@ package com.simibubi.create.content.contraptions.components.saw; -import static com.simibubi.create.content.contraptions.components.saw.SawBlock.RUNNING; - import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -86,15 +84,6 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity { return false; } - @Override - public void onSpeedChanged(float prevSpeed) { - super.onSpeedChanged(prevSpeed); - boolean shouldRun = Math.abs(getSpeed()) > 1 / 64f; - boolean running = getBlockState().get(RUNNING); - if (shouldRun != running && !destroyed) - world.setBlockState(pos, getBlockState().with(RUNNING, shouldRun), 2 | 16); - } - @Override public void write(CompoundNBT compound, boolean clientPacket) { compound.put("Inventory", inventory.serializeNBT()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index fadd0ef75..4c1169d55 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -394,8 +394,6 @@ public abstract class Contraption { protected Pair capture(World world, BlockPos pos) { BlockState blockstate = world.getBlockState(pos); - if (AllBlocks.MECHANICAL_SAW.has(blockstate)) - blockstate = blockstate.with(SawBlock.RUNNING, true); if (blockstate.getBlock() instanceof ChestBlock) blockstate = blockstate.with(ChestBlock.TYPE, ChestType.SINGLE); if (AllBlocks.ADJUSTABLE_CRATE.has(blockstate)) @@ -657,9 +655,6 @@ public abstract class Contraption { state = state.updatePostPlacement(face, world.getBlockState(targetPos.offset(face)), world, targetPos, targetPos.offset(face)); - if (AllBlocks.MECHANICAL_SAW.has(state)) - state = state.with(SawBlock.RUNNING, false); - BlockState blockState = world.getBlockState(targetPos); if (blockState.getBlockHardness(world, targetPos) == -1 || (state.getCollisionShape(world, targetPos) .isEmpty() diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java index 451537bee..5e139d946 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java @@ -13,6 +13,7 @@ import com.simibubi.create.content.contraptions.components.crafter.MechanicalCra import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock; import com.simibubi.create.content.contraptions.components.saw.SawBlock; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; @@ -217,8 +218,8 @@ public abstract class ArmInteractionPoint { @Override boolean isValid(IBlockReader reader, BlockPos pos, BlockState state) { - return AllBlocks.MECHANICAL_SAW.has(state) && state.get(SawBlock.RUNNING) - && state.get(SawBlock.FACING) == Direction.UP; + return AllBlocks.MECHANICAL_SAW.has(state) && state.get(SawBlock.FACING) == Direction.UP + && ((KineticTileEntity)reader.getTileEntity(pos)).getSpeed() != 0; } } diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_active.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_active.json new file mode 100644 index 000000000..bcd0eedb6 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_active.json @@ -0,0 +1,19 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "stonecutter_saw": "minecraft:block/stonecutter_saw", + "stonecutter_saw_reversed" : "create:block/saw_reversed" + }, + "parent": "create:block/block", + "elements": [ + { + "name": "Blade", + "from": [ 1, 8, 11 ], + "to": [ 15, 8.062, 18 ], + "faces": { + "up": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ], "rotation": 180 }, + "down": { "texture": "#stonecutter_saw_reversed", "uv": [ 1, 9, 15, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_inactive.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_inactive.json new file mode 100644 index 000000000..d51cbecbe --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_inactive.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/mechanical_saw/blade_horizontal_active", + "textures": { + "stonecutter_saw": "create:block/static_saw", + "stonecutter_saw_reversed": "create:block/static_saw" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_reversed.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_reversed.json new file mode 100644 index 000000000..02382bef0 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_horizontal_reversed.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/mechanical_saw/blade_horizontal_active", + "textures": { + "stonecutter_saw": "create:block/saw_reversed", + "stonecutter_saw": "minecraft:block/stonecutter_saw" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_active.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_active.json new file mode 100644 index 000000000..b540ed652 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_active.json @@ -0,0 +1,18 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "stonecutter_saw": "minecraft:block/stonecutter_saw", + "stonecutter_saw_reversed" : "create:block/saw_reversed" + }, + "elements": [ + { + "name": "Saw", + "from": [ 0, 8, 11 ], + "to": [ 16, 8, 19 ], + "faces": { + "up": { "texture": "#stonecutter_saw", "uv": [ 0, 8, 16, 16 ], "rotation": 180 }, + "down": { "texture": "#stonecutter_saw_reversed", "uv": [ 0, 8, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_inactive.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_inactive.json new file mode 100644 index 000000000..627943027 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_inactive.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/mechanical_saw/blade_vertical_active", + "textures": { + "stonecutter_saw": "create:block/static_saw", + "stonecutter_saw_reversed": "create:block/static_saw" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_reversed.json b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_reversed.json new file mode 100644 index 000000000..56a353a4f --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/blade_vertical_reversed.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/mechanical_saw/blade_vertical_active", + "textures": { + "stonecutter_saw": "create:block/saw_reversed", + "stonecutter_saw_reversed": "minecraft:block/stonecutter_saw" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/horizontal.json b/src/main/resources/assets/create/models/block/mechanical_saw/horizontal.json index 7750da4cb..a21d7706b 100644 --- a/src/main/resources/assets/create/models/block/mechanical_saw/horizontal.json +++ b/src/main/resources/assets/create/models/block/mechanical_saw/horizontal.json @@ -5,7 +5,6 @@ "slit": "create:block/mechanical_saw_top", "gearbox_top": "create:block/gearbox_top", "encased_belt": "create:block/encased_belt", - "stonecutter_saw": "minecraft:block/stonecutter_saw", "gearbox": "create:block/gearbox", "andesite_casing_short": "create:block/andesite_casing_short" }, @@ -66,15 +65,6 @@ "south": { "texture": "#slit", "uv": [ 1, 7, 15, 9 ] } } }, - { - "name": "Blade", - "from": [ 1, 8, 11 ], - "to": [ 15, 8.062, 18 ], - "faces": { - "up": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ], "rotation": 180 }, - "down": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ] } - } - }, { "name": "Back", "from": [ 14, 2, 0 ], diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/horizontal_inactive.json b/src/main/resources/assets/create/models/block/mechanical_saw/horizontal_inactive.json deleted file mode 100644 index d776f1cd9..000000000 --- a/src/main/resources/assets/create/models/block/mechanical_saw/horizontal_inactive.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "create:block/mechanical_saw/horizontal", - "textures": { - "stonecutter_saw": "create:block/static_saw" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/item.json b/src/main/resources/assets/create/models/block/mechanical_saw/item.json new file mode 100644 index 000000000..79d79bb00 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_saw/item.json @@ -0,0 +1,98 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "create:block/gearbox_top", + "slit": "create:block/mechanical_saw_top", + "stonecutter_saw": "create:block/static_saw", + "gearbox_top": "create:block/gearbox_top", + "encased_belt": "create:block/encased_belt", + "gearbox": "create:block/gearbox", + "andesite_casing_short": "create:block/andesite_casing_short" + }, + "parent": "create:block/block", + "elements": [ + { + "name": "Bottom", + "from": [ 0, 0, 0 ], + "to": [ 16, 2, 12 ], + "faces": { + "north": { "texture": "#andesite_casing_short", "uv": [ 0, 14, 16, 16 ] }, + "east": { "texture": "#andesite_casing_short", "uv": [ 4, 14, 16, 16 ] }, + "south": { "texture": "#encased_belt", "uv": [ 0, 14, 16, 16 ] }, + "west": { "texture": "#andesite_casing_short", "uv": [ 0, 14, 12, 16 ] }, + "up": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 16, 16 ] } + } + }, + { + "name": "Top", + "from": [ 0, 14, 0 ], + "to": [ 16, 16, 12 ], + "faces": { + "north": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 16, 6 ] }, + "east": { "texture": "#andesite_casing_short", "uv": [ 4, 4, 16, 6 ] }, + "south": { "texture": "#encased_belt", "uv": [ 0, 0, 16, 2 ] }, + "west": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 12, 6 ] }, + "up": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#andesite_casing_short", "uv": [ 0, 4, 16, 16 ] } + } + }, + { + "name": "Back", + "from": [ 0, 2, 0 ], + "to": [ 2, 14, 2 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] } + } + }, + { + "name": "Inner", + "from": [ 0, 2, 2 ], + "to": [ 16, 14, 11 ], + "faces": { + "east": { "texture": "#andesite_casing_short", "uv": [ 2, 6, 14, 15 ], "rotation": 90 }, + "south": { "texture": "#gearbox_top", "uv": [ 0, 2, 16, 14 ] }, + "west": { "texture": "#andesite_casing_short", "uv": [ 2, 6, 14, 15 ], "rotation": 270 } + } + }, + { + "name": "SawSlit", + "from": [ 1, 7, 11.062 ], + "to": [ 15, 9, 11.062 ], + "faces": { + "south": { "texture": "#slit", "uv": [ 1, 7, 15, 9 ] } + } + }, + { + "name": "Blade", + "from": [ 1, 8, 11 ], + "to": [ 15, 8.062, 18 ], + "faces": { + "up": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ], "rotation": 180 }, + "down": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ] } + } + }, + { + "name": "Back", + "from": [ 14, 2, 0 ], + "to": [ 16, 14, 2 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] } + } + }, + { + "name": "Back", + "from": [ 2, 2, 1 ], + "to": [ 14, 14, 2 ], + "faces": { + "north": { "texture": "#gearbox", "uv": [ 2, 2, 14, 14 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/vertical.json b/src/main/resources/assets/create/models/block/mechanical_saw/vertical.json index 931155c43..f63bcea80 100644 --- a/src/main/resources/assets/create/models/block/mechanical_saw/vertical.json +++ b/src/main/resources/assets/create/models/block/mechanical_saw/vertical.json @@ -3,7 +3,6 @@ "textures": { "gearbox_top": "create:block/gearbox_top", "gearbox": "create:block/gearbox", - "stonecutter_saw": "minecraft:block/stonecutter_saw", "andesite_casing_short": "create:block/andesite_casing_short", "mechanical_saw_top": "create:block/mechanical_saw_top", "particle": "create:block/mechanical_saw_top" @@ -57,15 +56,6 @@ "up": { "texture": "#gearbox_top", "uv": [ 0, 14, 16, 16 ], "rotation": 270 } } }, - { - "name": "Saw", - "from": [ 0, 11, 8 ], - "to": [ 16, 19, 8 ], - "faces": { - "north": { "texture": "#stonecutter_saw", "uv": [ 0, 8, 16, 16 ] }, - "south": { "texture": "#stonecutter_saw", "uv": [ 0, 8, 16, 16 ] } - } - }, { "name": "Top", "from": [ 0, 12, 2 ], diff --git a/src/main/resources/assets/create/models/block/mechanical_saw/vertical_inactive.json b/src/main/resources/assets/create/models/block/mechanical_saw/vertical_inactive.json deleted file mode 100644 index 2260d2c6c..000000000 --- a/src/main/resources/assets/create/models/block/mechanical_saw/vertical_inactive.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "create:block/mechanical_saw/vertical", - "textures": { - "stonecutter_saw": "create:block/static_saw" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/saw_reversed.png b/src/main/resources/assets/create/textures/block/saw_reversed.png new file mode 100644 index 000000000..eef262f2a Binary files /dev/null and b/src/main/resources/assets/create/textures/block/saw_reversed.png differ diff --git a/src/main/resources/assets/create/textures/block/saw_reversed.png.mcmeta b/src/main/resources/assets/create/textures/block/saw_reversed.png.mcmeta new file mode 100644 index 000000000..a328ca58d --- /dev/null +++ b/src/main/resources/assets/create/textures/block/saw_reversed.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation": { + "interpolate": false, + "frametime": 1 + } +}