From 6db4119afa76b3955ad1824beec0037e184df987 Mon Sep 17 00:00:00 2001 From: trinsdar <30245301+Trinsdar@users.noreply.github.com> Date: Fri, 4 Aug 2023 23:15:19 -0400 Subject: [PATCH] updated antimatter, pretty much finished oil drilling rig --- AntimatterAPI | 2 +- .../tile/multi/TileEntityOilDrillingRig.java | 112 ++++++++++- .../gregtech/tile/single/TileEntityPump.java | 6 +- .../overlay/oil_drilling_rig/north.json | 15 +- .../overlay/oil_drilling_rig/south.json | 184 ++++++++++-------- 5 files changed, 221 insertions(+), 98 deletions(-) diff --git a/AntimatterAPI b/AntimatterAPI index d087ec0862..a2a0ff42c8 160000 --- a/AntimatterAPI +++ b/AntimatterAPI @@ -1 +1 @@ -Subproject commit d087ec086203071ad4072564139de674e67072b4 +Subproject commit a2a0ff42c88ff7746cbd72ce643a17d6c78594c8 diff --git a/common/src/main/java/muramasa/gregtech/tile/multi/TileEntityOilDrillingRig.java b/common/src/main/java/muramasa/gregtech/tile/multi/TileEntityOilDrillingRig.java index 05ec871e43..1f2539f9e4 100644 --- a/common/src/main/java/muramasa/gregtech/tile/multi/TileEntityOilDrillingRig.java +++ b/common/src/main/java/muramasa/gregtech/tile/multi/TileEntityOilDrillingRig.java @@ -1,12 +1,26 @@ package muramasa.gregtech.tile.multi; +import com.mojang.blaze3d.vertex.PoseStack; +import earth.terrarium.botarium.common.fluid.base.FluidHolder; +import muramasa.antimatter.capability.machine.MultiMachineEnergyHandler; +import muramasa.antimatter.gui.GuiInstance; +import muramasa.antimatter.gui.ICanSyncData; +import muramasa.antimatter.gui.IGuiElement; import muramasa.antimatter.gui.SlotType; +import muramasa.antimatter.gui.widget.InfoRenderWidget; +import muramasa.antimatter.gui.widget.WidgetSupplier; +import muramasa.antimatter.integration.jeirei.renderer.IInfoRenderer; import muramasa.antimatter.machine.MachineState; +import muramasa.antimatter.machine.event.MachineEvent; import muramasa.antimatter.machine.types.Machine; import muramasa.antimatter.tile.multi.TileEntityMultiMachine; import muramasa.antimatter.util.int3; import muramasa.gregtech.data.GregTechData; +import muramasa.gregtech.worldgen.OilSpoutEntry; +import muramasa.gregtech.worldgen.OilSpoutSavedData; +import net.minecraft.client.gui.Font; import net.minecraft.core.BlockPos; +import net.minecraft.core.SectionPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; @@ -20,16 +34,23 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.material.FluidState; +import tesseract.FluidPlatformUtils; +import tesseract.TesseractGraphWrappers; import javax.annotation.Nullable; +import static muramasa.antimatter.gui.ICanSyncData.SyncDirection.SERVER_TO_CLIENT; import static muramasa.gregtech.data.GregTechData.MINING_PIPE; import static muramasa.gregtech.data.GregTechData.MINING_PIPE_THIN; public class TileEntityOilDrillingRig extends TileEntityMultiMachine { boolean foundBottom = false; boolean stopped = false; + int euPerTick; + int cycle = 160; + int progress = 0; BlockPos.MutableBlockPos miningPos; + OilSpoutEntry oilEntry = null; public TileEntityOilDrillingRig(Machine type, BlockPos pos, BlockState state) { super(type, pos, state); @@ -39,14 +60,16 @@ public TileEntityOilDrillingRig(Machine type, BlockPos pos, BlockState state) @Override public void serverTick(Level level, BlockPos pos, BlockState state) { super.serverTick(level, pos, state); - if (!validStructure) return; + if (!validStructure || stopped || !(level instanceof ServerLevel serverLevel)) return; ItemStack stack = itemHandler.map(i -> i.getHandler(SlotType.STORAGE).getStackInSlot(0)).orElse(ItemStack.EMPTY); - if (stack.getItem() == GregTechData.MINING_PIPE_THIN.asItem() || foundBottom){ + if ((stack.getItem() == GregTechData.MINING_PIPE_THIN.asItem() || foundBottom) && energyHandler.map(e -> e.getEnergy() >= euPerTick).orElse(false)){ if (!foundBottom){ - if (getMachineState() != MachineState.ACTIVE) setMachineState(MachineState.ACTIVE); + if (getMachineState() == MachineState.IDLE) setMachineState(MachineState.ACTIVE); + energyHandler.ifPresent(e -> e.extractInternal(euPerTick, false)); + if (level.getGameTime() % 40 != 0) return; - if (!stopped) miningPos.below(); + miningPos.below(); BlockState block = level.getBlockState(miningPos); @@ -60,6 +83,22 @@ public void serverTick(Level level, BlockPos pos, BlockState state) { return; } stack.shrink(1); + } else { + if (oilEntry == null){ + OilSpoutSavedData.getOrCreate(serverLevel).setDirty(); + oilEntry = OilSpoutSavedData.getOrCreate(serverLevel).getFluidVeinWorldEntry(SectionPos.blockToSectionCoord(this.getBlockPos().getX()), SectionPos.blockToSectionCoord(this.getBlockPos().getZ())); + } + if (oilEntry.getFluid() == null) return; + energyHandler.ifPresent(e -> e.extractInternal(euPerTick, false)); + if (++progress == cycle){ + progress = 0; + FluidHolder fluidHolder = FluidPlatformUtils.createFluidStack(oilEntry.getFluid().fluid(), oilEntry.getCurrentYield() * TesseractGraphWrappers.dropletMultiplier); + if (fluidHandler.map(f -> f.fillOutput(fluidHolder, true) == oilEntry.getCurrentYield() * TesseractGraphWrappers.dropletMultiplier).orElse(false)){ + fluidHandler.ifPresent(f -> f.fillOutput(fluidHolder, false)); + onMachineEvent(MachineEvent.FLUIDS_OUTPUTTED); + oilEntry.decreaseLevel(); + } + } } } else { if (getMachineState() == MachineState.ACTIVE) setMachineState(MachineState.IDLE); @@ -99,17 +138,78 @@ public boolean destroyBlock(Level level, BlockPos pos, boolean dropBlock, @Nulla } } + @Override + public void afterStructureFormed() { + super.afterStructureFormed(); + this.energyHandler.ifPresent(e -> { + int tier = ((MultiMachineEnergyHandler) e).getAccumulatedPower().getIntegerId(); + this.euPerTick = 3 * (1 << (tier << 1)); + this.cycle = (int) (160 * (tier == 0 ? 2 : Math.pow(0.5, tier - 1))); + }); + } + @Override public void saveAdditional(CompoundTag tag) { super.saveAdditional(tag); tag.putBoolean("foundBottom", foundBottom); tag.putLong("miningPos", miningPos.asLong()); + tag.putInt("progress", progress); } @Override - public void load(CompoundTag tag) { - super.load(tag); + public void load(CompoundTag nbt) { + super.load(nbt); this.foundBottom = nbt.getBoolean("foundBottom"); this.miningPos = BlockPos.of(nbt.getLong("miningPos")).mutable(); + this.progress = nbt.getInt("progress"); + } + + @Override + public WidgetSupplier getInfoWidget() { + return OilInfoWidget.build().setPos(10, 10); + } + + @Override + public int drawInfo(InfoRenderWidget.MultiRenderWidget instance, PoseStack stack, Font renderer, int left, int top) { + OilInfoWidget oilInfoWidget = (OilInfoWidget) instance; + renderer.draw(stack, this.getDisplayName().getString(), left, top, 16448255); + if (getMachineState() != MachineState.ACTIVE) { + renderer.draw(stack, "Inactive.", left, top + 8, 16448255); + return 16; + } else if (instance.drawActiveInfo()) { + if (oilInfoWidget.foundBottom){ + renderer.draw(stack, "Progress: " + instance.currentProgress + "/" + instance.maxProgress, left, top + 8, 16448255); + return 16; + } else if (oilInfoWidget.stopped){ + renderer.draw(stack, "Can't mine at: " + oilInfoWidget.currentPos.toString(), left, top + 8, 16448255); + return 16; + } + } + return 8; + } + + public static class OilInfoWidget extends InfoRenderWidget.MultiRenderWidget { + BlockPos currentPos; + boolean stopped; + boolean foundBottom; + + + protected OilInfoWidget(GuiInstance gui, IGuiElement parent, IInfoRenderer renderer) { + super(gui, parent, renderer); + } + + @Override + public void init() { + TileEntityOilDrillingRig m = (TileEntityOilDrillingRig) gui.handler; + gui.syncLong(() -> m.miningPos.asLong(), l -> currentPos = BlockPos.of(l), SERVER_TO_CLIENT); + gui.syncBoolean(() -> m.stopped, s -> stopped = s, SERVER_TO_CLIENT); + gui.syncBoolean(() -> m.foundBottom, b -> foundBottom = b, SERVER_TO_CLIENT); + gui.syncInt(() -> m.progress, i -> currentProgress = i, SERVER_TO_CLIENT); + gui.syncInt(() -> m.cycle, i -> maxProgress = i, SERVER_TO_CLIENT); + } + + public static WidgetSupplier build() { + return builder((a, b) -> new OilInfoWidget(a, b, (IInfoRenderer) a.handler)); + } } } diff --git a/common/src/main/java/muramasa/gregtech/tile/single/TileEntityPump.java b/common/src/main/java/muramasa/gregtech/tile/single/TileEntityPump.java index 919590819e..e801b02ff0 100644 --- a/common/src/main/java/muramasa/gregtech/tile/single/TileEntityPump.java +++ b/common/src/main/java/muramasa/gregtech/tile/single/TileEntityPump.java @@ -112,11 +112,7 @@ private Boolean drainFluid(BlockPos aCoords) { } // Consume Energy based on Fluid Amount absorbed. - energyHandler.ifPresent(e -> { - GTTransaction transaction = e.extract(GTTransaction.Mode.INTERNAL); - transaction.addData(getMachineTier().getVoltage() / 2, Utils.sink()); - transaction.commit(); - }); + energyHandler.ifPresent(e -> e.extractInternal(getMachineTier().getVoltage() / 2, false)); // If there is a Fluid Block above this one, clearly the Y-Level is off due to a recent Blockchange! Scan again! if (mPumpedFluids.contains(level.getFluidState(aCoords).getType())) return false; // Somehow this Block is completely surrounded by pumpable Fluid, this should not be possible unless it is the literal Cornercase! Scan again! diff --git a/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/north.json b/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/north.json index d279c7a3e7..0e3b89d45b 100644 --- a/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/north.json +++ b/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/north.json @@ -1,17 +1,20 @@ { + "credit": "Made with Blockbench", "elements": [ { - "from": [0, 0, 16], - "to": [16, 16, 16], + "from": [0, 0, 0], + "to": [16, 16, 0], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "south": {"uv": [0, 0, 16, 16], "texture": "#base", "tintindex": 0} + "north": {"uv": [0, 0, 16, 16], "texture": "#base", "tintindex": 0} } }, { - "from": [0, 0, 16], - "to": [16, 16, 16], + "from": [0, 0, 0], + "to": [16, 16, 0], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "south": {"uv": [0, 0, 16, 16], "texture": "#overlay", "tintindex": 1} + "north": {"uv": [0, 0, 16, 16], "texture": "#overlay", "tintindex": 1} } } ] diff --git a/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/south.json b/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/south.json index 8d2eed3094..b867825f88 100644 --- a/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/south.json +++ b/common/src/main/resources/assets/gti/models/block/machine/overlay/oil_drilling_rig/south.json @@ -1,175 +1,199 @@ { + "credit": "Made with Blockbench", "elements": [ { - "from": [3, 6, 0.498], - "to": [13, 13, 0.498], + "from": [3, 6, 15.502], + "to": [13, 13, 15.502], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [3, 3, 13, 10], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [3, 3, 13, 10], "texture": "#overlay", "tintindex": 1} } }, { - "from": [9, 13, 0], - "to": [14, 14, 0.5], + "from": [2, 13, 15.5], + "to": [7, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 2, 7, 3], "texture": "#overlay", "tintindex": 1}, - "down": {"uv": [2, 2, 7, 2.5], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [2, 2, 7, 3], "texture": "#overlay", "tintindex": 1}, + "down": {"uv": [2, 2, 7, 2.5], "rotation": 180, "texture": "#overlay", "tintindex": 1} } }, { - "from": [2, 13, 0], - "to": [7, 14, 0.5], + "from": [9, 13, 15.5], + "to": [14, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [9, 2, 14, 3], "texture": "#overlay", "tintindex": 1}, - "down": {"uv": [9, 2, 14, 2.5], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [9, 2, 14, 3], "texture": "#overlay", "tintindex": 1}, + "down": {"uv": [9, 2, 14, 2.5], "rotation": 180, "texture": "#overlay", "tintindex": 1} } }, { - "from": [13, 6, 0], - "to": [14, 13, 0.5], + "from": [2, 6, 15.5], + "to": [3, 13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 3, 3, 10], "texture": "#overlay", "tintindex": 1}, - "west": {"uv": [2, 3, 2.5, 10], "texture": "#overlay", "tintindex": 1} + "east": {"uv": [2, 3, 2.5, 10], "texture": "#overlay", "tintindex": 1}, + "south": {"uv": [2, 3, 3, 10], "texture": "#overlay", "tintindex": 1} } }, { - "from": [2, 8, 0], - "to": [3, 13, 0.5], + "from": [13, 8, 15.5], + "to": [14, 13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [13, 3, 14, 8], "texture": "#overlay", "tintindex": 1}, - "east": {"uv": [13, 3, 13.5, 8], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [13, 3, 14, 8], "texture": "#overlay", "tintindex": 1}, + "west": {"uv": [13, 3, 13.5, 8], "texture": "#overlay", "tintindex": 1} } }, { - "from": [2, 7, 0], - "to": [7, 8, 0.5], + "from": [9, 7, 15.5], + "to": [14, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [9, 8, 14, 9], "texture": "#overlay", "tintindex": 1}, - "up": {"uv": [9, 8, 14, 8.5], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [9, 8, 14, 9], "texture": "#overlay", "tintindex": 1}, + "up": {"uv": [9, 8, 14, 8.5], "rotation": 180, "texture": "#overlay", "tintindex": 1} } }, { - "from": [9, 5, 0], - "to": [14, 6, 0.5], + "from": [2, 5, 15.5], + "to": [7, 6, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 10, 7, 11], "texture": "#overlay", "tintindex": 1}, - "up": {"uv": [2, 10, 7, 10.5], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [2, 10, 7, 11], "texture": "#overlay", "tintindex": 1}, + "up": {"uv": [2, 10, 7, 10.5], "rotation": 180, "texture": "#overlay", "tintindex": 1} } }, { - "from": [2, 2, 0], - "to": [14, 4, 0.01], + "from": [2, 2, 15.99], + "to": [14, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 12, 14, 14], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [2, 12, 14, 14], "texture": "#overlay", "tintindex": 1} } }, { - "from": [3, 4, 0], - "to": [4, 7, 0.01], + "from": [12, 4, 15.99], + "to": [13, 7, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [12, 9, 13, 12], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [12, 9, 13, 12], "texture": "#overlay", "tintindex": 1} } }, { - "from": [5, 5, 0], - "to": [6, 7, 0.01], + "from": [10, 5, 15.99], + "to": [11, 7, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [10, 9, 11, 11], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [10, 9, 11, 11], "texture": "#overlay", "tintindex": 1} } }, { - "from": [6, 5, 0], - "to": [9, 6, 0.01], + "from": [7, 5, 15.99], + "to": [10, 6, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [7, 10, 10, 11], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [7, 10, 10, 11], "texture": "#overlay", "tintindex": 1} } }, { - "from": [0, 0, 0], - "to": [16, 2, 0.01], + "from": [0, 0, 15.99], + "to": [16, 2, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [0, 14, 16, 16], "texture": "#base", "tintindex": 0} + "south": {"uv": [0, 14, 16, 16], "texture": "#base", "tintindex": 0} } }, { - "from": [0, 14, 0], - "to": [16, 16, 0.01], + "from": [0, 14, 15.99], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [0, 0, 16, 2], "texture": "#base", "tintindex": 0} + "south": {"uv": [0, 0, 16, 2], "texture": "#base", "tintindex": 0} } }, { - "from": [14, 2, 0], - "to": [16, 14, 0.01], + "from": [0, 2, 15.99], + "to": [2, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [0, 2, 2, 14], "texture": "#base", "tintindex": 0} + "south": {"uv": [0, 2, 2, 14], "texture": "#base", "tintindex": 0} } }, { - "from": [0, 2, 0], - "to": [2, 14, 0.01], + "from": [14, 2, 15.99], + "to": [16, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [14, 2, 16, 14], "texture": "#base", "tintindex": 0} + "south": {"uv": [14, 2, 16, 14], "texture": "#base", "tintindex": 0} } }, { - "from": [7, 6, 0], - "to": [9, 14, 0.01], + "from": [7, 6, 15.99], + "to": [9, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [7, 2, 9, 10], "texture": "#base", "tintindex": 0} + "south": {"uv": [7, 2, 9, 10], "texture": "#base", "tintindex": 0} } }, { - "from": [4, 4, 0], - "to": [14, 5, 0.01], + "from": [2, 4, 15.99], + "to": [12, 5, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 11, 12, 12], "texture": "#base", "tintindex": 0} + "south": {"uv": [2, 11, 12, 12], "texture": "#base", "tintindex": 0} } }, { - "from": [2, 4, 0], - "to": [3, 7, 0.01], + "from": [13, 4, 15.99], + "to": [14, 7, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [13, 9, 14, 12], "texture": "#base", "tintindex": 0} + "south": {"uv": [13, 9, 14, 12], "texture": "#base", "tintindex": 0} } }, { - "from": [4, 5, 0], - "to": [5, 7, 0.01], + "from": [11, 5, 15.99], + "to": [12, 7, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [11, 9, 12, 11], "texture": "#base", "tintindex": 0} + "south": {"uv": [11, 9, 12, 11], "texture": "#base", "tintindex": 0} } }, { - "from": [6, 6, 0], - "to": [7, 7, 0.01], + "from": [9, 6, 15.99], + "to": [10, 7, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [9, 9, 10, 10], "texture": "#base", "tintindex": 0} + "south": {"uv": [9, 9, 10, 10], "texture": "#base", "tintindex": 0} } }, { - "from": [6, 8, 0], - "to": [7, 13, 0.5], + "from": [9, 8, 15.5], + "to": [10, 13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [9, 3, 10, 8], "texture": "#overlay", "tintindex": 1}, - "east": {"uv": [13, 3, 13.5, 8], "texture": "#overlay", "tintindex": 1}, - "west": {"uv": [9, 3, 9.5, 8], "texture": "#overlay", "tintindex": 1} + "east": {"uv": [9, 3, 9.5, 8], "texture": "#overlay", "tintindex": 1}, + "south": {"uv": [9, 3, 10, 8], "texture": "#overlay", "tintindex": 1}, + "west": {"uv": [13, 3, 13.5, 8], "texture": "#overlay", "tintindex": 1} } }, { - "from": [9, 6, 0], - "to": [10, 13, 0.5], + "from": [6, 6, 15.5], + "to": [7, 13, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [2, 3, 3, 10], "texture": "#overlay", "tintindex": 1}, - "east": {"uv": [6, 3, 6.5, 10], "texture": "#overlay", "tintindex": 1}, - "west": {"uv": [2, 3, 2.5, 10], "texture": "#overlay", "tintindex": 1} + "east": {"uv": [2, 3, 2.5, 10], "texture": "#overlay", "tintindex": 1}, + "south": {"uv": [2, 3, 3, 10], "texture": "#overlay", "tintindex": 1}, + "west": {"uv": [6, 3, 6.5, 10], "texture": "#overlay", "tintindex": 1} } }, { - "from": [10, 9, 0], - "to": [13, 10, 0.5], + "from": [3, 9, 15.5], + "to": [6, 10, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { - "north": {"uv": [3, 6, 6, 7], "texture": "#overlay", "tintindex": 1}, - "down": {"uv": [2, 2, 7, 2.5], "texture": "#overlay", "tintindex": 1} + "south": {"uv": [3, 6, 6, 7], "texture": "#overlay", "tintindex": 1}, + "down": {"uv": [2, 2, 7, 2.5], "rotation": 180, "texture": "#overlay", "tintindex": 1} } } ]