diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index ccd9cd3bc..f707e021b 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -58,6 +58,7 @@ public class AllBlockPartials { DEPLOYER_HAND_HOLDING = get("deployer/hand_holding"), ANALOG_LEVER_HANDLE = get("analog_lever/handle"), ANALOG_LEVER_INDICATOR = get("analog_lever/indicator"), + BELT_FUNNEL_FLAP = get("belt_funnel/flap"), BELT_TUNNEL_FLAP = get("belt_tunnel/flap"), BELT_TUNNEL_INDICATOR = get("belt_tunnel/indicator"), FLEXPEATER_INDICATOR = get("diodes/indicator"), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 7c86504d4..141699d12 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -86,6 +86,7 @@ import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity; import com.simibubi.create.content.logistics.block.packager.PackagerRenderer; import com.simibubi.create.content.logistics.block.packager.PackagerTileEntity; +import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelRenderer; import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelTileEntity; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; @@ -309,7 +310,7 @@ public class AllTileEntities { bind(TRANSPOSER, SmartTileEntityRenderer::new); bind(LINKED_TRANSPOSER, SmartTileEntityRenderer::new); bind(FUNNEL, SmartTileEntityRenderer::new); - bind(REALITY_FUNNEL, SmartTileEntityRenderer::new); + bind(REALITY_FUNNEL, RealityFunnelRenderer::new); bind(BELT_TUNNEL, BeltTunnelRenderer::new); bind(MECHANICAL_ARM, ArmRenderer::new); bind(BELT_OBSERVER, BeltObserverRenderer::new); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java index b15b3d2f6..909d7760d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java @@ -3,12 +3,14 @@ package com.simibubi.create.content.contraptions.relays.belt.transport; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; import com.simibubi.create.content.logistics.block.realityFunnel.BeltFunnelBlock; +import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InsertingBehaviour; import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; @@ -36,22 +38,32 @@ public class BeltFunnelInteractionHandler { currentItem.beltPosition = segment + .5f; + if (world.isRemote) + return true; if (funnelState.get(BeltFunnelBlock.PUSHING)) return true; if (funnelState.get(BeltFunnelBlock.POWERED)) return true; - InsertingBehaviour behaviour = TileEntityBehaviour.get(world, funnelPos, InsertingBehaviour.TYPE); - FilteringBehaviour filtering = TileEntityBehaviour.get(world, funnelPos, FilteringBehaviour.TYPE); - if (behaviour == null || world.isRemote) + + TileEntity te = world.getTileEntity(funnelPos); + if (!(te instanceof RealityFunnelTileEntity)) + return true; + + RealityFunnelTileEntity funnelTE = (RealityFunnelTileEntity) te; + InsertingBehaviour inserting = TileEntityBehaviour.get(funnelTE, InsertingBehaviour.TYPE); + FilteringBehaviour filtering = TileEntityBehaviour.get(funnelTE, FilteringBehaviour.TYPE); + + if (inserting == null) return true; if (filtering != null && !filtering.test(currentItem.stack)) return true; ItemStack before = currentItem.stack.copy(); - ItemStack remainder = behaviour.insert(before, false); + ItemStack remainder = inserting.insert(before, false); if (before.equals(remainder, false)) return true; + funnelTE.flap(true); currentItem.stack = remainder; beltInventory.belt.sendData(); return true; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java new file mode 100644 index 000000000..49955aeaf --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java @@ -0,0 +1,68 @@ +package com.simibubi.create.content.logistics.block.realityFunnel; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.SuperByteBuffer; +import com.simibubi.create.foundation.utility.VecHelper; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; + +public class RealityFunnelRenderer extends SmartTileEntityRenderer { + + public RealityFunnelRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(RealityFunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + super.renderSafe(te, partialTicks, ms, buffer, light, overlay); + + if (!te.hasFlap()) + return; + + IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid()); + SuperByteBuffer flapBuffer = AllBlockPartials.BELT_FUNNEL_FLAP.renderOn(te.getBlockState()); + Vec3d pivot = VecHelper.voxelSpace(0, 10, 9.5f); + MatrixStacker msr = MatrixStacker.of(ms); + + float horizontalAngle = AngleHelper.horizontalAngle(RealityFunnelBlock.getFunnelFacing(te.getBlockState()) + .getOpposite()); + float f = te.flap.get(partialTicks); + + ms.push(); + msr.centre() + .rotateY(horizontalAngle) + .unCentre(); + + for (int segment = 0; segment <= 3; segment++) { + ms.push(); + + float intensity = segment == 3 ? 1.5f : segment + 1; + float abs = Math.abs(f); + float flapAngle = MathHelper.sin((float) ((1 - abs) * Math.PI * intensity)) * 30 * -f; + if (f > 0) + flapAngle *= .5f; + + msr.translate(pivot) + .rotateX(flapAngle) + .translateBack(pivot); + + flapBuffer.light(light) + .renderInto(ms, vb); + + ms.pop(); + ms.translate(-3 / 16f, 0, 0); + } + ms.pop(); + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelTileEntity.java index 4e13c7819..1f28ccc85 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelTileEntity.java @@ -8,6 +8,8 @@ import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; +import com.simibubi.create.content.logistics.block.realityFunnel.BeltFunnelBlock.Shape; +import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour; @@ -19,6 +21,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InventoryMa import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -30,12 +33,18 @@ public class RealityFunnelTileEntity extends SmartTileEntity { private InsertingBehaviour inserting; private ExtractingBehaviour extracting; + int sendFlap; + InterpolatedChasingValue flap; + static enum Mode { INVALID, PAUSED, COLLECT, BELT, CHUTE_SIDE, CHUTE_END } public RealityFunnelTileEntity(TileEntityType tileEntityTypeIn) { super(tileEntityTypeIn); + flap = new InterpolatedChasingValue().start(.25f) + .target(0) + .withSpeed(.05f); } public Mode determineCurrentMode() { @@ -68,6 +77,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { public void tickAsBeltFunnel() { BlockState blockState = getBlockState(); Direction facing = blockState.get(BeltFunnelBlock.HORIZONTAL_FACING); + flap.tick(); if (world.isRemote) return; @@ -90,7 +100,11 @@ public class RealityFunnelTileEntity extends SmartTileEntity { if (!inputBehaviour.canInsertFromSide(facing)) return; - extracting.setCallback(stack -> inputBehaviour.handleInsertion(stack, facing, false)); + extracting.setCallback(stack -> { + flap(false); + inputBehaviour.handleInsertion(stack, facing, false); + }); + extracting.withAdditionalFilter(stack -> inputBehaviour.handleInsertion(stack, facing, true) .isEmpty()); extracting.extract(); @@ -104,6 +118,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { if (remainder.equals(stack.stack, false)) return null; List list = new ArrayList<>(); + flap(true); if (remainder.isEmpty()) return list; TransportedItemStack changed = stack.copy(); @@ -120,16 +135,48 @@ public class RealityFunnelTileEntity extends SmartTileEntity { inserting = new InsertingBehaviour(this, direction); extracting = new ExtractingBehaviour(this, direction); - filtering = new FilteringBehaviour(this, new FunnelFilterSlotPositioning()); + filtering = new FilteringBehaviour(this, new FunnelFilterSlotPositioning()).showCountWhen(() -> { + BlockState blockState = getBlockState(); + return blockState.getBlock() instanceof HorizontalInteractionFunnelBlock + && blockState.get(HorizontalInteractionFunnelBlock.PUSHING); + }); behaviours.add(filtering); behaviours.add(inserting); behaviours.add(extracting); } + public void flap(boolean inward) { + sendFlap = inward ? 1 : -1; + sendData(); + } + + public boolean hasFlap() { + return AllBlocks.BELT_FUNNEL.has(getBlockState()) + && getBlockState().get(BeltFunnelBlock.SHAPE) == Shape.RETRACTED; + } + + @Override + public CompoundNBT writeToClient(CompoundNBT compound) { + if (sendFlap != 0) { + compound.putInt("Flap", sendFlap); + sendFlap = 0; + } + return super.writeToClient(compound); + } + + @Override + public void readClientUpdate(CompoundNBT tag) { + if (tag.contains("Flap")) { + int direction = tag.getInt("Flap"); + flap.set(direction); + } + super.readClientUpdate(tag); + } + @Override public double getMaxRenderDistanceSquared() { - return 64; + return hasFlap() ? super.getMaxRenderDistanceSquared() : 64; } } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java index 630ed13b3..3bda767f3 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java @@ -138,12 +138,19 @@ public class ValueBox extends ChasingAABBOutline { ms.translate(17.5f, -5f, 7f); boolean isFilter = stack.getItem() instanceof FilterItem; + boolean isEmpty = stack.isEmpty(); + float scale = 1.5f; + ms.translate(-font.getStringWidth(countString), 0, 0); + if (isFilter) ms.translate(3, 8, 7.25f); + else if (isEmpty) { + ms.translate(-17, -2, 3f); + scale = 2f; + } else - ms.translate(-7 - font.getStringWidth(countString), 10, 10 + 1 / 4f); + ms.translate(-7, 10, 10 + 1 / 4f); - float scale = 1.5f; ms.scale(scale, scale, scale); drawString(ms, buffer, countString, 0, 0, isFilter ? 0xFFFFFF : 0xEDEDED); ms.translate(0, 0, -1 / 16f); diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringBehaviour.java index e47b2cb6b..1f4fc520a 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringBehaviour.java @@ -30,6 +30,7 @@ public class FilteringBehaviour extends TileEntityBehaviour { public int count; private Consumer callback; private Supplier isActive; + private Supplier showCountPredicate; int scrollableValue; int ticksUntilScrollPacket; @@ -40,11 +41,13 @@ public class FilteringBehaviour extends TileEntityBehaviour { filter = ItemStack.EMPTY; slotPositioning = slot; showCount = false; - callback = stack -> {}; + callback = stack -> { + }; isActive = () -> true; textShift = Vec3d.ZERO; count = 0; ticksUntilScrollPacket = -1; + showCountPredicate = () -> showCount; } @Override @@ -95,12 +98,17 @@ public class FilteringBehaviour extends TileEntityBehaviour { callback = filterCallback; return this; } - + public FilteringBehaviour onlyActiveWhen(Supplier condition) { isActive = condition; return this; } + public FilteringBehaviour showCountWhen(Supplier condition) { + showCountPredicate = condition; + return this; + } + public FilteringBehaviour showCount() { showCount = true; return this; @@ -143,7 +151,7 @@ public class FilteringBehaviour extends TileEntityBehaviour { } public boolean isCountVisible() { - return showCount && !getFilter().isEmpty(); + return showCountPredicate.get(); } public boolean test(ItemStack stack) { @@ -168,7 +176,7 @@ public class FilteringBehaviour extends TileEntityBehaviour { public boolean anyAmount() { return count == 0; } - + public boolean isActive() { return isActive.get(); } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java index 4fa82b5e0..1128431b9 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringHandler.java @@ -99,9 +99,6 @@ public class FilteringHandler { if (!filtering.testHit(objectMouseOver.getHitVec())) return false; ItemStack filterItem = filtering.getFilter(); - if (filterItem.isEmpty()) - return false; - filtering.ticksUntilScrollPacket = 10; int maxAmount = (filterItem.getItem() instanceof FilterItem) ? 64 : filterItem.getMaxStackSize(); filtering.scrollableValue = diff --git a/src/main/resources/assets/create/models/block/belt_funnel/block_extended.json b/src/main/resources/assets/create/models/block/belt_funnel/block_extended.json index bbdb5514d..06b398e96 100644 --- a/src/main/resources/assets/create/models/block/belt_funnel/block_extended.json +++ b/src/main/resources/assets/create/models/block/belt_funnel/block_extended.json @@ -41,7 +41,7 @@ "north": {"uv": [8, 5.5, 9, 13.5], "texture": "#4"}, "east": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, "south": {"uv": [15, 5.5, 16, 13.5], "texture": "#4"}, - "west": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, "up": {"uv": [14, 0, 16, 6], "texture": "#2"} } }, @@ -52,7 +52,7 @@ "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 0]}, "faces": { "north": {"uv": [15, 5.5, 16, 13.5], "texture": "#4"}, - "east": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, "south": {"uv": [16, 5.5, 15, 13.5], "texture": "#4"}, "west": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, "up": {"uv": [16, 0, 14, 6], "texture": "#2"} @@ -119,20 +119,21 @@ }, { "name": "BackBottom", - "from": [4, -3, 16], - "to": [12, 7, 31], + "from": [3.9, -3, 16], + "to": [12.1, 7, 26], "rotation": {"angle": -22.5, "axis": "x", "origin": [8, -5, 17]}, "faces": { - "east": {"uv": [0, 0, 5, 7.5], "rotation": 270, "texture": "#4"}, - "west": {"uv": [0, 0, 5, 7.5], "rotation": 90, "texture": "#4"}, - "up": {"uv": [0, 10, 7.5, 14], "rotation": 270, "texture": "#4"}, - "down": {"uv": [0, 10, 7.5, 14], "rotation": 270, "texture": "#4"} + "east": {"uv": [9.5, 11, 14.5, 16], "rotation": 270, "texture": "#4"}, + "south": {"uv": [1.5, 10, 6.5, 14], "rotation": 90, "texture": "#4"}, + "west": {"uv": [9.5, 11, 14.5, 16], "rotation": 270, "texture": "#4"}, + "up": {"uv": [2.5, 10, 7.5, 14], "rotation": 270, "texture": "#4"}, + "down": {"uv": [0, 10, 5, 14], "rotation": 270, "texture": "#4"} } }, { "name": "Back", - "from": [3, -4, 14], - "to": [13, 13, 17], + "from": [2.9, -4.1, 14], + "to": [13.1, 13.1, 17], "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 6]}, "faces": { "east": {"uv": [5, 0, 6.5, 8.5], "texture": "#4"}, @@ -174,62 +175,6 @@ "west": {"uv": [5, 14.5, 0, 16], "texture": "#4"}, "up": {"uv": [0, 15, 5.5, 14.5], "rotation": 270, "texture": "#4"} } - }, - { - "name": "F4", - "from": [11, -3, 1], - "to": [14, 10, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [-24.5, -7.5, 1]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F5", - "from": [5, -3, 1], - "to": [8, 10, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [-30.5, -7.5, 1]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F5", - "from": [8, -3, 1], - "to": [11, 10, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [-24.5, -7.5, 1]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F6", - "from": [2, -3, 1], - "to": [5, 10, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [-30.5, -7.5, 1]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } } ], "display": { @@ -290,17 +235,6 @@ "children": [9, 10, 11, 12, 13] } ] - }, - { - "name": "flap", - "origin": [8, 8, 8], - "children": [ - { - "name": "Flap", - "origin": [8, 8, 8], - "children": [14, 15, 16, 17] - } - ] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/belt_funnel/block_retracted.json b/src/main/resources/assets/create/models/block/belt_funnel/block_retracted.json index 336419898..7da170c36 100644 --- a/src/main/resources/assets/create/models/block/belt_funnel/block_retracted.json +++ b/src/main/resources/assets/create/models/block/belt_funnel/block_retracted.json @@ -41,7 +41,7 @@ "north": {"uv": [8, 5.5, 9, 13.5], "texture": "#4"}, "east": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, "south": {"uv": [15, 5.5, 16, 13.5], "texture": "#4"}, - "west": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, "up": {"uv": [14, 0, 16, 6], "texture": "#2"} } }, @@ -52,7 +52,7 @@ "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, "faces": { "north": {"uv": [15, 5.5, 16, 13.5], "texture": "#4"}, - "east": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 6, 16, 12], "rotation": 90, "texture": "#2"}, "south": {"uv": [16, 5.5, 15, 13.5], "texture": "#4"}, "west": {"uv": [0, 12, 16, 6], "rotation": 90, "texture": "#2"}, "up": {"uv": [16, 0, 14, 6], "texture": "#2"} @@ -119,20 +119,22 @@ }, { "name": "BackBottom", - "from": [4, -5, 16], - "to": [12, 5, 31], + "from": [3.9, -5, 16], + "to": [12.1, 5, 26], "rotation": {"angle": -22.5, "axis": "x", "origin": [8, -5, 17]}, "faces": { - "east": {"uv": [0, 0, 5, 7.5], "rotation": 270, "texture": "#4"}, - "west": {"uv": [0, 0, 5, 7.5], "rotation": 90, "texture": "#4"}, - "up": {"uv": [0, 10, 7.5, 14], "rotation": 270, "texture": "#4"}, - "down": {"uv": [0, 10, 7.5, 14], "rotation": 270, "texture": "#4"} + "north": {"uv": [1.5, 10, 6.5, 14], "rotation": 90, "texture": "#4"}, + "east": {"uv": [9.5, 11, 14.5, 16], "rotation": 270, "texture": "#4"}, + "south": {"uv": [1.5, 10, 6.5, 14], "rotation": 90, "texture": "#4"}, + "west": {"uv": [9.5, 11, 14.5, 16], "rotation": 270, "texture": "#4"}, + "up": {"uv": [2.5, 10, 7.5, 14], "rotation": 270, "texture": "#4"}, + "down": {"uv": [1, 10, 6, 14], "rotation": 270, "texture": "#4"} } }, { "name": "Back", - "from": [3, -4, 16], - "to": [13, 13, 19], + "from": [2.9, -4.1, 16], + "to": [13.1, 13.1, 19], "rotation": {"angle": 0, "axis": "y", "origin": [8, -8, 8]}, "faces": { "east": {"uv": [5, 0, 6.5, 8.5], "texture": "#4"}, @@ -174,62 +176,6 @@ "west": {"uv": [1, 14.5, 0, 16], "texture": "#4"}, "up": {"uv": [0, 15, 1, 14.5], "rotation": 270, "texture": "#4"} } - }, - { - "name": "F4", - "from": [11, -3, 9], - "to": [14, 10, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [-24.5, -7.5, 9]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F5", - "from": [5, -3, 9], - "to": [8, 10, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [-30.5, -7.5, 9]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F5", - "from": [8, -3, 9], - "to": [11, 10, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [-24.5, -7.5, 9]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } - }, - { - "name": "F6", - "from": [2, -3, 9], - "to": [5, 10, 10], - "rotation": {"angle": 0, "axis": "y", "origin": [-30.5, -7.5, 9]}, - "faces": { - "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, - "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, - "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, - "up": {"uv": [6.5, 0, 8, 0.5], "texture": "#4"}, - "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} - } } ], "display": { @@ -290,17 +236,6 @@ "children": [9, 10, 11, 12, 13] } ] - }, - { - "name": "flap", - "origin": [8, 8, 8], - "children": [ - { - "name": "Flap", - "origin": [8, 8, 8], - "children": [14, 15, 16, 17] - } - ] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/belt_funnel/flap.json b/src/main/resources/assets/create/models/block/belt_funnel/flap.json new file mode 100644 index 000000000..f00cc83a2 --- /dev/null +++ b/src/main/resources/assets/create/models/block/belt_funnel/flap.json @@ -0,0 +1,21 @@ +{ + "textures": { + "4": "create:block/funnel_plating" + }, + "elements": [ + { + "name": "F4", + "from": [11, -3, 9], + "to": [14, 10, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [-24.5, -7.5, 9]}, + "faces": { + "north": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, + "east": {"uv": [6.5, 0, 7, 6.5], "texture": "#4"}, + "south": {"uv": [6.5, 0, 8, 6.5], "texture": "#4"}, + "west": {"uv": [7.5, 0, 8, 6.5], "texture": "#4"}, + "up": {"uv": [6.5, 0, 8, 0.5], "rotation": 180, "texture": "#4"}, + "down": {"uv": [6.5, 6, 8, 6.5], "rotation": 180, "texture": "#4"} + } + } + ] +} \ No newline at end of file