Overhaul mechanical saw rendering

- Saws no longer use "RUNNING" blockstate
- Sawblade animates based on input speed
- Saws properly stop animating when inactive
This commit is contained in:
Colman Davenport 2020-09-11 23:50:34 -04:00
parent afa94c3e77
commit a28b6bbdc3
24 changed files with 279 additions and 124 deletions

View File

@ -1,94 +1,48 @@
{ {
"variants": { "variants": {
"axis_along_first=false,facing=down,running=false": { "axis_along_first=false,facing=down": {
"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": {
"model": "create:block/mechanical_saw/vertical", "model": "create:block/mechanical_saw/vertical",
"x": 180 "x": 180
}, },
"axis_along_first=true,facing=down,running=true": { "axis_along_first=true,facing=down": {
"model": "create:block/mechanical_saw/vertical", "model": "create:block/mechanical_saw/vertical",
"x": 180, "x": 180,
"y": 90 "y": 90
}, },
"axis_along_first=false,facing=up,running=true": { "axis_along_first=false,facing=up": {
"model": "create:block/mechanical_saw/vertical" "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", "model": "create:block/mechanical_saw/vertical",
"y": 90 "y": 90
}, },
"axis_along_first=false,facing=north,running=true": { "axis_along_first=false,facing=north": {
"model": "create:block/mechanical_saw/horizontal", "model": "create:block/mechanical_saw/horizontal",
"y": 180 "y": 180
}, },
"axis_along_first=true,facing=north,running=true": { "axis_along_first=true,facing=north": {
"model": "create:block/mechanical_saw/horizontal", "model": "create:block/mechanical_saw/horizontal",
"y": 180 "y": 180
}, },
"axis_along_first=false,facing=south,running=true": { "axis_along_first=false,facing=south": {
"model": "create:block/mechanical_saw/horizontal" "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" "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", "model": "create:block/mechanical_saw/horizontal",
"y": 90 "y": 90
}, },
"axis_along_first=true,facing=west,running=true": { "axis_along_first=true,facing=west": {
"model": "create:block/mechanical_saw/horizontal", "model": "create:block/mechanical_saw/horizontal",
"y": 90 "y": 90
}, },
"axis_along_first=false,facing=east,running=true": { "axis_along_first=false,facing=east": {
"model": "create:block/mechanical_saw/horizontal", "model": "create:block/mechanical_saw/horizontal",
"y": 270 "y": 270
}, },
"axis_along_first=true,facing=east,running=true": { "axis_along_first=true,facing=east": {
"model": "create:block/mechanical_saw/horizontal", "model": "create:block/mechanical_saw/horizontal",
"y": 270 "y": 270
} }

View File

@ -1,3 +1,3 @@
{ {
"parent": "create:block/mechanical_saw/horizontal" "parent": "create:block/mechanical_saw/item"
} }

View File

@ -45,7 +45,14 @@ public class AllBlockPartials {
MECHANICAL_MIXER_HEAD = get("mechanical_mixer/head"), MECHANICAL_CRAFTER_LID = get("mechanical_crafter/lid"), MECHANICAL_MIXER_HEAD = get("mechanical_mixer/head"), MECHANICAL_CRAFTER_LID = get("mechanical_crafter/lid"),
MECHANICAL_CRAFTER_ARROW = get("mechanical_crafter/arrow"), MECHANICAL_CRAFTER_ARROW = get("mechanical_crafter/arrow"),
MECHANICAL_CRAFTER_BELT_FRAME = get("mechanical_crafter/belt"), 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_INDICATOR = get("gauge/indicator"), GAUGE_HEAD_SPEED = get("gauge/speedometer/head"),
GAUGE_HEAD_STRESS = get("gauge/stressometer/head"), BEARING_TOP = get("bearing/top"), GAUGE_HEAD_STRESS = get("gauge/stressometer/head"), BEARING_TOP = get("bearing/top"),
DRILL_HEAD = get("mechanical_drill/head"), HARVESTER_BLADE = get("mechanical_harvester/blade"), DRILL_HEAD = get("mechanical_drill/head"), HARVESTER_BLADE = get("mechanical_harvester/blade"),

View File

@ -1,6 +1,7 @@
package com.simibubi.create.compat.jei.category.animations; package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.components.saw.SawBlock; import com.simibubi.create.content.contraptions.components.saw.SawBlock;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
@ -29,12 +30,16 @@ public class AnimatedSaw extends AnimatedKinetics {
.render(); .render();
GuiGameElement.of(AllBlocks.MECHANICAL_SAW.getDefaultState() GuiGameElement.of(AllBlocks.MECHANICAL_SAW.getDefaultState()
.with(SawBlock.FACING, Direction.UP) .with(SawBlock.FACING, Direction.UP))
.with(SawBlock.RUNNING, true))
.rotateBlock(0, 0, 0) .rotateBlock(0, 0, 0)
.scale(scale) .scale(scale)
.render(); .render();
GuiGameElement.of(AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE)
.rotateBlock(0, -90, -90)
.scale(scale)
.render();
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }

View File

@ -1,6 +1,8 @@
package com.simibubi.create.content.contraptions.components.actors; 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.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.saw.SawTileEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.utility.BlockHelper; 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 com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tags.BlockTags; 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.BlockPos;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemHandlerHelper;
public class SawMovementBehaviour extends BlockBreakingMovementBehaviour { public class SawMovementBehaviour extends BlockBreakingMovementBehaviour {
@ -62,6 +67,13 @@ public class SawMovementBehaviour extends BlockBreakingMovementBehaviour {
world.addEntity(entity); 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 @Override
protected DamageSource getDamageSource() { protected DamageSource getDamageSource() {
return SawBlock.damageSourceSaw; return SawBlock.damageSourceSaw;

View File

@ -35,13 +35,10 @@ import net.minecraft.world.World;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTileEntity> { public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTileEntity> {
public static final BooleanProperty RUNNING = BooleanProperty.create("running");
public static DamageSource damageSourceSaw = new DamageSource("create.mechanical_saw").setDamageBypassesArmor(); public static DamageSource damageSourceSaw = new DamageSource("create.mechanical_saw").setDamageBypassesArmor();
public SawBlock(Properties properties) { public SawBlock(Properties properties) {
super(properties); super(properties);
setDefaultState(getDefaultState().with(RUNNING, false));
} }
@Override @Override
@ -53,12 +50,6 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTile
return stateForPlacement.with(AXIS_ALONG_FIRST_COORDINATE, facing.getAxis() == Axis.X); return stateForPlacement.with(AXIS_ALONG_FIRST_COORDINATE, facing.getAxis() == Axis.X);
} }
@Override
protected void fillStateContainer(Builder<Block, BlockState> builder) {
builder.add(RUNNING);
super.fillStateContainer(builder);
}
@Override @Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) { public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.SAW.create(); return AllTileEntities.SAW.create();

View File

@ -33,10 +33,9 @@ public class SawGenerator extends SpecialBlockStateGen {
String orientation = state.get(SawBlock.FACING) String orientation = state.get(SawBlock.FACING)
.getAxis() .getAxis()
.isVertical() ? "vertical" : "horizontal"; .isVertical() ? "vertical" : "horizontal";
String active = state.get(SawBlock.RUNNING) ? "" : "_inactive";
return prov.models() return prov.models()
.getExistingFile(prov.modLoc(path + orientation + active)); .getExistingFile(prov.modLoc(path + orientation));
} }
} }

View File

@ -7,9 +7,10 @@ import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.CreateClient; import com.simibubi.create.CreateClient;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; 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.behaviour.filtering.FilteringRenderer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; 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.block.BlockState;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -34,11 +35,46 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
@Override @Override
protected void renderSafe(SawTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, protected void renderSafe(SawTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light,
int overlay) { int overlay) {
renderBlade(te, ms, buffer, light);
renderItems(te, partialTicks, ms, buffer, light, overlay); renderItems(te, partialTicks, ms, buffer, light, overlay);
FilteringRenderer.renderOnTileEntity(te, partialTicks, ms, buffer, light, overlay); FilteringRenderer.renderOnTileEntity(te, partialTicks, ms, buffer, light, overlay);
renderShaft(te, 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, protected void renderShaft(SawTileEntity te, MatrixStack ms, IRenderTypeBuffer buffer, int light,
int overlay) { int overlay) {
KineticTileEntityRenderer.renderRotatingBuffer(te, getRotatedModel(te), ms, buffer.getBuffer(RenderType.getSolid()), light); KineticTileEntityRenderer.renderRotatingBuffer(te, getRotatedModel(te), ms, buffer.getBuffer(RenderType.getSolid()), light);
@ -96,4 +132,33 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
return KineticTileEntityRenderer.shaft(KineticTileEntityRenderer.getRotationAxisOf(te)); 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()));
}
} }

View File

@ -1,7 +1,5 @@
package com.simibubi.create.content.contraptions.components.saw; 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.ArrayList;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
@ -86,15 +84,6 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
return false; 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 @Override
public void write(CompoundNBT compound, boolean clientPacket) { public void write(CompoundNBT compound, boolean clientPacket) {
compound.put("Inventory", inventory.serializeNBT()); compound.put("Inventory", inventory.serializeNBT());

View File

@ -394,8 +394,6 @@ public abstract class Contraption {
protected Pair<BlockInfo, TileEntity> capture(World world, BlockPos pos) { protected Pair<BlockInfo, TileEntity> capture(World world, BlockPos pos) {
BlockState blockstate = world.getBlockState(pos); BlockState blockstate = world.getBlockState(pos);
if (AllBlocks.MECHANICAL_SAW.has(blockstate))
blockstate = blockstate.with(SawBlock.RUNNING, true);
if (blockstate.getBlock() instanceof ChestBlock) if (blockstate.getBlock() instanceof ChestBlock)
blockstate = blockstate.with(ChestBlock.TYPE, ChestType.SINGLE); blockstate = blockstate.with(ChestBlock.TYPE, ChestType.SINGLE);
if (AllBlocks.ADJUSTABLE_CRATE.has(blockstate)) if (AllBlocks.ADJUSTABLE_CRATE.has(blockstate))
@ -657,9 +655,6 @@ public abstract class Contraption {
state = state.updatePostPlacement(face, world.getBlockState(targetPos.offset(face)), world, state = state.updatePostPlacement(face, world.getBlockState(targetPos.offset(face)), world,
targetPos, targetPos.offset(face)); targetPos, targetPos.offset(face));
if (AllBlocks.MECHANICAL_SAW.has(state))
state = state.with(SawBlock.RUNNING, false);
BlockState blockState = world.getBlockState(targetPos); BlockState blockState = world.getBlockState(targetPos);
if (blockState.getBlockHardness(world, targetPos) == -1 || (state.getCollisionShape(world, targetPos) if (blockState.getBlockHardness(world, targetPos) == -1 || (state.getCollisionShape(world, targetPos)
.isEmpty() .isEmpty()

View File

@ -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.deployer.DeployerBlock;
import com.simibubi.create.content.contraptions.components.saw.SawBlock; import com.simibubi.create.content.contraptions.components.saw.SawBlock;
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock; 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.belts.tunnel.BeltTunnelBlock;
import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.content.logistics.block.funnel.FunnelBlock;
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
@ -217,8 +218,8 @@ public abstract class ArmInteractionPoint {
@Override @Override
boolean isValid(IBlockReader reader, BlockPos pos, BlockState state) { boolean isValid(IBlockReader reader, BlockPos pos, BlockState state) {
return AllBlocks.MECHANICAL_SAW.has(state) && state.get(SawBlock.RUNNING) return AllBlocks.MECHANICAL_SAW.has(state) && state.get(SawBlock.FACING) == Direction.UP
&& state.get(SawBlock.FACING) == Direction.UP; && ((KineticTileEntity)reader.getTileEntity(pos)).getSpeed() != 0;
} }
} }

View File

@ -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 ] }
}
}
]
}

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -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 ] }
}
}
]
}

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -5,7 +5,6 @@
"slit": "create:block/mechanical_saw_top", "slit": "create:block/mechanical_saw_top",
"gearbox_top": "create:block/gearbox_top", "gearbox_top": "create:block/gearbox_top",
"encased_belt": "create:block/encased_belt", "encased_belt": "create:block/encased_belt",
"stonecutter_saw": "minecraft:block/stonecutter_saw",
"gearbox": "create:block/gearbox", "gearbox": "create:block/gearbox",
"andesite_casing_short": "create:block/andesite_casing_short" "andesite_casing_short": "create:block/andesite_casing_short"
}, },
@ -66,15 +65,6 @@
"south": { "texture": "#slit", "uv": [ 1, 7, 15, 9 ] } "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", "name": "Back",
"from": [ 14, 2, 0 ], "from": [ 14, 2, 0 ],

View File

@ -1,6 +0,0 @@
{
"parent": "create:block/mechanical_saw/horizontal",
"textures": {
"stonecutter_saw": "create:block/static_saw"
}
}

View File

@ -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 ] }
}
}
]
}

View File

@ -3,7 +3,6 @@
"textures": { "textures": {
"gearbox_top": "create:block/gearbox_top", "gearbox_top": "create:block/gearbox_top",
"gearbox": "create:block/gearbox", "gearbox": "create:block/gearbox",
"stonecutter_saw": "minecraft:block/stonecutter_saw",
"andesite_casing_short": "create:block/andesite_casing_short", "andesite_casing_short": "create:block/andesite_casing_short",
"mechanical_saw_top": "create:block/mechanical_saw_top", "mechanical_saw_top": "create:block/mechanical_saw_top",
"particle": "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 } "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", "name": "Top",
"from": [ 0, 12, 2 ], "from": [ 0, 12, 2 ],

View File

@ -1,6 +0,0 @@
{
"parent": "create:block/mechanical_saw/vertical",
"textures": {
"stonecutter_saw": "create:block/static_saw"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,6 @@
{
"animation": {
"interpolate": false,
"frametime": 1
}
}