From 4b4e219a51a46a627246bcda679f22fea5535559 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 9 Jan 2022 15:08:25 +0700 Subject: [PATCH] Physical model of energy counter --- .../ru/dbotthepony/mc/otm/datagen/DataGen.kt | 7 +- .../dbotthepony/mc/otm/shapes/BlockShape.java | 23 ++ .../mc/otm/shapes/BlockShapes.java | 180 +++++++++ .../ru/dbotthepony/mc/otm/shapes/Point.java | 6 + .../dbotthepony/mc/otm/shapes/Rectangle.java | 28 +- .../mc/otm/shapes/SimpleCuboid.java | 51 ++- .../mc/otm/block/BlockEnergyCounter.kt | 55 +++ .../block/energy_counter_north_down.json | 361 ++++++++++++++++++ .../block/energy_counter_south_down.json | 361 ++++++++++++++++++ 9 files changed, 1046 insertions(+), 26 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_north_down.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_south_down.json diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index 43a63e727..32f06a027 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -211,9 +211,11 @@ object DataGen { // ДАААА ДАВАЙЙ ДАААВАААЙЙЙЙЙЙ val north = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_north")) + val north_down = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_north_down")) val north_east = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_north_east")) val north_west = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_north_west")) val south = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_south")) + val south_down = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_south_down")) val south_east = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_south_east")) val south_west = provider.models().getExistingFile(ResourceLocation(MOD_ID, "block/energy_counter_south_west")) @@ -222,13 +224,14 @@ object DataGen { part().modelFile(up).rotationY(dir.toYRotBlockstate()).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.DOWN).condition(BlockEnergyCounter.IF_DIRECTION, dir) } + // низкий поклон за полностью рабочий поворот вокруг оси Z part().modelFile(north).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.NORTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.UP) - part().modelFile(north).rotationX(180).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.NORTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.DOWN) + part().modelFile(north_down).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.NORTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.DOWN) part().modelFile(north_east).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.NORTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.EAST) part().modelFile(north_west).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.NORTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.WEST) part().modelFile(south).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.SOUTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.UP) - part().modelFile(south).rotationX(180).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.SOUTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.DOWN) + part().modelFile(south_down).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.SOUTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.DOWN) part().modelFile(south_east).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.SOUTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.EAST) part().modelFile(south_west).addModel().condition(BlockEnergyCounter.INPUT_DIRECTION, Direction.SOUTH).condition(BlockEnergyCounter.IF_DIRECTION, Direction.WEST) diff --git a/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShape.java b/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShape.java index 199b012b0..6f84be096 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShape.java +++ b/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShape.java @@ -1,10 +1,15 @@ package ru.dbotthepony.mc.otm.shapes; +import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.Direction; import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault public record BlockShape(SimpleCuboid ...shapes) { public BlockShape rotateAroundY(double rad) { var list = new SimpleCuboid[shapes.length]; @@ -15,6 +20,24 @@ public record BlockShape(SimpleCuboid ...shapes) { return new BlockShape(list); } + public BlockShape rotateAroundX(double rad) { + var list = new SimpleCuboid[shapes.length]; + + for (int i = 0; i < shapes.length; i++) + list[i] = shapes[i].rotateAroundX(rad); + + return new BlockShape(list); + } + + public BlockShape rotateAroundZ(double rad) { + var list = new SimpleCuboid[shapes.length]; + + for (int i = 0; i < shapes.length; i++) + list[i] = shapes[i].rotateAroundZ(rad); + + return new BlockShape(list); + } + public BlockShape rotate(Direction dir) { if (dir == Direction.SOUTH) return this; diff --git a/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java b/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java index 7f52bf43c..4cb1aa4e5 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java +++ b/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java @@ -169,4 +169,184 @@ public class BlockShapes { new SimpleCuboid(0.875d, 0.125d, 0.8125d, 0.9375d, 0.875d, 0.9375d), new SimpleCuboid(0.875d, 0.125d, 0.5d, 0.9375d, 0.875d, 0.625d) ); + + public static final BlockShape ENERGY_COUNTER_UP = new BlockShape( + new SimpleCuboid(0d, 0d, 0d, 0.125d, 0.125d, 1d), + new SimpleCuboid(0d, 0.125d, 0.875d, 0.125d, 0.875d, 1d), + new SimpleCuboid(0d, 0.125d, 0d, 0.125d, 0.875d, 0.125d), + new SimpleCuboid(0d, 0.875d, 0d, 0.125d, 1d, 1d), + new SimpleCuboid(0.875d, 0d, 0d, 1d, 0.125d, 1d), + new SimpleCuboid(0.875d, 0.125d, 0d, 1d, 0.875d, 0.125d), + new SimpleCuboid(0.875d, 0.875d, 0d, 1d, 1d, 1d), + new SimpleCuboid(0.875d, 0.125d, 0.875d, 1d, 0.875d, 1d), + new SimpleCuboid(0.0625d, 0.0625d, 0.0625d, 0.9375d, 0.9375d, 0.5d), + new SimpleCuboid(0.125d, 0.125d, 0.5625d, 0.875d, 0.25d, 0.9375d), + new SimpleCuboid(0.125d, 0.75d, 0.5625d, 0.875d, 0.875d, 0.9375d), + new SimpleCuboid(0.1875d, 0.25d, 0.625d, 0.4375d, 0.3125d, 0.875d), + new SimpleCuboid(0.1875d, 0.375d, 0.625d, 0.4375d, 0.4375d, 0.875d), + new SimpleCuboid(0.1875d, 0.5d, 0.625d, 0.4375d, 0.5625d, 0.875d), + new SimpleCuboid(0.1875d, 0.625d, 0.625d, 0.4375d, 0.6875d, 0.875d), + new SimpleCuboid(0.25d, 0.25d, 0.6875d, 0.375d, 0.75d, 0.8125d), + new SimpleCuboid(0.25d, 0.8125d, 0.5d, 0.375d, 0.9375d, 0.8125d), + new SimpleCuboid(0.625d, 0.8125d, 0.5d, 0.75d, 0.9375d, 0.8125d), + new SimpleCuboid(0.625d, 0.0625d, 0.5d, 0.75d, 0.1875d, 0.8125d), + new SimpleCuboid(0.25d, 0.0625d, 0.5d, 0.375d, 0.1875d, 0.8125d), + new SimpleCuboid(0.5625d, 0.375d, 0.625d, 0.8125d, 0.4375d, 0.875d), + new SimpleCuboid(0.625d, 0.25d, 0.6875d, 0.75d, 0.75d, 0.8125d), + new SimpleCuboid(0.5625d, 0.25d, 0.625d, 0.8125d, 0.3125d, 0.875d), + new SimpleCuboid(0.5625d, 0.5d, 0.625d, 0.8125d, 0.5625d, 0.875d), + new SimpleCuboid(0.5625d, 0.625d, 0.625d, 0.8125d, 0.6875d, 0.875d), + new SimpleCuboid(0.3125d, 0d, 0.3125d, 0.6875d, 0.125d, 0.6875d), + new SimpleCuboid(0.3125d, 0.875d, 0.3125d, 0.6875d, 1d, 0.6875d) + ); + + public static final BlockShape ENERGY_COUNTER_DOWN = new BlockShape( + new SimpleCuboid(0d, 0d, 0d, 0.125d, 0.125d, 1d), + new SimpleCuboid(0d, 0.125d, 0.875d, 0.125d, 0.875d, 1d), + new SimpleCuboid(0d, 0.125d, 0d, 0.125d, 0.875d, 0.125d), + new SimpleCuboid(0d, 0.875d, 0d, 0.125d, 1d, 1d), + new SimpleCuboid(0.875d, 0d, 0d, 1d, 0.125d, 1d), + new SimpleCuboid(0.875d, 0.125d, 0d, 1d, 0.875d, 0.125d), + new SimpleCuboid(0.875d, 0.875d, 0d, 1d, 1d, 1d), + new SimpleCuboid(0.875d, 0.125d, 0.875d, 1d, 0.875d, 1d), + new SimpleCuboid(0.0625d, 0.0625d, 0.0625d, 0.9375d, 0.9375d, 0.5d), + new SimpleCuboid(0.125d, 0.125d, 0.5625d, 0.875d, 0.25d, 0.9375d), + new SimpleCuboid(0.125d, 0.75d, 0.5625d, 0.875d, 0.875d, 0.9375d), + new SimpleCuboid(0.1875d, 0.25d, 0.625d, 0.4375d, 0.3125d, 0.875d), + new SimpleCuboid(0.1875d, 0.375d, 0.625d, 0.4375d, 0.4375d, 0.875d), + new SimpleCuboid(0.1875d, 0.5d, 0.625d, 0.4375d, 0.5625d, 0.875d), + new SimpleCuboid(0.1875d, 0.625d, 0.625d, 0.4375d, 0.6875d, 0.875d), + new SimpleCuboid(0.25d, 0.25d, 0.6875d, 0.375d, 0.75d, 0.8125d), + new SimpleCuboid(0.25d, 0.8125d, 0.5d, 0.375d, 0.9375d, 0.8125d), + new SimpleCuboid(0.625d, 0.8125d, 0.5d, 0.75d, 0.9375d, 0.8125d), + new SimpleCuboid(0.625d, 0.0625d, 0.5d, 0.75d, 0.1875d, 0.8125d), + new SimpleCuboid(0.25d, 0.0625d, 0.5d, 0.375d, 0.1875d, 0.8125d), + new SimpleCuboid(0.5625d, 0.375d, 0.625d, 0.8125d, 0.4375d, 0.875d), + new SimpleCuboid(0.625d, 0.25d, 0.6875d, 0.75d, 0.75d, 0.8125d), + new SimpleCuboid(0.5625d, 0.25d, 0.625d, 0.8125d, 0.3125d, 0.875d), + new SimpleCuboid(0.5625d, 0.5d, 0.625d, 0.8125d, 0.5625d, 0.875d), + new SimpleCuboid(0.5625d, 0.625d, 0.625d, 0.8125d, 0.6875d, 0.875d), + new SimpleCuboid(0.3125d, 0.875d, 0.3125d, 0.6875d, 1d, 0.6875d), + new SimpleCuboid(0.3125d, 0d, 0.3125d, 0.6875d, 0.125d, 0.6875d) + ); + + public static final BlockShape ENERGY_COUNTER_EAST = new BlockShape( + new SimpleCuboid(0.875d, 0d, 0d, 1d, 0.125d, 1d), + new SimpleCuboid(0.125d, 0d, 0.875d, 0.875d, 0.125d, 1d), + new SimpleCuboid(0.125d, 0d, 0d, 0.875d, 0.125d, 0.125d), + new SimpleCuboid(0d, 0d, 0d, 0.125d, 0.125d, 1d), + new SimpleCuboid(0.875d, 0.875d, 0d, 1d, 1d, 1d), + new SimpleCuboid(0.125d, 0.875d, 0d, 0.875d, 1d, 0.125d), + new SimpleCuboid(0d, 0.875d, 0d, 0.125d, 1d, 1d), + new SimpleCuboid(0.125d, 0.875d, 0.875d, 0.875d, 1d, 1d), + new SimpleCuboid(0.0625d, 0.0625d, 0.0625d, 0.9375d, 0.9375d, 0.5d), + new SimpleCuboid(0.75d, 0.125d, 0.5625d, 0.875d, 0.875d, 0.9375d), + new SimpleCuboid(0.125d, 0.125d, 0.5625d, 0.25d, 0.875d, 0.9375d), + new SimpleCuboid(0.6875d, 0.1875d, 0.625d, 0.75d, 0.4375d, 0.875d), + new SimpleCuboid(0.5625d, 0.1875d, 0.625d, 0.625d, 0.4375d, 0.875d), + new SimpleCuboid(0.4375d, 0.1875d, 0.625d, 0.5d, 0.4375d, 0.875d), + new SimpleCuboid(0.3125d, 0.1875d, 0.625d, 0.375d, 0.4375d, 0.875d), + new SimpleCuboid(0.25d, 0.25d, 0.6875d, 0.75d, 0.375d, 0.8125d), + new SimpleCuboid(0.0625d, 0.25d, 0.5d, 0.1875d, 0.375d, 0.8125d), + new SimpleCuboid(0.0625d, 0.625d, 0.5d, 0.1875d, 0.75d, 0.8125d), + new SimpleCuboid(0.8125d, 0.625d, 0.5d, 0.9375d, 0.75d, 0.8125d), + new SimpleCuboid(0.8125d, 0.25d, 0.5d, 0.9375d, 0.375d, 0.8125d), + new SimpleCuboid(0.5625d, 0.5625d, 0.625d, 0.625d, 0.8125d, 0.875d), + new SimpleCuboid(0.25d, 0.625d, 0.6875d, 0.75d, 0.75d, 0.8125d), + new SimpleCuboid(0.6875d, 0.5625d, 0.625d, 0.75d, 0.8125d, 0.875d), + new SimpleCuboid(0.4375d, 0.5625d, 0.625d, 0.5d, 0.8125d, 0.875d), + new SimpleCuboid(0.3125d, 0.5625d, 0.625d, 0.375d, 0.8125d, 0.875d), + new SimpleCuboid(0.875d, 0.3125d, 0.3125d, 1d, 0.6875d, 0.6875d), + new SimpleCuboid(0d, 0.3125d, 0.3125d, 0.125d, 0.6875d, 0.6875d) + ); + + public static final BlockShape ENERGY_COUNTER_WEST = new BlockShape( + new SimpleCuboid(0d, 0.875d, 0d, 0.125d, 1d, 1d), + new SimpleCuboid(0.125d, 0.875d, 0.875d, 0.875d, 1d, 1d), + new SimpleCuboid(0.125d, 0.875d, 0d, 0.875d, 1d, 0.125d), + new SimpleCuboid(0.875d, 0.875d, 0d, 1d, 1d, 1d), + new SimpleCuboid(0d, 0d, 0d, 0.125d, 0.125d, 1d), + new SimpleCuboid(0.125d, 0d, 0d, 0.875d, 0.125d, 0.125d), + new SimpleCuboid(0.875d, 0d, 0d, 1d, 0.125d, 1d), + new SimpleCuboid(0.125d, 0d, 0.875d, 0.875d, 0.125d, 1d), + new SimpleCuboid(0.0625d, 0.0625d, 0.0625d, 0.9375d, 0.9375d, 0.5d), + new SimpleCuboid(0.125d, 0.125d, 0.5625d, 0.25d, 0.875d, 0.9375d), + new SimpleCuboid(0.75d, 0.125d, 0.5625d, 0.875d, 0.875d, 0.9375d), + new SimpleCuboid(0.25d, 0.5625d, 0.625d, 0.3125d, 0.8125d, 0.875d), + new SimpleCuboid(0.375d, 0.5625d, 0.625d, 0.4375d, 0.8125d, 0.875d), + new SimpleCuboid(0.5d, 0.5625d, 0.625d, 0.5625d, 0.8125d, 0.875d), + new SimpleCuboid(0.625d, 0.5625d, 0.625d, 0.6875d, 0.8125d, 0.875d), + new SimpleCuboid(0.25d, 0.625d, 0.6875d, 0.75d, 0.75d, 0.8125d), + new SimpleCuboid(0.8125d, 0.625d, 0.5d, 0.9375d, 0.75d, 0.8125d), + new SimpleCuboid(0.8125d, 0.25d, 0.5d, 0.9375d, 0.375d, 0.8125d), + new SimpleCuboid(0.0625d, 0.25d, 0.5d, 0.1875d, 0.375d, 0.8125d), + new SimpleCuboid(0.0625d, 0.625d, 0.5d, 0.1875d, 0.75d, 0.8125d), + new SimpleCuboid(0.375d, 0.1875d, 0.625d, 0.4375d, 0.4375d, 0.875d), + new SimpleCuboid(0.25d, 0.25d, 0.6875d, 0.75d, 0.375d, 0.8125d), + new SimpleCuboid(0.25d, 0.1875d, 0.625d, 0.3125d, 0.4375d, 0.875d), + new SimpleCuboid(0.5d, 0.1875d, 0.625d, 0.5625d, 0.4375d, 0.875d), + new SimpleCuboid(0.625d, 0.1875d, 0.625d, 0.6875d, 0.4375d, 0.875d), + new SimpleCuboid(0d, 0.3125d, 0.3125d, 0.125d, 0.6875d, 0.6875d), + new SimpleCuboid(0.875d, 0.3125d, 0.3125d, 1d, 0.6875d, 0.6875d) + ); + + public static final BlockShape ENERGY_COUNTER_NORTH = new BlockShape( + new SimpleCuboid(0d, 0d, 0d, 0.125d, 1d, 0.125d), + new SimpleCuboid(0d, 0d, 0.125d, 0.125d, 0.125d, 0.875d), + new SimpleCuboid(0d, 0.875d, 0.125d, 0.125d, 1d, 0.875d), + new SimpleCuboid(0d, 0d, 0.875d, 0.125d, 1d, 1d), + new SimpleCuboid(0.875d, 0d, 0d, 1d, 1d, 0.125d), + new SimpleCuboid(0.875d, 0.875d, 0.125d, 1d, 1d, 0.875d), + new SimpleCuboid(0.875d, 0d, 0.875d, 1d, 1d, 1d), + new SimpleCuboid(0.875d, 0d, 0.125d, 1d, 0.125d, 0.875d), + new SimpleCuboid(0.0625d, 0.5d, 0.0625d, 0.9375d, 0.9375d, 0.9375d), + new SimpleCuboid(0.125d, 0.0625d, 0.125d, 0.875d, 0.4375d, 0.25d), + new SimpleCuboid(0.125d, 0.0625d, 0.75d, 0.875d, 0.4375d, 0.875d), + new SimpleCuboid(0.1875d, 0.125d, 0.25d, 0.4375d, 0.375d, 0.3125d), + new SimpleCuboid(0.1875d, 0.125d, 0.375d, 0.4375d, 0.375d, 0.4375d), + new SimpleCuboid(0.1875d, 0.125d, 0.5d, 0.4375d, 0.375d, 0.5625d), + new SimpleCuboid(0.1875d, 0.125d, 0.625d, 0.4375d, 0.375d, 0.6875d), + new SimpleCuboid(0.25d, 0.1875d, 0.25d, 0.375d, 0.3125d, 0.75d), + new SimpleCuboid(0.25d, 0.1875d, 0.8125d, 0.375d, 0.5d, 0.9375d), + new SimpleCuboid(0.625d, 0.1875d, 0.8125d, 0.75d, 0.5d, 0.9375d), + new SimpleCuboid(0.625d, 0.1875d, 0.0625d, 0.75d, 0.5d, 0.1875d), + new SimpleCuboid(0.25d, 0.1875d, 0.0625d, 0.375d, 0.5d, 0.1875d), + new SimpleCuboid(0.5625d, 0.125d, 0.375d, 0.8125d, 0.375d, 0.4375d), + new SimpleCuboid(0.625d, 0.1875d, 0.25d, 0.75d, 0.3125d, 0.75d), + new SimpleCuboid(0.5625d, 0.125d, 0.25d, 0.8125d, 0.375d, 0.3125d), + new SimpleCuboid(0.5625d, 0.125d, 0.5d, 0.8125d, 0.375d, 0.5625d), + new SimpleCuboid(0.5625d, 0.125d, 0.625d, 0.8125d, 0.375d, 0.6875d), + new SimpleCuboid(0.3125d, 0.3125d, 0d, 0.6875d, 0.6875d, 0.125d), + new SimpleCuboid(0.3125d, 0.3125d, 0.875d, 0.6875d, 0.6875d, 1d) + ); + + public static final BlockShape ENERGY_COUNTER_SOUTH = new BlockShape( + new SimpleCuboid(0.875d, 0d, 0.875d, 1d, 1d, 1d), + new SimpleCuboid(0.875d, 0d, 0.125d, 1d, 0.125d, 0.875d), + new SimpleCuboid(0.875d, 0.875d, 0.125d, 1d, 1d, 0.875d), + new SimpleCuboid(0.875d, 0d, 0d, 1d, 1d, 0.125d), + new SimpleCuboid(0d, 0d, 0.875d, 0.125d, 1d, 1d), + new SimpleCuboid(0d, 0.875d, 0.125d, 0.125d, 1d, 0.875d), + new SimpleCuboid(0d, 0d, 0d, 0.125d, 1d, 0.125d), + new SimpleCuboid(0d, 0d, 0.125d, 0.125d, 0.125d, 0.875d), + new SimpleCuboid(0.0625d, 0.5d, 0.0625d, 0.9375d, 0.9375d, 0.9375d), + new SimpleCuboid(0.125d, 0.0625d, 0.75d, 0.875d, 0.4375d, 0.875d), + new SimpleCuboid(0.125d, 0.0625d, 0.125d, 0.875d, 0.4375d, 0.25d), + new SimpleCuboid(0.5625d, 0.125d, 0.6875d, 0.8125d, 0.375d, 0.75d), + new SimpleCuboid(0.5625d, 0.125d, 0.5625d, 0.8125d, 0.375d, 0.625d), + new SimpleCuboid(0.5625d, 0.125d, 0.4375d, 0.8125d, 0.375d, 0.5d), + new SimpleCuboid(0.5625d, 0.125d, 0.3125d, 0.8125d, 0.375d, 0.375d), + new SimpleCuboid(0.625d, 0.1875d, 0.25d, 0.75d, 0.3125d, 0.75d), + new SimpleCuboid(0.625d, 0.1875d, 0.0625d, 0.75d, 0.5d, 0.1875d), + new SimpleCuboid(0.25d, 0.1875d, 0.0625d, 0.375d, 0.5d, 0.1875d), + new SimpleCuboid(0.25d, 0.1875d, 0.8125d, 0.375d, 0.5d, 0.9375d), + new SimpleCuboid(0.625d, 0.1875d, 0.8125d, 0.75d, 0.5d, 0.9375d), + new SimpleCuboid(0.1875d, 0.125d, 0.5625d, 0.4375d, 0.375d, 0.625d), + new SimpleCuboid(0.25d, 0.1875d, 0.25d, 0.375d, 0.3125d, 0.75d), + new SimpleCuboid(0.1875d, 0.125d, 0.6875d, 0.4375d, 0.375d, 0.75d), + new SimpleCuboid(0.1875d, 0.125d, 0.4375d, 0.4375d, 0.375d, 0.5d), + new SimpleCuboid(0.1875d, 0.125d, 0.3125d, 0.4375d, 0.375d, 0.375d), + new SimpleCuboid(0.3125d, 0.3125d, 0.875d, 0.6875d, 0.6875d, 1d), + new SimpleCuboid(0.3125d, 0.3125d, 0d, 0.6875d, 0.6875d, 0.125d) + ); } diff --git a/src/main/java/ru/dbotthepony/mc/otm/shapes/Point.java b/src/main/java/ru/dbotthepony/mc/otm/shapes/Point.java index 8fb30d227..7f0567cfa 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/shapes/Point.java +++ b/src/main/java/ru/dbotthepony/mc/otm/shapes/Point.java @@ -1,5 +1,11 @@ package ru.dbotthepony.mc.otm.shapes; +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault public record Point(double x, double y) { public Point rotate(double rad) { double sin = Math.sin(rad); diff --git a/src/main/java/ru/dbotthepony/mc/otm/shapes/Rectangle.java b/src/main/java/ru/dbotthepony/mc/otm/shapes/Rectangle.java index 7828a3be3..cf23a2116 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/shapes/Rectangle.java +++ b/src/main/java/ru/dbotthepony/mc/otm/shapes/Rectangle.java @@ -1,5 +1,11 @@ package ru.dbotthepony.mc.otm.shapes; +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault public record Rectangle(Point a, Point b, Point c, Point d) { public Rectangle rotate(double rad) { return new Rectangle(a.rotate(rad), b.rotate(rad), c.rotate(rad), d.rotate(rad)); @@ -10,29 +16,15 @@ public record Rectangle(Point a, Point b, Point c, Point d) { } public Point min() { - double x = a.x(); - double y = a.y(); - - x = Math.min(x, b.x()); - y = Math.min(y, b.y()); - x = Math.min(x, c.x()); - y = Math.min(y, c.y()); - x = Math.min(x, d.x()); - y = Math.min(y, d.y()); + final double x = MathHelper.min(a.x(), b.x(), c.x(), d.x()); + final double y = MathHelper.min(a.y(), b.y(), c.y(), d.y()); return new Point(x, y); } public Point max() { - double x = a.x(); - double y = a.y(); - - x = Math.max(x, b.x()); - y = Math.max(y, b.y()); - x = Math.max(x, c.x()); - y = Math.max(y, c.y()); - x = Math.max(x, d.x()); - y = Math.max(y, d.y()); + final double x = MathHelper.max(a.x(), b.x(), c.x(), d.x()); + final double y = MathHelper.max(a.y(), b.y(), c.y(), d.y()); return new Point(x, y); } diff --git a/src/main/java/ru/dbotthepony/mc/otm/shapes/SimpleCuboid.java b/src/main/java/ru/dbotthepony/mc/otm/shapes/SimpleCuboid.java index 0f4bbb21d..ff9731889 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/shapes/SimpleCuboid.java +++ b/src/main/java/ru/dbotthepony/mc/otm/shapes/SimpleCuboid.java @@ -1,8 +1,13 @@ package ru.dbotthepony.mc.otm.shapes; +import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault public record SimpleCuboid(double min_x, double min_y, double min_z, double max_x, double max_y, double max_z) { public SimpleCuboid normalized() { if (min_x <= max_x && min_y <= max_y && min_z <= max_z) @@ -48,19 +53,53 @@ public record SimpleCuboid(double min_x, double min_y, double min_z, double max_ return Shapes.box(normalize.min_x, normalize.min_y, normalize.min_z, normalize.max_x, normalize.max_y, normalize.max_z); } - public SimpleCuboid rotateAroundY(double rad) { - var rect = new Rectangle( + public SimpleCuboid rotateAroundY(final double rad) { + final var rect = new Rectangle( new Point(min_x, min_z), new Point(max_x, min_z), new Point(max_x, max_z), new Point(min_x, max_z) ).translate(-0.5, -0.5).rotate(rad).translate(0.5, 0.5); - double min_x = MathHelper.min(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); - double max_x = MathHelper.max(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + final double min_x = MathHelper.min(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + final double max_x = MathHelper.max(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); - double min_z = MathHelper.min(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); - double max_z = MathHelper.max(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + final double min_z = MathHelper.min(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + final double max_z = MathHelper.max(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + + return new SimpleCuboid(min_x, min_y, min_z, max_x, max_y, max_z); + } + + public SimpleCuboid rotateAroundX(final double rad) { + final var rect = new Rectangle( + new Point(min_z, min_y), + new Point(max_z, min_y), + new Point(max_z, max_y), + new Point(min_z, max_y) + ).translate(-0.5, -0.5).rotate(rad).translate(0.5, 0.5); + + final double min_z = MathHelper.min(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + final double max_z = MathHelper.max(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + + final double min_y = MathHelper.min(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + final double max_y = MathHelper.max(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + + return new SimpleCuboid(min_x, min_y, min_z, max_x, max_y, max_z); + } + + public SimpleCuboid rotateAroundZ(final double rad) { + final var rect = new Rectangle( + new Point(min_x, min_y), + new Point(max_x, min_y), + new Point(max_x, max_y), + new Point(min_x, max_y) + ).translate(-0.5, -0.5).rotate(rad).translate(0.5, 0.5); + + final double min_x = MathHelper.min(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + final double max_x = MathHelper.max(rect.a().x(), rect.b().x(), rect.c().x(), rect.d().x()); + + final double min_y = MathHelper.min(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); + final double max_y = MathHelper.max(rect.a().y(), rect.b().y(), rect.c().y(), rect.d().y()); return new SimpleCuboid(min_x, min_y, min_z, max_x, max_y, max_z); } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/BlockEnergyCounter.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/BlockEnergyCounter.kt index b7ad88c11..8bd2eb590 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/BlockEnergyCounter.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/BlockEnergyCounter.kt @@ -3,6 +3,7 @@ package ru.dbotthepony.mc.otm.block import net.minecraft.core.BlockPos import net.minecraft.core.Direction import net.minecraft.world.item.context.BlockPlaceContext +import net.minecraft.world.level.BlockGetter import net.minecraft.world.level.Level import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.EntityBlock @@ -12,8 +13,11 @@ import net.minecraft.world.level.block.entity.BlockEntityType import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.level.block.state.StateDefinition import net.minecraft.world.level.block.state.properties.EnumProperty +import net.minecraft.world.phys.shapes.CollisionContext +import net.minecraft.world.phys.shapes.VoxelShape import ru.dbotthepony.mc.otm.Registry import ru.dbotthepony.mc.otm.block.entity.BlockEntityEnergyCounter +import ru.dbotthepony.mc.otm.shapes.BlockShapes class BlockEnergyCounter : BlockMattery(), EntityBlock { override fun newBlockEntity(blockPos: BlockPos, blockState: BlockState): BlockEntity { @@ -68,6 +72,57 @@ class BlockEnergyCounter : BlockMattery(), EntityBlock { } } + private val SHAPES = HashMap() + + init { + for (state in stateDefinition.possibleStates) { + val input: Direction = state.getValue(INPUT_DIRECTION) + val iface: Direction = state.getValue(IF_DIRECTION) + + var shape = when (input) { + Direction.DOWN -> BlockShapes.ENERGY_COUNTER_DOWN + Direction.UP -> BlockShapes.ENERGY_COUNTER_UP + Direction.NORTH -> BlockShapes.ENERGY_COUNTER_NORTH + Direction.SOUTH -> BlockShapes.ENERGY_COUNTER_SOUTH + Direction.WEST -> BlockShapes.ENERGY_COUNTER_WEST + Direction.EAST -> BlockShapes.ENERGY_COUNTER_EAST + } + + if (input === Direction.UP || input === Direction.DOWN) { + shape = shape.rotate(iface) + } else if (input === Direction.EAST || input === Direction.WEST) { + when (iface) { + Direction.DOWN -> shape = shape.rotateAroundX(-Math.PI / 2) + Direction.UP -> shape = shape.rotateAroundX(Math.PI / 2) + Direction.NORTH -> { /* уже в нужном положении */ } + Direction.SOUTH -> shape = shape.rotateAroundX(Math.PI) + Direction.WEST -> { /* недостижимо */ } + Direction.EAST -> { /* недостижимо */ } + } + } else { + when (iface) { + Direction.DOWN -> shape = shape.rotateAroundZ(Math.PI) + Direction.UP -> { /* уже в нужном положении */ } + Direction.NORTH -> { /* недостижимо */ } + Direction.SOUTH -> { /* недостижимо */ } + Direction.WEST -> shape = shape.rotateAroundZ(Math.PI / 2) + Direction.EAST -> shape = shape.rotateAroundZ(-Math.PI / 2) + } + } + + SHAPES[state] = shape.computeShape() + } + } + + override fun getShape( + blockState: BlockState, + p_60556_: BlockGetter, + p_60557_: BlockPos, + p_60558_: CollisionContext + ): VoxelShape { + return SHAPES[blockState] ?: super.getShape(blockState, p_60556_, p_60557_, p_60558_) + } + companion object { @JvmField val INPUT_DIRECTION: EnumProperty = EnumProperty.create("input", Direction::class.java) @JvmField val IF_DIRECTION: EnumProperty = EnumProperty.create("if", Direction::class.java) diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_north_down.json b/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_north_down.json new file mode 100644 index 000000000..9a03d28fb --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_north_down.json @@ -0,0 +1,361 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "particle": "overdrive_that_matters:block/energy_counter", + "texture": "overdrive_that_matters:block/energy_counter" + }, + "elements": [ + { + "name": "frame", + "from": [14, 0, 0], + "to": [16, 16, 2], + "faces": { + "north": {"uv": [4, 0, 4.5, 8], "texture": "#texture"}, + "east": {"uv": [0, 7, 4, 8], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [3.5, 0, 3.75, 8], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0, 7, 4, 8], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 14, 2], + "to": [16, 16, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [3.5, 1, 4, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [0, 1, 0.5, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 1, 4.5, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [3.5, 1, 3.75, 7], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 0, 2], + "to": [16, 2, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [0, 1, 0.5, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [3.5, 1, 4, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [3.5, 1, 3.75, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 1, 4.5, 7], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 0, 14], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3.5, 0, 3.75, 8], "texture": "#texture"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [4, 0, 4.5, 8], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 0, 0], + "to": [2, 16, 2], + "faces": { + "north": {"uv": [4, 0, 4.5, 8], "texture": "#texture"}, + "east": {"uv": [0, 7, 4, 8], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [3.5, 0, 3.75, 8], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0, 7, 4, 8], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 0, 2], + "to": [2, 2, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [0, 1, 0.5, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [3.5, 1, 4, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [3.5, 1, 3.75, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 1, 4.5, 7], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 0, 14], + "to": [2, 16, 16], + "faces": { + "north": {"uv": [3.5, 0, 3.75, 8], "texture": "#texture"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [4, 0, 4.5, 8], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 14, 2], + "to": [2, 16, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [3.5, 1, 4, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [0, 1, 0.5, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4, 1, 4.5, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [3.5, 1, 3.75, 7], "texture": "#texture"} + } + }, + { + "name": "screen", + "from": [1, 1, 1], + "to": [15, 8, 15], + "faces": { + "north": {"uv": [8.75, 8, 10.5, 15], "rotation": 270, "texture": "#texture"}, + "east": {"uv": [3.5, 8, 5.25, 15], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [8.75, 8, 10.5, 15], "rotation": 270, "texture": "#texture"}, + "west": {"uv": [3.5, 8, 5.25, 15], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [5.25, 8, 8.75, 15], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0, 8, 3.5, 15], "texture": "#texture"} + } + }, + { + "name": "plates", + "from": [2, 9, 2], + "to": [14, 15, 4], + "faces": { + "north": {"uv": [4.5, 0, 7.5, 2.5], "texture": "#texture"}, + "east": {"uv": [5.25, 3, 6.75, 4], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [4.5, 4, 7.5, 7], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [5.25, 3, 7, 4], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4.5, 3, 7.5, 4], "texture": "#texture"}, + "down": {"uv": [4.5, 3, 7.5, 4], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "plates", + "from": [2, 9, 12], + "to": [14, 15, 14], + "faces": { + "north": {"uv": [4.5, 4, 7.5, 7], "texture": "#texture"}, + "east": {"uv": [5.25, 3, 6.75, 4], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [4.5, 0, 7.5, 2.5], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [5.25, 3, 6.75, 4], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4.5, 3, 7.5, 4], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4.5, 3, 7.5, 4], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 4], + "to": [13, 14, 5], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 6], + "to": [13, 14, 7], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 8], + "to": [13, 14, 9], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 10], + "to": [13, 14, 11], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coilbase", + "from": [10, 11, 4], + "to": [12, 13, 12], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [1.5, 1, 2, 5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [1.5, 1, 2, 5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [1.5, 1, 2, 5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [1.5, 1, 2, 5], "texture": "#texture"} + } + }, + { + "name": "connectors", + "from": [10, 8, 13], + "to": [12, 13, 15], + "faces": { + "north": {"uv": [1, 6.5, 2.25, 7], "texture": "#texture"}, + "east": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3.5, 1, 4.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [4, 8, 13], + "to": [6, 13, 15], + "faces": { + "north": {"uv": [1, 6.5, 2.25, 7], "texture": "#texture"}, + "east": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3.5, 1, 4.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [4, 8, 1], + "to": [6, 13, 3], + "faces": { + "north": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [1, 6.5, 2.25, 7], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 6, 1, 7], "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [10, 8, 1], + "to": [12, 13, 3], + "faces": { + "north": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [1, 6.5, 2.25, 7], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 6, 1, 7], "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#missing"} + } + }, + { + "name": "coil", + "from": [3, 10, 6], + "to": [7, 14, 7], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coilbase", + "from": [4, 11, 4], + "to": [6, 13, 12], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "east": {"uv": [1.5, 1, 2, 5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "west": {"uv": [1.5, 1, 2, 5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [1.5, 1, 2, 5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [1.5, 1, 2, 5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 4], + "to": [7, 14, 5], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 8], + "to": [7, 14, 9], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 10], + "to": [7, 14, 11], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"} + } + }, + { + "name": "upperplug", + "from": [5, 5, 0], + "to": [11, 11, 2], + "faces": { + "north": {"uv": [9, 0, 10.5, 3], "texture": "#texture"}, + "east": {"uv": [9, 3, 10.5, 4], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [10.5, 0, 12, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [9, 3, 10.5, 4], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [9, 3, 10.5, 4], "texture": "#texture"}, + "down": {"uv": [9, 3, 10.5, 4], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "bottomplug", + "from": [5, 5, 14], + "to": [11, 11, 16], + "faces": { + "north": {"uv": [10.5, 0, 12, 3], "texture": "#texture"}, + "east": {"uv": [7.5, 3, 9, 4], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [7.5, 0, 9, 3], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [7.5, 3, 9, 4], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [7.5, 3, 9, 4], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [7.5, 3, 9, 4], "texture": "#texture"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_south_down.json b/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_south_down.json new file mode 100644 index 000000000..1d10557a8 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/block/energy_counter_south_down.json @@ -0,0 +1,361 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "particle": "overdrive_that_matters:block/energy_counter", + "texture": "overdrive_that_matters:block/energy_counter" + }, + "elements": [ + { + "name": "frame", + "from": [0, 0, 14], + "to": [2, 16, 16], + "faces": { + "north": {"uv": [3.5, 0, 3.75, 8], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0, 7, 4, 8], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [4, 0, 4.5, 8], "texture": "#texture"}, + "west": {"uv": [0, 7, 4, 8], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 14, 2], + "to": [2, 16, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 1, 0.5, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [3.5, 1, 4, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 1, 4.5, 7], "texture": "#texture"}, + "down": {"uv": [3.5, 1, 3.75, 7], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 0, 2], + "to": [2, 2, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [3.5, 1, 4, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [0, 1, 0.5, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [3.5, 1, 3.75, 7], "texture": "#texture"}, + "down": {"uv": [4, 1, 4.5, 7], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [0, 0, 0], + "to": [2, 16, 2], + "faces": { + "north": {"uv": [4, 0, 4.5, 8], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [3.5, 0, 3.75, 8], "texture": "#texture"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 0, 14], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3.5, 0, 3.75, 8], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0, 7, 4, 8], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [4, 0, 4.5, 8], "texture": "#texture"}, + "west": {"uv": [0, 7, 4, 8], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 0, 2], + "to": [16, 2, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [3.5, 1, 4, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [0, 1, 0.5, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [3.5, 1, 3.75, 7], "texture": "#texture"}, + "down": {"uv": [4, 1, 4.5, 7], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 0, 0], + "to": [16, 16, 2], + "faces": { + "north": {"uv": [4, 0, 4.5, 8], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0, 0, 4, 1], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [3.5, 0, 3.75, 8], "texture": "#texture"}, + "west": {"uv": [0, 0, 4, 1], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 0, 4.5, 1], "texture": "#texture"}, + "down": {"uv": [4, 0, 4.5, 1], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "frame", + "from": [14, 14, 2], + "to": [16, 16, 14], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [0, 1, 0.5, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [3.5, 1, 4, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4, 1, 4.5, 7], "texture": "#texture"}, + "down": {"uv": [3.5, 1, 3.75, 7], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "screen", + "from": [1, 1, 1], + "to": [15, 8, 15], + "faces": { + "north": {"uv": [8.75, 8, 10.5, 15], "rotation": 270, "texture": "#texture"}, + "east": {"uv": [3.5, 8, 5.25, 15], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [8.75, 8, 10.5, 15], "rotation": 270, "texture": "#texture"}, + "west": {"uv": [3.5, 8, 5.25, 15], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [5.25, 8, 8.75, 15], "texture": "#texture"}, + "down": {"uv": [0, 8, 3.5, 15], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "plates", + "from": [2, 9, 12], + "to": [14, 15, 14], + "faces": { + "north": {"uv": [4.5, 4, 7.5, 7], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [5.25, 3, 7, 4], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [4.5, 0, 7.5, 2.5], "texture": "#texture"}, + "west": {"uv": [5.25, 3, 6.75, 4], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [4.5, 3, 7.5, 4], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [4.5, 3, 7.5, 4], "texture": "#texture"} + } + }, + { + "name": "plates", + "from": [2, 9, 2], + "to": [14, 15, 4], + "faces": { + "north": {"uv": [4.5, 0, 7.5, 2.5], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [5.25, 3, 6.75, 4], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [4.5, 4, 7.5, 7], "texture": "#texture"}, + "west": {"uv": [5.25, 3, 6.75, 4], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [4.5, 3, 7.5, 4], "texture": "#texture"}, + "down": {"uv": [4.5, 3, 7.5, 4], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 11], + "to": [7, 14, 12], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 9], + "to": [7, 14, 10], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 7], + "to": [7, 14, 8], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [3, 10, 5], + "to": [7, 14, 6], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coilbase", + "from": [4, 11, 4], + "to": [6, 13, 12], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [1.5, 1, 2, 5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [1.5, 1, 2, 5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [1.5, 1, 2, 5], "texture": "#texture"}, + "down": {"uv": [1.5, 1, 2, 5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "connectors", + "from": [4, 8, 1], + "to": [6, 13, 3], + "faces": { + "north": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [1, 6.5, 2.25, 7], "texture": "#texture"}, + "west": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3.5, 1, 4.5], "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [10, 8, 1], + "to": [12, 13, 3], + "faces": { + "north": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [1, 6.5, 2.25, 7], "texture": "#texture"}, + "west": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3.5, 1, 4.5], "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [10, 8, 13], + "to": [12, 13, 15], + "faces": { + "north": {"uv": [1, 6.5, 2.25, 7], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 6, 1, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"} + } + }, + { + "name": "connectors", + "from": [4, 8, 13], + "to": [6, 13, 15], + "faces": { + "north": {"uv": [1, 6.5, 2.25, 7], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [2.25, 6, 1, 7], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [0.5, 3.5, 1, 6], "rotation": 180, "texture": "#texture"}, + "west": {"uv": [1, 6, 2.25, 7], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [0.5, 6, 1, 7], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"} + } + }, + { + "name": "coil", + "from": [9, 10, 9], + "to": [13, 14, 10], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coilbase", + "from": [10, 11, 4], + "to": [12, 13, 12], + "faces": { + "north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#missing"}, + "east": {"uv": [1.5, 1, 2, 5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#missing"}, + "west": {"uv": [1.5, 1, 2, 5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [1.5, 1, 2, 5], "texture": "#texture"}, + "down": {"uv": [1.5, 1, 2, 5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 11], + "to": [13, 14, 12], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 7], + "to": [13, 14, 8], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "coil", + "from": [9, 10, 5], + "to": [13, 14, 6], + "faces": { + "north": {"uv": [0.5, 1, 1.5, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [0.5, 1, 1.5, 3], "texture": "#texture"}, + "west": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [0.5, 3, 1.5, 3.5], "texture": "#texture"}, + "down": {"uv": [0.5, 3, 1.5, 3.5], "rotation": 180, "texture": "#texture"} + } + }, + { + "name": "upperplug", + "from": [5, 5, 14], + "to": [11, 11, 16], + "faces": { + "north": {"uv": [10.5, 0, 12, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [9, 3, 10.5, 4], "rotation": 270, "texture": "#texture"}, + "south": {"uv": [9, 0, 10.5, 3], "texture": "#texture"}, + "west": {"uv": [9, 3, 10.5, 4], "rotation": 90, "texture": "#texture"}, + "up": {"uv": [9, 3, 10.5, 4], "rotation": 180, "texture": "#texture"}, + "down": {"uv": [9, 3, 10.5, 4], "texture": "#texture"} + } + }, + { + "name": "bottomplug", + "from": [5, 5, 0], + "to": [11, 11, 2], + "faces": { + "north": {"uv": [7.5, 0, 9, 3], "rotation": 180, "texture": "#texture"}, + "east": {"uv": [7.5, 3, 9, 4], "rotation": 90, "texture": "#texture"}, + "south": {"uv": [10.5, 0, 12, 3], "texture": "#texture"}, + "west": {"uv": [7.5, 3, 9, 4], "rotation": 270, "texture": "#texture"}, + "up": {"uv": [7.5, 3, 9, 4], "texture": "#texture"}, + "down": {"uv": [7.5, 3, 9, 4], "rotation": 180, "texture": "#texture"} + } + } + ] +} \ No newline at end of file