From 217138255e3a21eaa28b01854721c00db65776cf Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 19 Jul 2020 00:22:14 +0200 Subject: [PATCH] Tanks, Obama - Reworked fluid tanks to incorporate new assets and functionality --- src/generated/resources/.cache/cache | 4 +- .../assets/create/blockstates/fluid_tank.json | 91 +++- .../assets/create/models/item/fluid_tank.json | 2 +- .../com/simibubi/create/AllBlockPartials.java | 18 - .../java/com/simibubi/create/AllBlocks.java | 11 +- .../java/com/simibubi/create/AllItems.java | 8 +- .../java/com/simibubi/create/AllShapes.java | 3 +- .../com/simibubi/create/AllSpriteShifts.java | 2 +- .../deployer/DeployerFakePlayer.java | 11 +- .../contraptions/fluids/FluidTankBlock.java | 290 +++++++---- .../fluids/FluidTankCTBehaviour.java | 6 +- .../fluids/FluidTankConnectivityHandler.java | 347 +++++++++++++ .../fluids/FluidTankGenerator.java | 44 ++ .../contraptions/fluids/FluidTankItem.java | 97 ++++ .../contraptions/fluids/FluidTankModel.java | 96 ++-- .../fluids/FluidTankRenderer.java | 244 ++------- .../fluids/FluidTankTileEntity.java | 463 +++++++++++++----- .../foundation/block/connected/CTModel.java | 8 +- .../block/connected/CTSpriteShiftEntry.java | 27 +- .../block/connected/CTSpriteShifter.java | 4 +- .../create/foundation/config/CFluids.java | 20 + .../create/foundation/config/CServer.java | 2 + .../create/foundation/data/BlockStateGen.java | 20 - .../create/foundation/fluid/FluidHelper.java | 91 ++++ .../foundation/fluid/FluidRenderer.java | 157 ++++++ .../foundation/fluid/SmartFluidTank.java | 29 ++ .../models/block/fluid_pipe/rim/down.json | 4 +- .../models/block/fluid_pipe/rim/east.json | 4 +- .../models/block/fluid_pipe/rim/north.json | 4 +- .../models/block/fluid_pipe/rim/south.json | 4 +- .../models/block/fluid_pipe/rim/up.json | 4 +- .../models/block/fluid_pipe/rim/west.json | 4 +- .../models/block/fluid_tank/block_bottom.json | 65 ++- .../block/fluid_tank/block_bottom_window.json | 152 ++++++ .../fluid_tank/block_bottom_window_ne.json | 71 +++ .../fluid_tank/block_bottom_window_nw.json | 71 +++ .../fluid_tank/block_bottom_window_se.json | 71 +++ .../fluid_tank/block_bottom_window_sw.json | 71 +++ .../models/block/fluid_tank/block_middle.json | 57 +++ .../block/fluid_tank/block_middle_window.json | 137 ++++++ .../fluid_tank/block_middle_window_ne.json | 56 +++ .../fluid_tank/block_middle_window_nw.json | 56 +++ .../fluid_tank/block_middle_window_se.json | 56 +++ .../fluid_tank/block_middle_window_sw.json | 56 +++ .../models/block/fluid_tank/block_single.json | 119 +++++ .../block/fluid_tank/block_single_window.json | 166 +++++++ .../fluid_tank/block_single_window_ne.json | 100 ++++ .../fluid_tank/block_single_window_nw.json | 100 ++++ .../fluid_tank/block_single_window_se.json | 100 ++++ .../fluid_tank/block_single_window_sw.json | 100 ++++ .../models/block/fluid_tank/block_top.json | 63 ++- .../block/fluid_tank/block_top_window.json | 152 ++++++ .../block/fluid_tank/block_top_window_ne.json | 75 +++ .../block/fluid_tank/block_top_window_nw.json | 75 +++ .../block/fluid_tank/block_top_window_se.json | 75 +++ .../block/fluid_tank/block_top_window_sw.json | 75 +++ .../block/fluid_tank/block_windows.json | 27 - .../diagonal_fillers/north_east.json | 25 - .../diagonal_fillers/north_west.json | 25 - .../diagonal_fillers/south_east.json | 24 - .../diagonal_fillers/south_west.json | 24 - .../create/models/block/fluid_tank/item.json | 56 --- .../fluid_tank/lid_fillers/bottom_east.json | 22 - .../fluid_tank/lid_fillers/bottom_north.json | 22 - .../fluid_tank/lid_fillers/bottom_south.json | 22 - .../fluid_tank/lid_fillers/bottom_west.json | 22 - .../fluid_tank/lid_fillers/top_east.json | 22 - .../fluid_tank/lid_fillers/top_north.json | 22 - .../fluid_tank/lid_fillers/top_south.json | 22 - .../fluid_tank/lid_fillers/top_west.json | 22 - .../create/textures/block/fluid_tank.png | Bin 503 -> 238 bytes .../textures/block/fluid_tank_connected.png | Bin 3227 -> 1610 bytes .../textures/block/fluid_tank_window.png | Bin 0 -> 351 bytes .../block/fluid_tank_window_single.png | Bin 0 -> 210 bytes .../assets/create/textures/block/pump.png | Bin 567 -> 535 bytes 75 files changed, 3637 insertions(+), 958 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankConnectivityHandler.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankGenerator.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankItem.java create mode 100644 src/main/java/com/simibubi/create/foundation/config/CFluids.java create mode 100644 src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java create mode 100644 src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java create mode 100644 src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_ne.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_nw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_se.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_sw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle_window.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_ne.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_nw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_se.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_sw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single_window.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single_window_ne.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single_window_nw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single_window_se.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_single_window_sw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_top_window.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_top_window_ne.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_top_window_nw.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_top_window_se.json create mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_top_window_sw.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/block_windows.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_east.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_west.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_east.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_west.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/item.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_east.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_north.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_south.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_west.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_east.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_north.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_south.json delete mode 100644 src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_west.json create mode 100644 src/main/resources/assets/create/textures/block/fluid_tank_window.png create mode 100644 src/main/resources/assets/create/textures/block/fluid_tank_window_single.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 756a820d0..adae6af0a 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -125,7 +125,7 @@ fc9ac0a7e7191b93516719455a17177fa6524ecc assets\create\blockstates\fancy_weather b2a7c321b1795f20e7433f81a55ce4683de081b8 assets\create\blockstates\fancy_weathered_limestone_bricks_stairs.json 6372fe02ba0065acb0758121c45a15a1a8fdc5de assets\create\blockstates\fancy_weathered_limestone_bricks_wall.json 4cbd66ed3da77d1caad6ef4e657a86b1b4017a39 assets\create\blockstates\fluid_pipe.json -9d0e78a4d6d0ccac37c06d0f5810a800a04844b2 assets\create\blockstates\fluid_tank.json +f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets\create\blockstates\fluid_tank.json e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets\create\blockstates\flywheel.json ac00d40e1ef50a37041c0481afa1a23a14dea78e assets\create\blockstates\framed_glass.json 61df7769fa61f6dd2868a4377e54320fdd473b4e assets\create\blockstates\framed_glass_pane.json @@ -1110,7 +1110,7 @@ ce6ee1fe4a92e26af75c2eaebd5055efdbdff169 assets\create\models\item\fancy_scoria_ 7c1ed1241d55b105f7acb997d7c0e24b4b945293 assets\create\models\item\fancy_weathered_limestone_bricks_stairs.json 7bdb3d8a59586654df0c2a84d73a346b898d247b assets\create\models\item\fancy_weathered_limestone_bricks_wall.json e5e6fb6eb182b85b977e1025a7fe84d46de59320 assets\create\models\item\fluid_pipe.json -04b679a9342b0b5164c9fc8026b8fce5a067d511 assets\create\models\item\fluid_tank.json +e7d2097256fed545064a37d233e7b810b04c26a4 assets\create\models\item\fluid_tank.json 8707332c0cb6ee123e7962d08536a60725c64ce8 assets\create\models\item\flywheel.json d62b93d3c274d280f3eec22a28b5175943411d25 assets\create\models\item\framed_glass.json 1041d462c6e856f7f3f2365c299c0599703d1ed7 assets\create\models\item\framed_glass_pane.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_tank.json b/src/generated/resources/assets/create/blockstates/fluid_tank.json index 886701911..ab140d245 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_tank.json +++ b/src/generated/resources/assets/create/blockstates/fluid_tank.json @@ -1,25 +1,76 @@ { - "multipart": [ - { - "when": { - "top": "true" - }, - "apply": { - "model": "create:block/fluid_tank/block_top" - } + "variants": { + "bottom=false,shape=plain,top=false": { + "model": "create:block/fluid_tank/block_middle" }, - { - "apply": { - "model": "create:block/fluid_tank/block_windows" - } + "bottom=true,shape=plain,top=false": { + "model": "create:block/fluid_tank/block_bottom" }, - { - "when": { - "bottom": "true" - }, - "apply": { - "model": "create:block/fluid_tank/block_bottom" - } + "bottom=false,shape=window,top=false": { + "model": "create:block/fluid_tank/block_middle_window" + }, + "bottom=true,shape=window,top=false": { + "model": "create:block/fluid_tank/block_bottom_window" + }, + "bottom=false,shape=window_nw,top=false": { + "model": "create:block/fluid_tank/block_middle_window_nw" + }, + "bottom=true,shape=window_nw,top=false": { + "model": "create:block/fluid_tank/block_bottom_window_nw" + }, + "bottom=false,shape=window_sw,top=false": { + "model": "create:block/fluid_tank/block_middle_window_sw" + }, + "bottom=true,shape=window_sw,top=false": { + "model": "create:block/fluid_tank/block_bottom_window_sw" + }, + "bottom=false,shape=window_ne,top=false": { + "model": "create:block/fluid_tank/block_middle_window_ne" + }, + "bottom=true,shape=window_ne,top=false": { + "model": "create:block/fluid_tank/block_bottom_window_ne" + }, + "bottom=false,shape=window_se,top=false": { + "model": "create:block/fluid_tank/block_middle_window_se" + }, + "bottom=true,shape=window_se,top=false": { + "model": "create:block/fluid_tank/block_bottom_window_se" + }, + "bottom=false,shape=plain,top=true": { + "model": "create:block/fluid_tank/block_top" + }, + "bottom=true,shape=plain,top=true": { + "model": "create:block/fluid_tank/block_single" + }, + "bottom=false,shape=window,top=true": { + "model": "create:block/fluid_tank/block_top_window" + }, + "bottom=true,shape=window,top=true": { + "model": "create:block/fluid_tank/block_single_window" + }, + "bottom=false,shape=window_nw,top=true": { + "model": "create:block/fluid_tank/block_top_window_nw" + }, + "bottom=true,shape=window_nw,top=true": { + "model": "create:block/fluid_tank/block_single_window_nw" + }, + "bottom=false,shape=window_sw,top=true": { + "model": "create:block/fluid_tank/block_top_window_sw" + }, + "bottom=true,shape=window_sw,top=true": { + "model": "create:block/fluid_tank/block_single_window_sw" + }, + "bottom=false,shape=window_ne,top=true": { + "model": "create:block/fluid_tank/block_top_window_ne" + }, + "bottom=true,shape=window_ne,top=true": { + "model": "create:block/fluid_tank/block_single_window_ne" + }, + "bottom=false,shape=window_se,top=true": { + "model": "create:block/fluid_tank/block_top_window_se" + }, + "bottom=true,shape=window_se,top=true": { + "model": "create:block/fluid_tank/block_single_window_se" } - ] + } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/fluid_tank.json b/src/generated/resources/assets/create/models/item/fluid_tank.json index 2d65e11ce..d79ba75a5 100644 --- a/src/generated/resources/assets/create/models/item/fluid_tank.json +++ b/src/generated/resources/assets/create/models/item/fluid_tank.json @@ -1,3 +1,3 @@ { - "parent": "create:block/fluid_tank/item" + "parent": "create:block/fluid_tank/block_single_window" } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index d2751a015..6dbff9bca 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -8,8 +8,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang3.tuple.Pair; - import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Iterate; @@ -99,8 +97,6 @@ public class AllBlockPartials { FLUID_PIPE_CASING = get("fluid_pipe/casing"); public static final Map PIPE_RIMS = map(); - public static final Map, AllBlockPartials> TANK_LID_FILLERS = map(); - public static final Map, AllBlockPartials> TANK_DIAGONAL_FILLERS = map(); static { populateMaps(); @@ -115,22 +111,8 @@ public class AllBlockPartials { private static void populateMaps() { for (Direction d : Iterate.directions) { - boolean horizontal = d.getAxis() - .isHorizontal(); - PIPE_RIMS.put(d, get("fluid_pipe/rim/" + d.getName())); - - if (horizontal) { - for (boolean top : Iterate.trueAndFalse) - TANK_LID_FILLERS.put(Pair.of(top, d), - get("fluid_tank/lid_fillers/" + (top ? "top" : "bottom") + "_" + d.getName())); - } } - - for (boolean north : Iterate.trueAndFalse) - for (boolean east : Iterate.trueAndFalse) - TANK_DIAGONAL_FILLERS.put(Pair.of(north, east), - get("fluid_tank/diagonal_fillers/" + (north ? "north" : "south") + "_" + (east ? "east" : "west"))); } private static Map map() { diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index e1a041167..e2593fbde 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -53,6 +53,8 @@ import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheel import com.simibubi.create.content.contraptions.fluids.FluidPipeBlock; import com.simibubi.create.content.contraptions.fluids.FluidPipeModel; import com.simibubi.create.content.contraptions.fluids.FluidTankBlock; +import com.simibubi.create.content.contraptions.fluids.FluidTankGenerator; +import com.simibubi.create.content.contraptions.fluids.FluidTankItem; import com.simibubi.create.content.contraptions.fluids.FluidTankModel; import com.simibubi.create.content.contraptions.fluids.PumpBlock; import com.simibubi.create.content.contraptions.processing.BasinBlock; @@ -146,7 +148,6 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.common.ToolType; -@SuppressWarnings("unused") public class AllBlocks { private static final CreateRegistrate REGISTRATE = Create.registrate() @@ -462,11 +463,13 @@ public class AllBlocks { public static final BlockEntry FLUID_TANK = REGISTRATE.block("fluid_tank", FluidTankBlock::new) .initialProperties(SharedProperties::softMetal) - .blockstate(BlockStateGen.tank()) + .properties(Block.Properties::nonOpaque) + .blockstate(new FluidTankGenerator()::generate) .onRegister(CreateRegistrate.blockModel(() -> FluidTankModel::new)) .addLayer(() -> RenderType::getCutoutMipped) - .item() - .transform(customItemModel()) + .item(FluidTankItem::new) + .model(AssetLookup.customItemModel("_", "block_single_window")) + .build() .register(); // Contraptions diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 176c123dc..6ac8e3b60 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -18,7 +18,12 @@ import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorIt import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem; import com.simibubi.create.content.contraptions.wrench.WrenchItem; import com.simibubi.create.content.contraptions.wrench.WrenchModel; -import com.simibubi.create.content.curiosities.*; +import com.simibubi.create.content.curiosities.ChromaticCompoundColor; +import com.simibubi.create.content.curiosities.ChromaticCompoundItem; +import com.simibubi.create.content.curiosities.CombustibleItem; +import com.simibubi.create.content.curiosities.RefinedRadianceItem; +import com.simibubi.create.content.curiosities.ShadowSteelItem; +import com.simibubi.create.content.curiosities.TreeFertilizerItem; import com.simibubi.create.content.curiosities.symmetry.SymmetryWandItem; import com.simibubi.create.content.curiosities.symmetry.client.SymmetryWandModel; import com.simibubi.create.content.curiosities.tools.DeforesterItem; @@ -42,7 +47,6 @@ import net.minecraft.item.Item; import net.minecraft.item.Rarity; import net.minecraft.tags.Tag; -@SuppressWarnings("unused") public class AllItems { private static final CreateRegistrate REGISTRATE = Create.registrate() diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index aeda326eb..c5806e744 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -113,8 +113,7 @@ public class AllShapes { BASIN_BLOCK_SHAPE = shape(0, 2, 0, 16, 13, 16).erase(2, 5, 2, 14, 14, 14) .add(2, 0, 2, 14, 2, 14) - .build(), - HEATER_BLOCK_SHAPE = + .build(), HEATER_BLOCK_SHAPE = shape(2, 0, 2, 14, 16, 14).add(0, 0, 0, 16, 2, 16) .erase(3, 5, 3, 13, 16, 13) .build(), diff --git a/src/main/java/com/simibubi/create/AllSpriteShifts.java b/src/main/java/com/simibubi/create/AllSpriteShifts.java index c2ea18237..6927f4de2 100644 --- a/src/main/java/com/simibubi/create/AllSpriteShifts.java +++ b/src/main/java/com/simibubi/create/AllSpriteShifts.java @@ -48,7 +48,7 @@ public class AllSpriteShifts { public static final CTSpriteShiftEntry BRASS_TUNNEL_TOP = vertical("brass_tunnel_top"), - FLUID_TANK = getCT(CTType.OMNIDIRECTIONAL, "fluid_tank"); + FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"); public static final SpriteShiftEntry BELT = SpriteShifter.get("block/belt", "block/belt_animated"), diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java index 677b05ce3..9d632361b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerFakePlayer.java @@ -108,11 +108,14 @@ public class DeployerFakePlayer extends FakePlayer { if (trueSource != null && trueSource instanceof DeployerFakePlayer) { DeployerFakePlayer fakePlayer = (DeployerFakePlayer) trueSource; event.getDrops() - .forEach(stack -> fakePlayer.inventory.placeItemBackInInventory(trueSource.world, stack.getItem())); + .forEach(stack -> fakePlayer.inventory.placeItemBackInInventory(trueSource.world, stack.getItem())); event.setCanceled(true); } } + @Override + protected void playEquipSound(ItemStack p_184606_1_) {} + @Override public void remove(boolean keepData) { if (blockBreakingProgress != null && !world.isRemote) @@ -156,13 +159,11 @@ public class DeployerFakePlayer extends FakePlayer { } @Override - public void sendPacket(IPacket packetIn) { - } + public void sendPacket(IPacket packetIn) {} @Override public void sendPacket(IPacket packetIn, - GenericFutureListener> futureListeners) { - } + GenericFutureListener> futureListeners) {} } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java index 822f86505..c2ec41026 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java @@ -1,140 +1,194 @@ package com.simibubi.create.content.contraptions.fluids; -import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; +import com.simibubi.create.content.contraptions.wrench.IWrenchable; +import com.simibubi.create.foundation.block.ITE; +import com.simibubi.create.foundation.fluid.FluidHelper; +import com.simibubi.create.foundation.fluid.FluidHelper.FluidExchange; +import com.simibubi.create.foundation.utility.Lang; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.item.BlockItemUseContext; +import net.minecraft.block.SoundType; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluid; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.particles.BlockParticleData; +import net.minecraft.particles.ParticleTypes; import net.minecraft.state.BooleanProperty; +import net.minecraft.state.EnumProperty; import net.minecraft.state.StateContainer.Builder; +import net.minecraft.tags.FluidTags; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.IBlockReader; -import net.minecraft.world.ILightReader; -import net.minecraft.world.IWorld; +import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandlerItem; -public class FluidTankBlock extends Block { +public class FluidTankBlock extends Block implements IWrenchable, ITE { public static final BooleanProperty TOP = BooleanProperty.create("top"); public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom"); - + public static final EnumProperty SHAPE = EnumProperty.create("shape", Shape.class); public FluidTankBlock(Properties p_i48440_1_) { super(p_i48440_1_); setDefaultState(getDefaultState().with(TOP, true) - .with(BOTTOM, true)); - } - - public static boolean shouldDrawDiagonalFiller(ILightReader world, BlockPos pos, BlockState state, boolean north, - boolean east) { - if (!isTank(state)) - return false; - int northOffset = north ? 1 : -1; - int eastOffset = east ? 1 : -1; - if (!isTank(world.getBlockState(pos.north(northOffset)))) - return false; - if (!isTank(world.getBlockState(pos.east(eastOffset)))) - return false; - return !isTank(world.getBlockState(pos.east(eastOffset) - .north(northOffset))); - } - - public static boolean shouldDrawCapFiller(ILightReader world, BlockPos pos, BlockState state, Direction direction, - boolean top) { - if (!isTank(state)) - return false; - if (top && !state.get(TOP)) - return false; - if (!top && !state.get(BOTTOM)) - return false; - BlockPos adjacentPos = pos.offset(direction); - BlockState adjacentState = world.getBlockState(adjacentPos); - if (!isTank(adjacentState)) - return false; - if (top && adjacentState.get(TOP)) - return false; - return top || !adjacentState.get(BOTTOM); + .with(BOTTOM, true) + .with(SHAPE, Shape.WINDOW)); } public static boolean isTank(BlockState state) { return state.getBlock() instanceof FluidTankBlock; } + @Override + public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean p_220082_5_) { + if (oldState.getBlock() == state.getBlock()) + return; + withTileEntityDo(world, pos, FluidTankTileEntity::updateConnectivity); + } + @Override protected void fillStateContainer(Builder p_206840_1_) { - p_206840_1_.add(TOP, BOTTOM); + p_206840_1_.add(TOP, BOTTOM, SHAPE); } @Override - public BlockState getStateForPlacement(BlockItemUseContext p_196258_1_) { - World world = p_196258_1_.getWorld(); - BlockPos pos = p_196258_1_.getPos(); - BlockState state = super.getStateForPlacement(p_196258_1_); - state = updateState(state, world, pos, Direction.UP); - state = updateState(state, world, pos, Direction.DOWN); - return state; - } - - private boolean isTankToDirection(IBlockReader world, BlockPos pos, Direction direction) { - return world.getBlockState(pos.offset(direction)).getBlock() instanceof FluidTankBlock; - } - - public AxisAlignedBB getTankShape(IBlockReader world, BlockPos pos) { - return new AxisAlignedBB((isTankToDirection(world, pos, Direction.WEST) ? 0 : 2) / 16f, - (isTankToDirection(world, pos, Direction.DOWN) ? 0 : 4) / 16f, - (isTankToDirection(world, pos, Direction.NORTH) ? 0 : 2) / 16f, - (isTankToDirection(world, pos, Direction.EAST) ? 16 : 14) / 16f, - (isTankToDirection(world, pos, Direction.UP) ? 16 : 12) / 16f, - (isTankToDirection(world, pos, Direction.SOUTH) ? 16 : 14) / 16f); - - } - - public AxisAlignedBB getBodyShape(IBlockReader world, BlockPos pos) { - return new AxisAlignedBB((isTankToDirection(world, pos, Direction.WEST) ? 0 : 1) / 16f, - 0, - (isTankToDirection(world, pos, Direction.NORTH) ? 0 : 1) / 16f, - (isTankToDirection(world, pos, Direction.EAST) ? 16 : 15) / 16f, - 1, - (isTankToDirection(world, pos, Direction.SOUTH) ? 16 : 15) / 16f); + public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { + FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, pos); + if (tankAt == null) + return 0; + FluidTankTileEntity controllerTE = tankAt.getControllerTE(); + if (controllerTE == null || !controllerTE.window) + return 0; + return tankAt.luminosity; } @Override - public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, - ISelectionContext p_220053_4_) { - boolean top = state.get(TOP); - boolean bottom = state.get(BOTTOM); - return VoxelShapes.or(top ? bottom ? AllShapes.TANK_TOP_BOTTOM : AllShapes.TANK_TOP - : bottom ? AllShapes.TANK_BOTTOM : AllShapes.TANK, VoxelShapes.create(getBodyShape(world, pos))); + public ActionResultType onWrenched(BlockState state, ItemUseContext context) { + withTileEntityDo(context.getWorld(), context.getPos(), FluidTankTileEntity::toggleWindows); + return ActionResultType.SUCCESS; } @Override - public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState p_196271_3_, IWorld world, - BlockPos pos, BlockPos p_196271_6_) { - return updateState(state, world, pos, direction); - } + public ActionResultType onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, + BlockRayTraceResult ray) { + ItemStack heldItem = player.getHeldItem(hand); - private BlockState updateState(BlockState state, ILightReader reader, BlockPos pos, Direction direction) { - if (direction.getAxis() - .isHorizontal()) - return state; - return state.with(direction == Direction.UP ? TOP : BOTTOM, - !AllBlocks.FLUID_TANK.has(reader.getBlockState(pos.offset(direction)))); - } + ItemStack copy = heldItem.copy(); + copy.setCount(1); + LazyOptional capability = + copy.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY); + if (!capability.isPresent()) + return ActionResultType.PASS; - @Override - @OnlyIn(Dist.CLIENT) - public boolean isSideInvisible(BlockState state, BlockState adjacentBlockState, Direction side) { - return adjacentBlockState.getBlock() == this; + TileEntity te = world.getTileEntity(pos); + LazyOptional tankCapability = + te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, ray.getFace()); + if (!tankCapability.isPresent()) + return ActionResultType.PASS; + boolean onClient = world.isRemote; + + IFluidHandlerItem fluidItem = capability.orElse(null); + IFluidHandler fluidTank = tankCapability.orElse(null); + FluidStack prevFluidInTank = fluidTank.getFluidInTank(0) + .copy(); + + FluidExchange exchange = FluidHelper.exchange(fluidTank, fluidItem, FluidExchange.TANK_TO_ITEM, 1000); + + FluidStack fluidInTank = fluidTank.getFluidInTank(0); + if (!player.isCreative() && !onClient) { + if (heldItem.getCount() > 1) { + heldItem.shrink(1); + player.addItemStackToInventory(fluidItem.getContainer()); + } else { + player.setHeldItem(hand, fluidItem.getContainer()); + } + } + + SoundEvent soundevent = null; + BlockState fluidState = null; + + if (exchange == FluidExchange.ITEM_TO_TANK) { + Fluid fluid = fluidInTank.getFluid(); + fluidState = fluid.getDefaultState() + .getBlockState(); + FluidAttributes attributes = fluid.getAttributes(); + soundevent = attributes.getEmptySound(); + if (soundevent == null) + soundevent = + fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY; + } + if (exchange == FluidExchange.TANK_TO_ITEM) { + Fluid fluid = prevFluidInTank.getFluid(); + fluidState = fluid.getDefaultState() + .getBlockState(); + soundevent = fluid.getAttributes() + .getFillSound(); + if (soundevent == null) + soundevent = + fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_FILL_LAVA : SoundEvents.ITEM_BUCKET_FILL; + } + + if (soundevent != null && !onClient) { + float pitch = MathHelper + .clamp(1 - (1f * fluidInTank.getAmount() / (FluidTankTileEntity.getCapacityMultiplier() * 16)), 0, 1); + pitch /= 1.5f; + pitch += .5f; + pitch += (world.rand.nextFloat() - .5f) / 4f; + world.playSound(null, pos, soundevent, SoundCategory.BLOCKS, .5f, pitch); + } + + if (!fluidInTank.isFluidStackIdentical(prevFluidInTank)) { + if (te instanceof FluidTankTileEntity) { + FluidTankTileEntity controllerTE = ((FluidTankTileEntity) te).getControllerTE(); + if (controllerTE != null) { + if (fluidState != null && onClient) { + BlockParticleData blockParticleData = new BlockParticleData(ParticleTypes.BLOCK, fluidState); + float level = (float) fluidInTank.getAmount() / fluidTank.getTankCapacity(0); + + boolean reversed = fluidInTank.getFluid() + .getAttributes() + .isLighterThanAir(); + if (reversed) + level = 1 - level; + + Vec3d vec = ray.getHitVec(); + vec = new Vec3d(vec.x, controllerTE.getPos() + .getY() + level * (controllerTE.height - .5f) + .25f, vec.z); + Vec3d motion = player.getPositionVec() + .subtract(vec) + .scale(1 / 20f); + vec = vec.add(motion); + world.addParticle(blockParticleData, vec.x, vec.y, vec.z, motion.x, motion.y, motion.z); + return ActionResultType.SUCCESS; + } + + controllerTE.sendData(); + controllerTE.markDirty(); + } + } + } + + return ActionResultType.SUCCESS; } @Override @@ -142,8 +196,48 @@ public class FluidTankBlock extends Block { return true; } + @Override + public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { + if (state.hasTileEntity() && (state.getBlock() != newState.getBlock() || !newState.hasTileEntity())) { + TileEntity te = world.getTileEntity(pos); + if (!(te instanceof FluidTankTileEntity)) + return; + FluidTankTileEntity tankTE = (FluidTankTileEntity) te; + world.removeTileEntity(pos); + FluidTankConnectivityHandler.splitTank(tankTE); + } + } + @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return AllTileEntities.FLUID_TANK.create(); } + + @Override + public Class getTileEntityClass() { + return FluidTankTileEntity.class; + } + + public enum Shape implements IStringSerializable { + PLAIN, WINDOW, WINDOW_NW, WINDOW_SW, WINDOW_NE, WINDOW_SE; + + @Override + public String getName() { + return Lang.asId(name()); + } + } + + // Tanks are less noisy when placed in batch + public static final SoundType SILENCED_METAL = + new SoundType(0.1F, 1.5F, SoundEvents.BLOCK_METAL_BREAK, SoundEvents.BLOCK_METAL_STEP, + SoundEvents.BLOCK_METAL_PLACE, SoundEvents.BLOCK_METAL_HIT, SoundEvents.BLOCK_METAL_FALL); + + @Override + public SoundType getSoundType(BlockState state, IWorldReader world, BlockPos pos, Entity entity) { + SoundType soundType = super.getSoundType(state, world, pos, entity); + if (entity != null && entity.getPersistentData() + .contains("SilenceTankSound")) + return SILENCED_METAL; + return soundType; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankCTBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankCTBehaviour.java index 237e00795..56c954a50 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankCTBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankCTBehaviour.java @@ -13,8 +13,7 @@ public class FluidTankCTBehaviour extends HorizontalCTBehaviour { public FluidTankCTBehaviour(CTSpriteShiftEntry layerShift, CTSpriteShiftEntry topShift) { super(layerShift, topShift); } - - @Override + public boolean buildContextForOccludedDirections() { return true; } @@ -22,7 +21,6 @@ public class FluidTankCTBehaviour extends HorizontalCTBehaviour { @Override public boolean connectsTo(BlockState state, BlockState other, ILightReader reader, BlockPos pos, BlockPos otherPos, Direction face) { - // TODO only if TEs are actually connected - return state.getBlock() == other.getBlock(); + return state.getBlock() == other.getBlock() && FluidTankConnectivityHandler.isConnected(reader, pos, otherPos); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankConnectivityHandler.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankConnectivityHandler.java new file mode 100644 index 000000000..4bae43f1a --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankConnectivityHandler.java @@ -0,0 +1,347 @@ +package com.simibubi.create.content.contraptions.fluids; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.PriorityQueue; +import java.util.Set; + +import javax.annotation.Nullable; + +import org.apache.commons.lang3.tuple.Pair; + +import com.simibubi.create.foundation.utility.Iterate; + +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; + +public class FluidTankConnectivityHandler { + + public static void formTanks(FluidTankTileEntity te) { + TankSearchCache cache = new TankSearchCache(); + List frontier = new ArrayList<>(); + frontier.add(te); + formTanks(te.getWorld(), cache, frontier); + } + + private static void formTanks(IBlockReader world, TankSearchCache cache, List frontier) { + PriorityQueue> creationQueue = makeCreationQueue(); + Set visited = new HashSet<>(); + + int minX = Integer.MAX_VALUE; + int minZ = Integer.MAX_VALUE; + for (FluidTankTileEntity fluidTankTileEntity : frontier) { + BlockPos pos = fluidTankTileEntity.getPos(); + minX = Math.min(pos.getX(), minX); + minZ = Math.min(pos.getZ(), minZ); + } + minX -= FluidTankTileEntity.getMaxSize(); + minZ -= FluidTankTileEntity.getMaxSize(); + + while (!frontier.isEmpty()) { + FluidTankTileEntity tank = frontier.remove(0); + BlockPos tankPos = tank.getPos(); + if (visited.contains(tankPos)) + continue; + + visited.add(tankPos); + + int amount = tryToFormNewTank(tank, cache, true); + if (amount > 1) + creationQueue.add(Pair.of(amount, tank)); + + for (Axis axis : Iterate.axes) { + Direction d = Direction.getFacingFromAxis(AxisDirection.NEGATIVE, axis); + BlockPos next = tankPos.offset(d); + + if (next.getX() <= minX || next.getZ() <= minZ) + continue; + if (visited.contains(next)) + continue; + FluidTankTileEntity nextTank = tankAt(world, next); + if (nextTank == null) + continue; + if (nextTank.isRemoved()) + continue; + frontier.add(nextTank); + } + } + + visited.clear(); + + while (!creationQueue.isEmpty()) { + Pair next = creationQueue.poll(); + FluidTankTileEntity toCreate = next.getValue(); + if (visited.contains(toCreate.getPos())) + continue; + visited.add(toCreate.getPos()); + tryToFormNewTank(toCreate, cache, false); + } + + } + + public static void splitTank(FluidTankTileEntity te) { + splitTankAndInvalidate(te, null, false); + } + + private static int tryToFormNewTank(FluidTankTileEntity te, TankSearchCache cache, boolean simulate) { + int bestWidth = 1; + int bestAmount = -1; + + if (!te.isController()) + return 0; + + for (int w = 1; w <= FluidTankTileEntity.getMaxSize(); w++) { + int amount = tryToFormNewTankOfWidth(te, w, cache, true); + if (amount < bestAmount) + continue; + bestWidth = w; + bestAmount = amount; + } + + if (!simulate) { + if (te.width == bestWidth && te.width * te.width * te.height == bestAmount) + return bestAmount; + + splitTankAndInvalidate(te, cache, false); + te.applyFluidTankSize(bestAmount); + tryToFormNewTankOfWidth(te, bestWidth, cache, simulate); + te.updateConnectivity = false; + te.width = bestWidth; + te.height = bestAmount / bestWidth / bestWidth; + + BlockState state = te.getBlockState(); + if (FluidTankBlock.isTank(state)) { + state = state.with(FluidTankBlock.BOTTOM, true); + state = state.with(FluidTankBlock.TOP, te.height == 1); + te.getWorld() + .setBlockState(te.getPos(), state, 22); + } + + te.setWindows(te.window); + te.onFluidStackChanged(te.tankInventory.getFluid()); + te.markDirty(); + } + + return bestAmount; + } + + private static int tryToFormNewTankOfWidth(FluidTankTileEntity te, int width, TankSearchCache cache, + boolean simulate) { + int amount = 0; + int height = 0; + World world = te.getWorld(); + BlockPos origin = te.getPos(); + FluidStack fluid = te.getTankInventory() + .getFluid(); + + Search: + + for (int yOffset = 0; yOffset < FluidTankTileEntity.getMaxHeight(); yOffset++) { + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + + BlockPos pos = origin.add(xOffset, yOffset, zOffset); + Optional tank = cache.getOrCache(world, pos); + if (!tank.isPresent()) + break Search; + + FluidTankTileEntity controller = tank.get(); + int otherWidth = controller.width; + if (otherWidth > width) + break Search; + + BlockPos controllerPos = controller.getPos(); + if (!controllerPos.equals(origin)) { + if (controllerPos.getX() < origin.getX()) + break Search; + if (controllerPos.getZ() < origin.getZ()) + break Search; + if (controllerPos.getX() + otherWidth > origin.getX() + width) + break Search; + if (controllerPos.getZ() + otherWidth > origin.getZ() + width) + break Search; + } + + FluidStack otherFluid = controller.getTankInventory() + .getFluid(); + if (!fluid.isEmpty() && !otherFluid.isEmpty() && !fluid.isFluidEqual(otherFluid)) + break Search; + + } + } + + amount += width * width; + height++; + } + + if (simulate) + return amount; + + for (int yOffset = 0; yOffset < height; yOffset++) { + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + BlockPos pos = origin.add(xOffset, yOffset, zOffset); + FluidTankTileEntity tank = tankAt(world, pos); + if (tank == te) + continue; + + if (tank.isController()) { + te.tankInventory.fill(tank.tankInventory.getFluid(), FluidAction.EXECUTE); + tank.tankInventory.setFluid(FluidStack.EMPTY); + } + + splitTankAndInvalidate(tank, cache, false); + tank.setController(origin); + tank.updateConnectivity = false; + cache.put(pos, te); + + BlockState state = world.getBlockState(pos); + if (!FluidTankBlock.isTank(state)) + continue; + state = state.with(FluidTankBlock.BOTTOM, yOffset == 0); + state = state.with(FluidTankBlock.TOP, yOffset == height - 1); + world.setBlockState(pos, state, 22); + } + } + } + + return amount; + } + + private static void splitTankAndInvalidate(FluidTankTileEntity te, @Nullable TankSearchCache cache, + boolean tryReconnect) { + // tryReconnect helps whenever only few tanks have been removed + + te = te.getControllerTE(); + if (te == null) + return; + + int height = te.height; + int width = te.width; + if (width == 1 && height == 1) + return; + + World world = te.getWorld(); + BlockPos origin = te.getPos(); + List frontier = new ArrayList<>(); + FluidStack toDistribute = te.tankInventory.getFluid() + .copy(); + int maxCapacity = FluidTankTileEntity.getCapacityMultiplier(); + if (!toDistribute.isEmpty()) + toDistribute.shrink(maxCapacity); + + for (int yOffset = 0; yOffset < height; yOffset++) { + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + + BlockPos pos = origin.add(xOffset, yOffset, zOffset); + FluidTankTileEntity tankAt = tankAt(world, pos); + if (tankAt == null) + continue; + if (!tankAt.getController() + .equals(origin)) + continue; + FluidTankTileEntity controllerTE = tankAt.getControllerTE(); + tankAt.window = controllerTE == null || controllerTE.window; + tankAt.removeController(); + + if (!toDistribute.isEmpty() && tankAt != te) { + int split = Math.min(maxCapacity, toDistribute.getAmount()); + FluidStack copy = toDistribute.copy(); + copy.setAmount(split); + toDistribute.shrink(split); + tankAt.tankInventory.fill(copy, FluidAction.EXECUTE); + } + + if (tryReconnect) { + frontier.add(tankAt); + tankAt.updateConnectivity = false; + } + if (cache != null) + cache.put(pos, tankAt); + } + } + } + + if (tryReconnect) + formTanks(world, cache == null ? new TankSearchCache() : cache, frontier); + } + + private static PriorityQueue> makeCreationQueue() { + return new PriorityQueue<>(new Comparator>() { + @Override + public int compare(Pair o1, Pair o2) { + return o2.getKey() - o1.getKey(); + } + }); + } + + @Nullable + public static FluidTankTileEntity tankAt(IBlockReader world, BlockPos pos) { + TileEntity te = world.getTileEntity(pos); + if (te instanceof FluidTankTileEntity) + return (FluidTankTileEntity) te; + return null; + } + + private static class TankSearchCache { + Map> controllerMap; + + public TankSearchCache() { + controllerMap = new HashMap<>(); + } + + void put(BlockPos pos, FluidTankTileEntity target) { + controllerMap.put(pos, Optional.of(target)); + } + + void putEmpty(BlockPos pos) { + controllerMap.put(pos, Optional.empty()); + } + + boolean hasVisited(BlockPos pos) { + return controllerMap.containsKey(pos); + } + + Optional getOrCache(IBlockReader world, BlockPos pos) { + if (hasVisited(pos)) + return controllerMap.get(pos); + FluidTankTileEntity tankAt = tankAt(world, pos); + if (tankAt == null) { + putEmpty(pos); + return Optional.empty(); + } + FluidTankTileEntity controller = tankAt.getControllerTE(); + if (controller == null) { + putEmpty(pos); + return Optional.empty(); + } + put(pos, controller); + return Optional.of(controller); + } + + } + + public static boolean isConnected(IBlockReader world, BlockPos tankPos, BlockPos otherTankPos) { + TileEntity te1 = world.getTileEntity(tankPos); + TileEntity te2 = world.getTileEntity(otherTankPos); + if (!(te1 instanceof FluidTankTileEntity) || !(te2 instanceof FluidTankTileEntity)) + return false; + return ((FluidTankTileEntity) te1).getController() + .equals(((FluidTankTileEntity) te2).getController()); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankGenerator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankGenerator.java new file mode 100644 index 000000000..455d01f14 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankGenerator.java @@ -0,0 +1,44 @@ +package com.simibubi.create.content.contraptions.fluids; + +import com.simibubi.create.content.contraptions.fluids.FluidTankBlock.Shape; +import com.simibubi.create.foundation.data.AssetLookup; +import com.simibubi.create.foundation.data.SpecialBlockStateGen; +import com.tterrag.registrate.providers.DataGenContext; +import com.tterrag.registrate.providers.RegistrateBlockstateProvider; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraftforge.client.model.generators.ModelFile; + +public class FluidTankGenerator extends SpecialBlockStateGen { + + @Override + protected int getXRotation(BlockState state) { + return 0; + } + + @Override + protected int getYRotation(BlockState state) { + return 0; + } + + @Override + public ModelFile getModel(DataGenContext ctx, RegistrateBlockstateProvider prov, + BlockState state) { + Boolean top = state.get(FluidTankBlock.TOP); + Boolean bottom = state.get(FluidTankBlock.BOTTOM); + Shape shape = state.get(FluidTankBlock.SHAPE); + + String shapeName = "middle"; + if (top && bottom) + shapeName = "single"; + else if (top) + shapeName = "top"; + else if (bottom) + shapeName = "bottom"; + + return AssetLookup.partialBaseModel(ctx, prov, + shapeName + (shape == Shape.PLAIN ? "" : "_" + shape.getName())); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankItem.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankItem.java new file mode 100644 index 000000000..2ab8bc72a --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankItem.java @@ -0,0 +1,97 @@ +package com.simibubi.create.content.contraptions.fluids; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class FluidTankItem extends BlockItem { + + public FluidTankItem(Block p_i48527_1_, Properties p_i48527_2_) { + super(p_i48527_1_, p_i48527_2_); + } + + @Override + public ActionResultType tryPlace(BlockItemUseContext ctx) { + ActionResultType initialResult = super.tryPlace(ctx); + if (initialResult != ActionResultType.SUCCESS) + return initialResult; + tryMultiPlace(ctx); + return initialResult; + } + + private void tryMultiPlace(BlockItemUseContext ctx) { + PlayerEntity player = ctx.getPlayer(); + if (player == null) + return; + if (player.isSneaking()) + return; + Direction face = ctx.getFace(); + if (!face.getAxis() + .isVertical()) + return; + ItemStack stack = ctx.getItem(); + World world = ctx.getWorld(); + BlockPos pos = ctx.getPos(); + BlockPos placedOnPos = pos.offset(face.getOpposite()); + BlockState placedOnState = world.getBlockState(placedOnPos); + + if (!FluidTankBlock.isTank(placedOnState)) + return; + FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, placedOnPos); + if (tankAt == null) + return; + FluidTankTileEntity controllerTE = tankAt.getControllerTE(); + if (controllerTE == null) + return; + + int width = controllerTE.width; + if (width == 1) + return; + + int tanksToPlace = 0; + BlockPos startPos = face == Direction.DOWN ? controllerTE.getPos() + .down() + : controllerTE.getPos() + .up(controllerTE.height); + + if (startPos.getY() != pos.getY()) + return; + + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + BlockPos offsetPos = startPos.add(xOffset, 0, zOffset); + BlockState blockState = world.getBlockState(offsetPos); + if (FluidTankBlock.isTank(blockState)) + continue; + if (!blockState.getMaterial() + .isReplaceable()) + return; + tanksToPlace++; + } + } + + if (!player.isCreative() && stack.getCount() < tanksToPlace) + return; + + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + BlockPos offsetPos = startPos.add(xOffset, 0, zOffset); + BlockState blockState = world.getBlockState(offsetPos); + if (FluidTankBlock.isTank(blockState)) + continue; + BlockItemUseContext context = BlockItemUseContext.func_221536_a(ctx, offsetPos, face); + player.getPersistentData().putBoolean("SilenceTankSound", true); + super.tryPlace(context); + player.getPersistentData().remove("SilenceTankSound"); + } + } + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankModel.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankModel.java index bc6ed510b..be89fd152 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankModel.java @@ -1,12 +1,11 @@ package com.simibubi.create.content.contraptions.fluids; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Random; -import org.apache.commons.lang3.tuple.Pair; - -import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.foundation.block.connected.CTModel; import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour; @@ -19,86 +18,63 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.ILightReader; import net.minecraftforge.client.model.data.IModelData; -import net.minecraftforge.client.model.data.ModelDataMap; import net.minecraftforge.client.model.data.ModelProperty; public class FluidTankModel extends CTModel { - private static ModelProperty TANK_PROPERTY = new ModelProperty<>(); - private static ConnectedTextureBehaviour ctBehaviour = + protected static ModelProperty CULL_PROPERTY = new ModelProperty<>(); + static ConnectedTextureBehaviour CT_BEHAVIOUR = new FluidTankCTBehaviour(AllSpriteShifts.FLUID_TANK, AllSpriteShifts.COPPER_CASING); - public FluidTankModel(IBakedModel model) { - super(model, ctBehaviour); + public FluidTankModel(IBakedModel originalModel) { + super(originalModel, CT_BEHAVIOUR); } @Override public IModelData getModelData(ILightReader world, BlockPos pos, BlockState state, IModelData tileData) { - TankModelData data = new TankModelData(); - for (boolean top : Iterate.trueAndFalse) - for (Direction d : Iterate.horizontalDirections) - data.setCapFiller(d, top, FluidTankBlock.shouldDrawCapFiller(world, pos, state, d, top)); - for (boolean north : Iterate.trueAndFalse) - for (boolean east : Iterate.trueAndFalse) - data.setDiagonalFiller(north, east, - FluidTankBlock.shouldDrawDiagonalFiller(world, pos, state, north, east)); - return new ModelDataMap.Builder().withInitial(CT_PROPERTY, createCTData(world, pos, state)) - .withInitial(TANK_PROPERTY, data) + CullData cullData = new CullData(); + for (Direction d : Iterate.horizontalDirections) + cullData.setCulled(d, FluidTankConnectivityHandler.isConnected(world, pos, pos.offset(d))); + return getCTDataMapBuilder(world, pos, state).withInitial(CULL_PROPERTY, cullData) .build(); } @Override - public List getQuads(BlockState state, Direction side, Random rand, IModelData data) { - List quads = super.getQuads(state, side, rand, data); - if (data instanceof ModelDataMap) { - ModelDataMap modelDataMap = (ModelDataMap) data; - if (modelDataMap.hasProperty(TANK_PROPERTY)) - addQuads(quads, state, side, rand, modelDataMap, modelDataMap.getData(TANK_PROPERTY)); + public List getQuads(BlockState state, Direction side, Random rand, IModelData extraData) { + if (side != null) + return Collections.emptyList(); + + List quads = new ArrayList<>(); + for (Direction d : Iterate.directions) { + if (extraData.hasProperty(CULL_PROPERTY) && extraData.getData(CULL_PROPERTY) + .isCulled(d)) + continue; + quads.addAll(super.getQuads(state, d, rand, extraData)); } + quads.addAll(super.getQuads(state, null, rand, extraData)); return quads; } - private void addQuads(List quads, BlockState state, Direction side, Random rand, IModelData data, - TankModelData pipeData) { - for (boolean top : Iterate.trueAndFalse) - for (Direction d : Iterate.horizontalDirections) - if (pipeData.getCapFiller(d, top)) - quads.addAll(AllBlockPartials.TANK_LID_FILLERS.get(Pair.of(top, d)) - .get() - .getQuads(state, side, rand, data)); - for (boolean north : Iterate.trueAndFalse) - for (boolean east : Iterate.trueAndFalse) - if (pipeData.getDiagonalFiller(north, east)) - quads.addAll(AllBlockPartials.TANK_DIAGONAL_FILLERS.get(Pair.of(north, east)) - .get() - .getQuads(state, side, rand, data)); - } + private class CullData { + boolean[] culledFaces; - private class TankModelData { - boolean[] capFillers; - boolean[] diagonalFillers; - - public TankModelData() { - capFillers = new boolean[2 * 4]; - diagonalFillers = new boolean[2 * 2]; - Arrays.fill(capFillers, false); - Arrays.fill(diagonalFillers, false); + public CullData() { + culledFaces = new boolean[4]; + Arrays.fill(culledFaces, false); } - public void setCapFiller(Direction face, boolean top, boolean filler) { - capFillers[(top ? 0 : 4) + face.getHorizontalIndex()] = filler; + void setCulled(Direction face, boolean cull) { + if (face.getAxis() + .isVertical()) + return; + culledFaces[face.getHorizontalIndex()] = cull; } - public void setDiagonalFiller(boolean north, boolean east, boolean filler) { - diagonalFillers[(north ? 0 : 2) + (east ? 0 : 1)] = filler; - } - - public boolean getCapFiller(Direction face, boolean top) { - return capFillers[(top ? 0 : 4) + face.getHorizontalIndex()]; - } - - public boolean getDiagonalFiller(boolean north, boolean east) { - return diagonalFillers[(north ? 0 : 2) + (east ? 0 : 1)]; + boolean isCulled(Direction face) { + if (face.getAxis() + .isVertical()) + return false; + return culledFaces[face.getHorizontalIndex()]; } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankRenderer.java index 54405a81e..829f8ba7b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankRenderer.java @@ -1,216 +1,68 @@ package com.simibubi.create.content.contraptions.fluids; import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.simibubi.create.foundation.fluid.FluidRenderer; +import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.Matrix4f; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.texture.AtlasTexture; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.fluid.Fluid; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraftforge.fluids.IFluidTank; -import java.util.Collections; -import java.util.List; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.templates.FluidTank; public class FluidTankRenderer extends SafeTileEntityRenderer { - public FluidTankRenderer(TileEntityRendererDispatcher dispatcher) { - super(dispatcher); - } + public FluidTankRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } - private static int[] decomposeColor(int color) { - int[] res = new int[4]; - res[0] = color >> 24 & 0xff; - res[1] = color >> 16 & 0xff; - res[2] = color >> 8 & 0xff; - res[3] = color & 0xff; - return res; - } + @Override + protected void renderSafe(FluidTankTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + if (!te.isController()) + return; + if (!te.window) + return; - @Override - protected void renderSafe(FluidTankTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, - int light, int overlay) { - renderFluid(te, ms, buffer, light); - } + InterpolatedChasingValue fluidLevel = te.fluidLevel; + if (fluidLevel == null) + return; - private void renderFluid(FluidTankTileEntity te, MatrixStack ms, IRenderTypeBuffer buffer, - int light) { - if (te.getWorld() != null && te.getWorld().isAreaLoaded(te.getPos(), 0)) { - IVertexBuilder builder = buffer.getBuffer(RenderType.getTranslucent()); + float capHeight = 1 / 4f; + float tankHullWidth = 1 / 16f + 1 / 128f; + float minPuddleHeight = 1 / 16f; + float totalHeight = te.height - 2 * capHeight - minPuddleHeight; - Matrix4f posMat = ms.peek().getModel(); - for (FluidTankRenderInfo tankRenderInfo : getTanksToRender(te)) { - doRender(builder, tankRenderInfo, posMat, light); - } - } - } + float level = fluidLevel.get(partialTicks); + if (level < 1 / (512f * totalHeight)) + return; + float clamp = MathHelper.clamp(level * totalHeight, 0, totalHeight); - private void doRender(IVertexBuilder builder, FluidTankRenderInfo tankRenderInfo, Matrix4f posMat, int combinedLight) { - IFluidTank tank = tankRenderInfo.getTank(); - if (tank.getFluidAmount() == 0) return; + FluidTank tank = te.tankInventory; + FluidStack fluidStack = tank.getFluid(); - Fluid fluid = tank.getFluid().getFluid(); - ResourceLocation texture = fluid.getAttributes().getStillTexture(tank.getFluid()); + boolean top = fluidStack.getFluid() + .getAttributes() + .isLighterThanAir(); - @SuppressWarnings("deprecation") - TextureAtlasSprite still = Minecraft.getInstance().getSpriteAtlas(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(texture); - int[] cols = decomposeColor(fluid.getAttributes().getColor(tank.getFluid())); + float xMin = tankHullWidth; + float xMax = xMin + te.width - 2 * tankHullWidth; + float yMin = totalHeight + capHeight + minPuddleHeight - clamp; + float yMax = yMin + clamp; - AxisAlignedBB bounds = getRenderBounds(tank, tankRenderInfo.getBounds()); - float x1 = (float) bounds.minX; - float x2 = (float) bounds.maxX; - float y1 = (float) bounds.minY; - float y2 = (float) bounds.maxY; - float z1 = (float) bounds.minZ; - float z2 = (float) bounds.maxZ; - double bx1 = bounds.minX * 16; - double bx2 = bounds.maxX * 16; - double by1 = bounds.minY * 16; - double by2 = bounds.maxY * 16; - double bz1 = bounds.minZ * 16; - double bz2 = bounds.maxZ * 16; + if (top) { + yMin += totalHeight - clamp; + yMax += totalHeight - clamp; + } - if (tankRenderInfo.shouldRender(Direction.DOWN)) { - float u1 = still.getInterpolatedU(bx1); - float u2 = still.getInterpolatedU(bx2); - float v1 = still.getInterpolatedV(bz1); - float v2 = still.getInterpolatedV(bz2); - renderDown(builder, posMat, combinedLight, cols, x1, y1, z1, z2, u1, v1, v2); - renderDown(builder, posMat, combinedLight, cols, x2, y1, z2, z1, u2, v2, v1); - } + float zMin = tankHullWidth; + float zMax = zMin + te.width - 2 * tankHullWidth; - if (tankRenderInfo.shouldRender(Direction.UP)) { - float u1 = still.getInterpolatedU(bx1); - float u2 = still.getInterpolatedU(bx2); - float v1 = still.getInterpolatedV(bz1); - float v2 = still.getInterpolatedV(bz2); - renderUp(builder, posMat, combinedLight, cols, x2, x1, y2, z2, u2, u1, v2); - renderUp(builder, posMat, combinedLight, cols, x1, x2, y2, z1, u1, u2, v1); - } + ms.push(); + ms.translate(0, clamp - totalHeight, 0); + FluidRenderer.renderTiledFluidBB(fluidStack, xMin, yMin, zMin, xMax, yMax, zMax, buffer, ms, light, false); + ms.pop(); + } - if (tankRenderInfo.shouldRender(Direction.NORTH)) { - float u1 = still.getInterpolatedU(bx1); - float u2 = still.getInterpolatedU(bx2); - float v1 = still.getInterpolatedV(by1); - float v2 = still.getInterpolatedV(by2); - renderNorth(builder, posMat, combinedLight, cols, x1, y1, y2, z1, u1, v1, v2); - renderNorth(builder, posMat, combinedLight, cols, x2, y2, y1, z1, u2, v2, v1); - } - - if (tankRenderInfo.shouldRender(Direction.SOUTH)) { - float u1 = still.getInterpolatedU(bx1); - float u2 = still.getInterpolatedU(bx2); - float v1 = still.getInterpolatedV(by1); - float v2 = still.getInterpolatedV(by2); - renderSouth(builder, posMat, combinedLight, cols, x2, y1, y2, z2, u2, v1, v2); - renderSouth(builder, posMat, combinedLight, cols, x1, y2, y1, z2, u1, v2, v1); - } - - if (tankRenderInfo.shouldRender(Direction.WEST)) { - float u1 = still.getInterpolatedU(by1); - float u2 = still.getInterpolatedU(by2); - float v1 = still.getInterpolatedV(bz1); - float v2 = still.getInterpolatedV(bz2); - renderWest(builder, posMat, combinedLight, cols, x1, y1, y2, z2, u1, u2, v2); - renderWest(builder, posMat, combinedLight, cols, x1, y2, y1, z1, u2, u1, v1); - } - - if (tankRenderInfo.shouldRender(Direction.EAST)) { - float u1 = still.getInterpolatedU(by1); - float u2 = still.getInterpolatedU(by2); - float v1 = still.getInterpolatedV(bz1); - float v2 = still.getInterpolatedV(bz2); - renderEast(builder, posMat, combinedLight, cols, x2, y1, y2, z1, u1, u2, v1); - renderEast(builder, posMat, combinedLight, cols, x2, y2, y1, z2, u2, u1, v2); - } - } - - private void renderEast(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x2, float y1, float y2, float z1, float u1, float u2, float v1) { - builder.vertex(posMat, x2, y1, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v1).light(combinedLight).normal(1f, 0f, 0f).endVertex(); - builder.vertex(posMat, x2, y2, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u2, v1).light(combinedLight).normal(1f, 0f, 0f).endVertex(); - } - - private void renderWest(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x1, float y1, float y2, float z2, float u1, float u2, float v2) { - builder.vertex(posMat, x1, y1, z2).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v2).light(combinedLight).normal(-1f, 0f, 0f).endVertex(); - builder.vertex(posMat, x1, y2, z2).color(cols[1], cols[2], cols[3], cols[0]).texture(u2, v2).light(combinedLight).normal(-1f, 0f, 0f).endVertex(); - } - - private void renderSouth(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x2, float y1, float y2, float z2, float u2, float v1, float v2) { - builder.vertex(posMat, x2, y1, z2).color(cols[1], cols[2], cols[3], cols[0]).texture(u2, v1).light(combinedLight).normal(0f, 0f, 1f).endVertex(); - builder.vertex(posMat, x2, y2, z2).color(cols[1], cols[2], cols[3], cols[0]).texture(u2, v2).light(combinedLight).normal(0f, 0f, 1f).endVertex(); - } - - private void renderNorth(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x1, float y1, float y2, float z1, float u1, float v1, float v2) { - builder.vertex(posMat, x1, y1, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v1).light(combinedLight).normal(0f, 0f, -1f).endVertex(); - builder.vertex(posMat, x1, y2, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v2).light(combinedLight).normal(0f, 0f, -1f).endVertex(); - } - - private void renderUp(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x1, float x2, float y2, float z1, float u1, float u2, float v1) { - builder.vertex(posMat, x2, y2, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u2, v1).light(combinedLight).normal(0f, 1f, 0f).endVertex(); - builder.vertex(posMat, x1, y2, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v1).light(combinedLight).normal(0f, 1f, 0f).endVertex(); - } - - private void renderDown(IVertexBuilder builder, Matrix4f posMat, int combinedLight, int[] cols, float x1, float y1, float z1, float z2, float u1, float v1, float v2) { - builder.vertex(posMat, x1, y1, z2).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v2).light(combinedLight).normal(0f, -1f, 0f).endVertex(); - builder.vertex(posMat, x1, y1, z1).color(cols[1], cols[2], cols[3], cols[0]).texture(u1, v1).light(combinedLight).normal(0f, -1f, 0f).endVertex(); - } - - private AxisAlignedBB getRenderBounds(IFluidTank tank, AxisAlignedBB tankBounds) { - double percent = (double) tank.getFluidAmount() / (double) tank.getCapacity(); - double y1 = tankBounds.minY; - double y2 = tank.getFluidAmount() < tank.getCapacity() ? (4 + 8 * percent) / 16f : 1f; - if (tank.getFluid().getFluid().getAttributes().isLighterThanAir()) { - double yOff = tankBounds.maxY - y2; // FIXME: lighter than air fluids move to the top of the tank, add behavior in TE - y1 += yOff; - y2 += yOff; - } - return new AxisAlignedBB(tankBounds.minX, y1, tankBounds.minZ, tankBounds.maxX, y2, tankBounds.maxZ); - } - - private List getTanksToRender(FluidTankTileEntity te) { - return Collections.singletonList(new FluidTankRenderInfo(te, ((FluidTankBlock) te.getBlockState().getBlock()).getTankShape(te.getWorld(), te.getPos()))); - } - - private static class FluidTankRenderInfo { - private final IFluidTank tank; - private final AxisAlignedBB bounds; - private final FluidTankTileEntity te; - - FluidTankRenderInfo(FluidTankTileEntity te, AxisAlignedBB bounds) { - this.te = te; - this.bounds = bounds; - this.tank = te.getTank(); - } - - public boolean shouldRender(Direction face) { - FluidTankTileEntity offsetTE = te.getOtherFluidTankTileEntity(face); - switch (face) { - case UP: - return (offsetTE != null && (offsetTE.getTank().getFluidAmount() == 0 || te.getTank().getFluid().getRawFluid() != offsetTE.getTank().getFluid().getRawFluid())) - || getTank().getFluidAmount() < getTank().getCapacity() - && !getTank().getFluid().getFluid().getAttributes().isLighterThanAir(); - case DOWN: - return (offsetTE != null && (offsetTE.getTank().getFluidAmount() < offsetTE.getTank().getCapacity() || te.getTank().getFluid().getRawFluid() != offsetTE.getTank().getFluid().getRawFluid())) - || getTank().getFluidAmount() < getTank().getCapacity() - && getTank().getFluid().getFluid().getAttributes().isLighterThanAir(); - default: - return offsetTE == null || te.getTank().getFluid().getRawFluid() != offsetTE.getTank().getFluid().getRawFluid(); - } - } - - public IFluidTank getTank() { - return tank; - } - - public AxisAlignedBB getBounds() { - return bounds; - } - } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankTileEntity.java index 1ffc9692e..d80742da6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankTileEntity.java @@ -1,158 +1,361 @@ package com.simibubi.create.content.contraptions.fluids; -import com.simibubi.create.foundation.tileEntity.SmartTileEntity; -import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.fluids.IFluidTank; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; -import net.minecraftforge.fluids.capability.templates.FluidTank; +import static java.lang.Math.abs; + +import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import java.util.List; + +import com.simibubi.create.content.contraptions.fluids.FluidTankBlock.Shape; +import com.simibubi.create.foundation.config.AllConfigs; +import com.simibubi.create.foundation.fluid.SmartFluidTank; +import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; + +import net.minecraft.block.BlockState; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; +import net.minecraftforge.fluids.capability.templates.FluidTank; public class FluidTankTileEntity extends SmartTileEntity { - LazyOptional fluid = LazyOptional.of(this::createFluidHandler); - private int priority = 1000; + private static final int MAX_SIZE = 3; - public FluidTankTileEntity(TileEntityType tileEntityTypeIn) { - super(tileEntityTypeIn); - } + protected LazyOptional fluidCapability; + protected boolean forceFluidLevelUpdate; + protected FluidTank tankInventory; + protected BlockPos controller; + protected boolean updateConnectivity; + protected boolean window; + protected int luminosity; + protected int width; + protected int height; - private int calculateDrainAmount(FluidTankTileEntity other, int delta) { - boolean roundDirection = other.getPriority() < this.getPriority(); - return (int) Math.abs(roundDirection ? Math.floor(delta / 2f) : Math.ceil(delta / 2f)); - } + // For rendering purposes only + InterpolatedChasingValue fluidLevel; - @Override - public void tick() { - super.tick(); - updatePriority(); + public FluidTankTileEntity(TileEntityType tileEntityTypeIn) { + super(tileEntityTypeIn); + tankInventory = new SmartFluidTank(getCapacityMultiplier(), this::onFluidStackChanged); + fluidCapability = LazyOptional.of(() -> tankInventory); + forceFluidLevelUpdate = true; + updateConnectivity = false; + window = true; + height = 1; + width = 1; + } - FluidTankTileEntity other; + protected void updateConnectivity() { + updateConnectivity = false; + if (world.isRemote) + return; + if (!isController()) + return; + FluidTankConnectivityHandler.formTanks(this); + } - other = getOtherFluidTankTileEntity(Direction.NORTH); - - if (other != null && other.getTank().isFluidValid(this.getTank().getFluid())) { - int delta = other.getTank().getFluidAmount() - this.getTank().getFluidAmount(); - if (delta > 0) { - this.getTank().fill(other.getTank().drain(calculateDrainAmount(other, delta), FluidAction.EXECUTE), FluidAction.EXECUTE); - other.markDirty(); - this.markDirty(); - other.sendData(); - sendData(); - } else if (delta < 0) { - other.getTank().fill(this.getTank().drain(calculateDrainAmount(other, delta), FluidAction.EXECUTE), FluidAction.EXECUTE); - other.markDirty(); - this.markDirty(); - other.sendData(); - sendData(); - } - } + @Override + public void tick() { + super.tick(); + if (updateConnectivity) + updateConnectivity(); + if (fluidLevel != null) + fluidLevel.tick(); + } + public boolean isController() { + return controller == null || controller.equals(pos); + } - other = getOtherFluidTankTileEntity(Direction.WEST); - if (other != null && other.getTank().isFluidValid(this.getTank().getFluid())) { - int delta = other.getTank().getFluidAmount() - this.getTank().getFluidAmount(); - if (delta > 0) { - this.getTank().fill(other.getTank().drain(calculateDrainAmount(other, delta), FluidAction.EXECUTE), FluidAction.EXECUTE); - other.markDirty(); - this.markDirty(); - other.sendData(); - sendData(); - } else if (delta < 0) { - other.getTank().fill(this.getTank().drain(calculateDrainAmount(other, delta), FluidAction.EXECUTE), FluidAction.EXECUTE); - other.markDirty(); - this.markDirty(); - other.sendData(); - sendData(); - } - } + @Override + public void initialize() { + super.initialize(); + sendData(); + } - other = getOtherFluidTankTileEntity(Direction.UP); - if (other != null && other.getTank().isFluidValid(this.getTank().getFluid())) { - int space = this.getTank().getCapacity() - this.getTank().getFluidAmount(); - if (space > 0 && other.getTank().getFluidAmount() > 0) { - this.getTank().fill(other.getTank().drain(space, FluidAction.EXECUTE), FluidAction.EXECUTE); - other.markDirty(); - this.markDirty(); - other.sendData(); - sendData(); - } - } - } + protected void onFluidStackChanged(FluidStack newFluidStack) { + if (!hasWorld()) + return; - @Nullable - public FluidTankTileEntity getOtherFluidTankTileEntity(Direction direction) { - TileEntity otherTE = world.getTileEntity(pos.offset(direction)); - if (otherTE instanceof FluidTankTileEntity) - return (FluidTankTileEntity) otherTE; - return null; - } + FluidAttributes attributes = newFluidStack.getFluid() + .getAttributes(); + int luminosity = attributes.getLuminosity(newFluidStack) / 2; + boolean reversed = attributes.isLighterThanAir(); + int maxY = (int) ((getFillState() * height) + 1); - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { - if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { - return fluid.cast(); - } - return super.getCapability(cap, side); - } + for (int yOffset = 0; yOffset < height; yOffset++) { + boolean isBright = reversed ? (height - yOffset <= maxY) : (yOffset < maxY); + int actualLuminosity = isBright ? luminosity : luminosity > 0 ? 1 : 0; - @Override - public void read(CompoundNBT tag) { - fluid.ifPresent(h -> h.readFromNBT(tag)); - super.read(tag); - } + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + BlockPos pos = this.pos.add(xOffset, yOffset, zOffset); + FluidTankTileEntity tankAt = FluidTankConnectivityHandler.tankAt(world, pos); + if (tankAt == null) + continue; + if (tankAt.luminosity == actualLuminosity) + continue; + tankAt.setLuminosity(actualLuminosity); + } + } + } + } - @Override - public CompoundNBT write(CompoundNBT tag) { - fluid.ifPresent(h -> h.writeToNBT(tag)); - return super.write(tag); - } + protected void setLuminosity(int luminosity) { + if (world.isRemote) + return; + if (this.luminosity == luminosity) + return; + this.luminosity = luminosity; + sendData(); + } - @Override - public void addBehaviours(List behaviours) { - } + public FluidTankTileEntity getControllerTE() { + if (isController()) + return this; + TileEntity tileEntity = world.getTileEntity(controller); + if (tileEntity instanceof FluidTankTileEntity) + return (FluidTankTileEntity) tileEntity; + return null; + } - @Nonnull - public FluidTank createFluidHandler() { - return new FluidTank(16000); - } + public void applyFluidTankSize(int blocks) { + tankInventory.setCapacity(blocks * getCapacityMultiplier()); + int overflow = tankInventory.getFluidAmount() - tankInventory.getCapacity(); + if (overflow > 0) + tankInventory.drain(overflow, FluidAction.EXECUTE); + forceFluidLevelUpdate = true; + } - public IFluidTank getTank() { - return fluid.orElseGet(this::createFluidHandler); - } + public void removeController() { + if (world.isRemote) + return; + updateConnectivity = true; + applyFluidTankSize(1); + controller = null; + width = 1; + height = 1; + onFluidStackChanged(tankInventory.getFluid()); - private void updatePriority() { - FluidTankTileEntity other = getOtherFluidTankTileEntity(Direction.DOWN); - priority = 1000; - if (other != null) { - priority = 0; - return; - } + BlockState state = getBlockState(); + if (FluidTankBlock.isTank(state)) { + state = state.with(FluidTankBlock.BOTTOM, true); + state = state.with(FluidTankBlock.TOP, true); + state = state.with(FluidTankBlock.SHAPE, window ? Shape.WINDOW : Shape.PLAIN); + getWorld().setBlockState(pos, state, 22); + } - updatePriorityFrom(Direction.SOUTH); - updatePriorityFrom(Direction.NORTH); - updatePriorityFrom(Direction.WEST); - updatePriorityFrom(Direction.EAST); - } + markDirty(); + sendData(); + } - private void updatePriorityFrom(Direction direction) { - FluidTankTileEntity other = getOtherFluidTankTileEntity(direction); - if (other != null && other.getPriority() + 1 < priority) { - priority = other.getPriority() + 1; - } - } + public void toggleWindows() { + FluidTankTileEntity te = getControllerTE(); + if (te == null) + return; + te.setWindows(!te.window); + } + + public void setWindows(boolean window) { + this.window = window; + for (int yOffset = 0; yOffset < height; yOffset++) { + for (int xOffset = 0; xOffset < width; xOffset++) { + for (int zOffset = 0; zOffset < width; zOffset++) { + + BlockPos pos = this.pos.add(xOffset, yOffset, zOffset); + BlockState blockState = world.getBlockState(pos); + if (!FluidTankBlock.isTank(blockState)) + continue; + + Shape shape = Shape.PLAIN; + if (window) { + // SIZE 1: Every tank has a window + if (width == 1) + shape = Shape.WINDOW; + // SIZE 2: Every tank has a corner window + if (width == 2) + shape = xOffset == 0 ? zOffset == 0 ? Shape.WINDOW_NW : Shape.WINDOW_SW + : zOffset == 0 ? Shape.WINDOW_NE : Shape.WINDOW_SE; + // SIZE 3: Tanks in the center have a window + if (width == 3 && abs(abs(xOffset) - abs(zOffset)) == 1) + shape = Shape.WINDOW; + } + + world.setBlockState(pos, blockState.with(FluidTankBlock.SHAPE, shape), 22); + world.getChunkProvider() + .getLightManager() + .checkBlock(pos); + } + } + } + } + + public void setController(BlockPos controller) { + if (world.isRemote) + return; + if (controller.equals(this.controller)) + return; + this.controller = controller; + markDirty(); + sendData(); + } + + public BlockPos getController() { + return isController() ? pos : controller; + } + + @Override + @OnlyIn(Dist.CLIENT) + public AxisAlignedBB getRenderBoundingBox() { + return super.getRenderBoundingBox().expand(width - 1, height - 1, width - 1); + } + + @Nullable + public FluidTankTileEntity getOtherFluidTankTileEntity(Direction direction) { + TileEntity otherTE = world.getTileEntity(pos.offset(direction)); + if (otherTE instanceof FluidTankTileEntity) + return (FluidTankTileEntity) otherTE; + return null; + } + + @Override + public void read(CompoundNBT tag) { + super.read(tag); + updateConnectivity = tag.contains("Uninitialized"); + luminosity = tag.getInt("Luminosity"); + controller = null; + + if (tag.contains("Controller")) + controller = NBTUtil.readBlockPos(tag.getCompound("Controller")); + + if (isController()) { + window = tag.getBoolean("Window"); + width = tag.getInt("Size"); + height = tag.getInt("Height"); + tankInventory.setCapacity(getTotalTankSize() * getCapacityMultiplier()); + tankInventory.readFromNBT(tag.getCompound("TankContent")); + if (tankInventory.getSpace() < 0) + tankInventory.drain(-tankInventory.getSpace(), FluidAction.EXECUTE); + } + + if (tag.contains("ForceFluidLevel") || fluidLevel == null) + fluidLevel = new InterpolatedChasingValue().start(getFillState()) + .withSpeed(1 / 2f); + } + + @Override + public void readClientUpdate(CompoundNBT tag) { + BlockPos controllerBefore = controller; + int prevSize = width; + int prevHeight = height; + int prevLum = luminosity; + + super.readClientUpdate(tag); + + boolean changeOfController = + controllerBefore == null ? controller != null : !controllerBefore.equals(controller); + if (changeOfController || prevSize != width || prevHeight != height) { + if (hasWorld()) + world.notifyBlockUpdate(getPos(), getBlockState(), getBlockState(), 16); + if (isController()) + tankInventory.setCapacity(getCapacityMultiplier() * getTotalTankSize()); + } + if (isController()) { + float fillState = getFillState(); + if (tag.contains("ForceFluidLevel") || fluidLevel == null) + fluidLevel = new InterpolatedChasingValue().start(fillState) + .withSpeed(1 / 2f); + fluidLevel.target(fillState); + } + if (luminosity != prevLum && hasWorld()) + world.getChunkProvider() + .getLightManager() + .checkBlock(pos); + } + + protected float getFillState() { + return (float) tankInventory.getFluidAmount() / tankInventory.getCapacity(); + } + + @Override + public CompoundNBT write(CompoundNBT tag) { + if (updateConnectivity) + tag.putBoolean("Uninitialized", true); + if (!isController()) + tag.put("Controller", NBTUtil.writeBlockPos(controller)); + if (isController()) { + tag.putBoolean("Window", window); + tag.put("TankContent", tankInventory.writeToNBT(new CompoundNBT())); + tag.putInt("Size", width); + tag.putInt("Height", height); + } + tag.putInt("Luminosity", luminosity); + return super.write(tag); + } + + @Override + public CompoundNBT writeToClient(CompoundNBT compound) { + if (forceFluidLevelUpdate) + compound.putBoolean("ForceFluidLevel", true); + forceFluidLevelUpdate = false; + return super.writeToClient(compound); + } + + @Nonnull + @Override + public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { + if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { + FluidTankTileEntity controller = getControllerTE(); + if (controller != null) + return controller.fluidCapability.cast(); + } + return super.getCapability(cap, side); + } + + @Override + public void remove() { + super.remove(); + fluidCapability.invalidate(); + } + + @Override + public void addBehaviours(List behaviours) {} + + public IFluidTank getTankInventory() { + return tankInventory; + } + + public int getTotalTankSize() { + return width * width * height; + } + + public static int getMaxSize() { + return MAX_SIZE; + } + + protected static int getCapacityMultiplier() { + return AllConfigs.SERVER.fluids.fluidTankCapacity.get() * 1000; + } + + public static int getMaxHeight() { + return AllConfigs.SERVER.fluids.fluidTankMaxHeight.get(); + } - public int getPriority() { - return priority; - } } diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java index bd6aa2e3e..6a76326b2 100644 --- a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java +++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java @@ -19,6 +19,7 @@ import net.minecraft.world.ILightReader; import net.minecraftforge.client.model.BakedModelWrapper; import net.minecraftforge.client.model.data.IModelData; import net.minecraftforge.client.model.data.ModelDataMap; +import net.minecraftforge.client.model.data.ModelDataMap.Builder; import net.minecraftforge.client.model.data.ModelProperty; public class CTModel extends BakedModelWrapper { @@ -50,8 +51,11 @@ public class CTModel extends BakedModelWrapper { @Override public IModelData getModelData(ILightReader world, BlockPos pos, BlockState state, IModelData tileData) { - return new ModelDataMap.Builder().withInitial(CT_PROPERTY, createCTData(world, pos, state)) - .build(); + return getCTDataMapBuilder(world, pos, state).build(); + } + + protected Builder getCTDataMapBuilder(ILightReader world, BlockPos pos, BlockState state) { + return new ModelDataMap.Builder().withInitial(CT_PROPERTY, createCTData(world, pos, state)); } protected CTData createCTData(ILightReader world, BlockPos pos, BlockState state) { diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java index 19a296058..41741eb5b 100644 --- a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java +++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java @@ -8,7 +8,7 @@ import com.simibubi.create.foundation.utility.SuperByteBuffer; public abstract class CTSpriteShiftEntry extends SpriteShiftEntry { int textureSheetSize; - + public CTSpriteShiftEntry(int sheetSize) { this.textureSheetSize = sheetSize; } @@ -16,16 +16,17 @@ public abstract class CTSpriteShiftEntry extends SpriteShiftEntry { public float getTargetU(float localU, int index) { float uOffset = (index % textureSheetSize); return getTarget().getInterpolatedU( - (SuperByteBuffer.getUnInterpolatedU(getOriginal(), localU) + (uOffset * 16)) / ((float) textureSheetSize)); + (SuperByteBuffer.getUnInterpolatedU(getOriginal(), localU) + (uOffset * 16)) / ((float) textureSheetSize)); } public float getTargetV(float localV, int index) { float vOffset = (index / textureSheetSize); return getTarget().getInterpolatedV( - (SuperByteBuffer.getUnInterpolatedV(getOriginal(), localV) + (vOffset * 16)) / ((float) textureSheetSize)); + (SuperByteBuffer.getUnInterpolatedV(getOriginal(), localV) + (vOffset * 16)) / ((float) textureSheetSize)); } public abstract int getTextureIndex(CTContext context); + public abstract CTType getType(); public static class Horizontal extends CTSpriteShiftEntry { @@ -64,6 +65,24 @@ public abstract class CTSpriteShiftEntry extends SpriteShiftEntry { } + public static class Cross extends CTSpriteShiftEntry { + + public Cross() { + super(4); + } + + @Override + public int getTextureIndex(CTContext context) { + return (context.up ? 1 : 0) + (context.down ? 2 : 0) + (context.left ? 4 : 0) + (context.right ? 8 : 0); + } + + @Override + public CTType getType() { + return CTType.CROSS; + } + + } + public static class Omnidirectional extends CTSpriteShiftEntry { public Omnidirectional() { @@ -125,7 +144,7 @@ public abstract class CTSpriteShiftEntry extends SpriteShiftEntry { if (borders == 2) { if ((c.up && c.left && c.topLeft) || (c.down && c.left && c.bottomLeft) - || (c.up && c.right && c.topRight) || (c.down && c.right && c.bottomRight)) + || (c.up && c.right && c.topRight) || (c.down && c.right && c.bottomRight)) tileX += 3; } diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShifter.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShifter.java index a80f416a8..2b09a995a 100644 --- a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShifter.java +++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShifter.java @@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation; public class CTSpriteShifter extends SpriteShifter { public enum CTType { - OMNIDIRECTIONAL, HORIZONTAL, VERTICAL; + OMNIDIRECTIONAL, HORIZONTAL, VERTICAL, CROSS; } public static CTSpriteShiftEntry getCT(CTType type, String blockTextureName) { @@ -42,6 +42,8 @@ public class CTSpriteShifter extends SpriteShifter { return new CTSpriteShiftEntry.Omnidirectional(); case VERTICAL: return new CTSpriteShiftEntry.Vertical(); + case CROSS: + return new CTSpriteShiftEntry.Cross(); default: return null; } diff --git a/src/main/java/com/simibubi/create/foundation/config/CFluids.java b/src/main/java/com/simibubi/create/foundation/config/CFluids.java new file mode 100644 index 000000000..580fec6ad --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/config/CFluids.java @@ -0,0 +1,20 @@ +package com.simibubi.create.foundation.config; + +public class CFluids extends ConfigBase { + + public ConfigInt fluidTankCapacity = i(8, 1, "fluidTankCapacity", Comments.buckets, Comments.fluidTankCapacity); + public ConfigInt fluidTankMaxHeight = i(32, 1, "fluidTankMaxHeight", Comments.blocks, Comments.fluidTankMaxHeight); + + @Override + public String getName() { + return "fluids"; + } + + private static class Comments { + static String blocks = "[in Blocks]"; + static String buckets = "[in Buckets]"; + static String fluidTankCapacity = "The amount of liquid a tank can hold per block."; + static String fluidTankMaxHeight = "The maximum height a fluid tank can reach."; + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/config/CServer.java b/src/main/java/com/simibubi/create/foundation/config/CServer.java index 7b0b3e95c..5534e8df7 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CServer.java +++ b/src/main/java/com/simibubi/create/foundation/config/CServer.java @@ -7,6 +7,7 @@ public class CServer extends ConfigBase { i(20, 5, "tickrateSyncTimer", "[in Ticks]", Comments.tickrateSyncTimer, Comments.tickrateSyncTimer2); public CKinetics kinetics = nested(0, CKinetics::new, Comments.kinetics); + public CFluids fluids = nested(0, CFluids::new, Comments.fluids); public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics); public CSchematics schematics = nested(0, CSchematics::new, Comments.schematics); public CCuriosities curiosities = nested(0, CCuriosities::new, Comments.curiosities); @@ -20,6 +21,7 @@ public class CServer extends ConfigBase { private static class Comments { static String schematics = "Everything related to Schematic tools"; static String kinetics = "Parameters and abilities of Create's kinetic mechanisms"; + static String fluids = "Create's liquid manipulation tools"; static String logistics = "Tweaks for logistical components"; static String curiosities = "Gadgets and other Shenanigans added by Create"; static String control = "You can try inhibiting related game mechanics for troubleshooting repeated crashes."; diff --git a/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java b/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java index ad0f06f01..4216d5c04 100644 --- a/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/BlockStateGen.java @@ -20,7 +20,6 @@ import com.simibubi.create.content.contraptions.components.structureMovement.mou import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; import com.simibubi.create.content.contraptions.components.tracks.ReinforcedRailBlock; import com.simibubi.create.content.contraptions.fluids.FluidPipeBlock; -import com.simibubi.create.content.contraptions.fluids.FluidTankBlock; import com.simibubi.create.content.contraptions.processing.HeaterBlock; import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBlock; import com.simibubi.create.content.palettes.PavedBlock; @@ -475,23 +474,4 @@ public class BlockStateGen { .end(); } - public static

NonNullBiConsumer, RegistrateBlockstateProvider> tank() { - return (c, p) -> { - p.getMultipartBuilder(c.get()) - .part() - .modelFile(AssetLookup.partialBaseModel(c, p, "top")) - .addModel() - .condition(FluidTankBlock.TOP, true) - .end() - .part() - .modelFile(AssetLookup.partialBaseModel(c, p, "windows")) - .addModel() - .end() - .part() - .modelFile(AssetLookup.partialBaseModel(c, p, "bottom")) - .addModel() - .condition(FluidTankBlock.BOTTOM, true) - .end(); - }; - } } diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java new file mode 100644 index 000000000..ad9fb00a6 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidHelper.java @@ -0,0 +1,91 @@ +package com.simibubi.create.foundation.fluid; + +import javax.annotation.Nullable; + +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; +import net.minecraftforge.fluids.capability.IFluidHandlerItem; + +public class FluidHelper { + + public static enum FluidExchange { + ITEM_TO_TANK, TANK_TO_ITEM; + } + + @Nullable + public static FluidExchange exchange(IFluidHandler fluidTank, IFluidHandlerItem fluidItem, FluidExchange preferred, + int maxAmount) { + return exchange(fluidTank, fluidItem, preferred, true, maxAmount); + } + + @Nullable + public static FluidExchange exchangeAll(IFluidHandler fluidTank, IFluidHandlerItem fluidItem, + FluidExchange preferred) { + return exchange(fluidTank, fluidItem, preferred, false, Integer.MAX_VALUE); + } + + @Nullable + private static FluidExchange exchange(IFluidHandler fluidTank, IFluidHandlerItem fluidItem, FluidExchange preferred, + boolean singleOp, int maxTransferAmountPerTank) { + + // Locks in the transfer direction of this operation + FluidExchange lockedExchange = null; + + for (int tankSlot = 0; tankSlot < fluidTank.getTanks(); tankSlot++) { + for (int slot = 0; slot < fluidItem.getTanks(); slot++) { + + FluidStack fluidInTank = fluidTank.getFluidInTank(tankSlot); + int tankCapacity = fluidTank.getTankCapacity(tankSlot) - fluidInTank.getAmount(); + boolean tankEmpty = fluidInTank.isEmpty(); + + FluidStack fluidInItem = fluidItem.getFluidInTank(tankSlot); + int itemCapacity = fluidItem.getTankCapacity(tankSlot) - fluidInItem.getAmount(); + boolean itemEmpty = fluidInItem.isEmpty(); + + boolean undecided = lockedExchange == null; + boolean canMoveToTank = (undecided || lockedExchange == FluidExchange.ITEM_TO_TANK) && tankCapacity > 0; + boolean canMoveToItem = (undecided || lockedExchange == FluidExchange.TANK_TO_ITEM) && itemCapacity > 0; + + // Incompatible Liquids + if (!tankEmpty && !itemEmpty && !fluidInItem.isFluidEqual(fluidInTank)) + continue; + + // Transfer liquid to tank + if (((tankEmpty || itemCapacity <= 0) && canMoveToTank) + || undecided && preferred == FluidExchange.ITEM_TO_TANK) { + + int amount = fluidTank.fill( + fluidItem.drain(Math.min(maxTransferAmountPerTank, tankCapacity), FluidAction.EXECUTE), + FluidAction.EXECUTE); + if (amount > 0) { + lockedExchange = FluidExchange.ITEM_TO_TANK; + if (singleOp) + return lockedExchange; + continue; + } + } + + // Transfer liquid from tank + if (((itemEmpty || tankCapacity <= 0) && canMoveToItem) + || undecided && preferred == FluidExchange.TANK_TO_ITEM) { + + int amount = fluidItem.fill( + fluidTank.drain(Math.min(maxTransferAmountPerTank, itemCapacity), FluidAction.EXECUTE), + FluidAction.EXECUTE); + if (amount > 0) { + lockedExchange = FluidExchange.TANK_TO_ITEM; + if (singleOp) + return lockedExchange; + continue; + } + + } + + } + } + + return null; + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java new file mode 100644 index 000000000..4e5e7c41e --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidRenderer.java @@ -0,0 +1,157 @@ +package com.simibubi.create.foundation.fluid; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.matrix.MatrixStack.Entry; +import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.MatrixStacker; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.fluid.Fluid; +import net.minecraft.inventory.container.PlayerContainer; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; +import net.minecraftforge.fluids.FluidAttributes; +import net.minecraftforge.fluids.FluidStack; + +public class FluidRenderer { + + public static void renderTiledFluidBB(FluidStack fluidStack, float xMin, float yMin, float zMin, float xMax, + float yMax, float zMax, IRenderTypeBuffer buffer, MatrixStack ms, int light, boolean renderBottom) { + Fluid fluid = fluidStack.getFluid(); + FluidAttributes fluidAttributes = fluid.getAttributes(); + TextureAtlasSprite fluidTexture = Minecraft.getInstance() + .getSpriteAtlas(PlayerContainer.BLOCK_ATLAS_TEXTURE) + .apply(fluidAttributes.getStillTexture(fluidStack)); + + int color = fluidAttributes.getColor(fluidStack); + IVertexBuilder builder = buffer.getBuffer(RenderType.getTranslucent()); + MatrixStacker msr = MatrixStacker.of(ms); + Vec3d center = new Vec3d(xMin + (xMax - xMin) / 2, yMin + (yMax - yMin) / 2, zMin + (zMax - zMin) / 2); + + int blockLightIn = (light >> 4) & 0xf; + int luminosity = Math.max(blockLightIn, fluidAttributes.getLuminosity(fluidStack)); + light = (light & 0xf00000) | luminosity << 4; + + ms.push(); + if (fluidStack.getFluid() + .getAttributes() + .isLighterThanAir()) + MatrixStacker.of(ms) + .translate(center) + .rotateX(180) + .translateBack(center); + + for (Direction side : Iterate.directions) { + if (side == Direction.DOWN && !renderBottom) + continue; + + if (side.getAxis() + .isHorizontal()) { + ms.push(); + + if (side.getAxisDirection() == AxisDirection.NEGATIVE) + msr.translate(center) + .rotateY(180) + .translateBack(center); + + boolean X = side.getAxis() == Axis.X; + renderTiledHorizontalFace(X ? xMax : zMax, side, X ? zMin : xMin, yMin, X ? zMax : xMax, yMax, builder, + ms, light, color, fluidTexture); + + ms.pop(); + continue; + } + + renderTiledVerticalFace(side == Direction.UP ? yMax : yMin, side, xMin, zMin, xMax, zMax, builder, ms, + light, color, fluidTexture); + } + + ms.pop(); + + } + + private static void renderTiledVerticalFace(float y, Direction face, float xMin, float zMin, float xMax, float zMax, + IVertexBuilder builder, MatrixStack ms, int light, int color, TextureAtlasSprite texture) { + float x2 = 0; + float z2 = 0; + for (float x1 = xMin; x1 < xMax; x1 = x2) { + x2 = Math.min((int) (x1 + 1), xMax); + for (float z1 = zMin; z1 < zMax; z1 = z2) { + z2 = Math.min((int) (z1 + 1), zMax); + + float u1 = texture.getInterpolatedU(local(x1) * 16); + float v1 = texture.getInterpolatedV(local(z1) * 16); + float u2 = texture.getInterpolatedU(x2 == xMax ? local(x2) * 16 : 16); + float v2 = texture.getInterpolatedV(z2 == zMax ? local(z2) * 16 : 16); + + putVertex(builder, ms, x1, y, z2, color, u1, v2, face, light); + putVertex(builder, ms, x2, y, z2, color, u2, v2, face, light); + putVertex(builder, ms, x2, y, z1, color, u2, v1, face, light); + putVertex(builder, ms, x1, y, z1, color, u1, v1, face, light); + } + } + } + + private static void renderTiledHorizontalFace(float h, Direction face, float hMin, float yMin, float hMax, + float yMax, IVertexBuilder builder, MatrixStack ms, int light, int color, TextureAtlasSprite texture) { + boolean X = face.getAxis() == Axis.X; + + float h2 = 0; + float y2 = 0; + + for (float h1 = hMin; h1 < hMax; h1 = h2) { + h2 = Math.min((int) (h1 + 1), hMax); + for (float y1 = yMin; y1 < yMax; y1 = y2) { + y2 = Math.min((int) (y1 + 1), yMax); + + float u1 = texture.getInterpolatedU(local(h1) * 16); + float v1 = texture.getInterpolatedV(local(y1) * 16); + float u2 = texture.getInterpolatedU(h2 == hMax ? local(h2) * 16 : 16); + float v2 = texture.getInterpolatedV(y2 == yMax ? local(y2) * 16 : 16); + + float x1 = X ? h : h1; + float x2 = X ? h : h2; + float z1 = X ? h1 : h; + float z2 = X ? h2 : h; + + putVertex(builder, ms, x2, y2, z1, color, u1, v2, face, light); + putVertex(builder, ms, x1, y2, z2, color, u2, v2, face, light); + putVertex(builder, ms, x1, y1, z2, color, u2, v1, face, light); + putVertex(builder, ms, x2, y1, z1, color, u1, v1, face, light); + } + } + } + + private static float local(float f) { + if (f < 0) + f += 10; + return f - ((int) f); + } + + private static void putVertex(IVertexBuilder builder, MatrixStack ms, float x, float y, float z, int color, float u, + float v, Direction face, int light) { + + Vec3i n = face.getDirectionVec(); + Entry peek = ms.peek(); + int ff = 0xff; + int a = color >> 24 & ff; + int r = color >> 16 & ff; + int g = color >> 8 & ff; + int b = color & ff; + + builder.vertex(peek.getModel(), x, y, z) + .color(r, g, b, a) + .texture(u, v) + .light(light) + .normal(n.getX(), n.getY(), n.getZ()) + .endVertex(); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java b/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java new file mode 100644 index 000000000..a9a79d132 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/fluid/SmartFluidTank.java @@ -0,0 +1,29 @@ +package com.simibubi.create.foundation.fluid; + +import java.util.function.Consumer; + +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.templates.FluidTank; + +public class SmartFluidTank extends FluidTank { + + private Consumer updateCallback; + + public SmartFluidTank(int capacity, Consumer updateCallback) { + super(capacity); + this.updateCallback = updateCallback; + } + + @Override + protected void onContentsChanged() { + super.onContentsChanged(); + updateCallback.accept(getFluid()); + } + + @Override + public void setFluid(FluidStack stack) { + super.setFluid(stack); + updateCallback.accept(stack); + } + +} diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/down.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/down.json index c681ac969..5b7108e2b 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/down.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/down.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [3, -1, 3], - "to": [13, 1, 13], + "from": [3.1, -1.1, 3.1], + "to": [12.9, 1, 12.9], "faces": { "north": {"uv": [6, 6, 11, 5], "texture": "#0"}, "east": {"uv": [11, 5, 6, 6], "rotation": 180, "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/east.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/east.json index 351515e89..e1083fa1d 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/east.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/east.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [15, 3, 3], - "to": [17, 13, 13], + "from": [15, 3.1, 3.1], + "to": [17.1, 12.9, 12.9], "faces": { "north": {"uv": [6, 6, 11, 5], "rotation": 90, "texture": "#0"}, "east": {"uv": [11, 0, 6, 5], "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/north.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/north.json index 64b17013a..01fccd96e 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/north.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/north.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [3, 3, -1], - "to": [13, 13, 1], + "from": [3.1, 3.1, -1.1], + "to": [12.9, 12.9, 1], "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -5]}, "faces": { "north": {"uv": [6, 0, 11, 5], "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/south.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/south.json index 2e5a6c774..232f4f172 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/south.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/south.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [3, 3, 15], - "to": [13, 13, 17], + "from": [3.1, 3.1, 15], + "to": [12.9, 12.9, 17.1], "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 21]}, "faces": { "north": {"uv": [6, 0, 11, 5], "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/up.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/up.json index 4cd638449..3e6661e40 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/up.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/up.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [3, 15, 3], - "to": [13, 17, 13], + "from": [3.1, 15, 3.1], + "to": [12.9, 17.1, 12.9], "faces": { "north": {"uv": [6, 5, 11, 6], "texture": "#0"}, "east": {"uv": [11, 6, 6, 5], "rotation": 180, "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_pipe/rim/west.json b/src/main/resources/assets/create/models/block/fluid_pipe/rim/west.json index a175058fd..5b164d994 100644 --- a/src/main/resources/assets/create/models/block/fluid_pipe/rim/west.json +++ b/src/main/resources/assets/create/models/block/fluid_pipe/rim/west.json @@ -6,8 +6,8 @@ }, "elements": [ { - "from": [-1, 3, 3], - "to": [1, 13, 13], + "from": [-1.1, 3.1, 3.1], + "to": [1, 12.9, 12.9], "faces": { "north": {"uv": [6, 5, 11, 6], "rotation": 90, "texture": "#0"}, "east": {"uv": [6, 0, 11, 5], "texture": "#0"}, diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom.json index 6312f2eb7..b7ca78d34 100644 --- a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom.json +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom.json @@ -3,23 +3,70 @@ "parent": "block/block", "textures": { "0": "create:block/copper_casing", - "2": "create:block/fluid_tank", - "3": "create:block/oxidized/copper_block_0", - "particle": "create:block/copper_casing" + "1": "create:block/fluid_tank", + "particle": "create:block/fluid_tank" }, "elements": [ { - "name": "bottom", + "name": "Lid", "from": [0, 0, 0], "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, "faces": { - "north": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "east": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "south": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "west": {"uv": [0, 12, 16, 16], "texture": "#2"}, + "north": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "west"}, "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#3"} + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} } + }, + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 15], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [1, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 0, 16, 12], "texture": "#1", "cullface": "west"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window.json new file mode 100644 index 000000000..bb8bc0859 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window.json @@ -0,0 +1,152 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [4, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "north"}, + "east": {"uv": [12, 0, 13, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 16, 4], + "faces": { + "east": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "east"}, + "south": {"uv": [12, 0, 13, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [12, 4, 15], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "south"}, + "west": {"uv": [12, 0, 13, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 12], + "to": [1, 16, 16], + "faces": { + "north": {"uv": [12, 0, 13, 12], "texture": "#1", "cullface": "west"}, + "east": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Window", + "from": [4, 4, 1], + "to": [12, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "north"}, + "south": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "north"} + } + }, + { + "name": "Window", + "from": [15, 4, 4], + "to": [15, 16, 12], + "faces": { + "east": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "east"}, + "west": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "east"} + } + }, + { + "name": "Window", + "from": [4, 4, 15], + "to": [12, 16, 15], + "faces": { + "north": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "south"} + } + }, + { + "name": "Window", + "from": [1, 4, 4], + "to": [1, 16, 12], + "faces": { + "east": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "west"}, + "west": {"uv": [0, 4, 8, 16], "texture": "#3", "cullface": "west"} + } + }, + { + "name": "SideLeft", + "from": [12, 4, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "north"}, + "west": {"uv": [3, 0, 4, 12], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideLeft", + "from": [15, 4, 12], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3, 0, 4, 12], "texture": "#1", "cullface": "east"}, + "east": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 15], + "to": [4, 16, 16], + "faces": { + "north": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "south"}, + "east": {"uv": [3, 0, 4, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 0], + "to": [1, 16, 4], + "faces": { + "east": {"uv": [12, 0, 16, 12], "texture": "#1", "cullface": "west"}, + "south": {"uv": [3, 0, 4, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 0, 4, 12], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_ne.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_ne.json new file mode 100644 index 000000000..b8292e6a9 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_ne.json @@ -0,0 +1,71 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 16, 12], + "faces": { + "east": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [12, 0, 13, 12], "texture": "#1"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [0, 4, 1], + "to": [4, 16, 1], + "faces": { + "north": {"uv": [0, 4, 4, 16], "texture": "#3"}, + "south": {"uv": [4, 4, 8, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [15, 4, 12], + "to": [15, 16, 16], + "faces": { + "east": {"uv": [4, 4, 8, 16], "texture": "#3"}, + "west": {"uv": [0, 4, 4, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [4, 4, 0], + "to": [16, 16, 1], + "faces": { + "north": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "south": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [3, 0, 4, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [-23, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_nw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_nw.json new file mode 100644 index 000000000..eba200f6d --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_nw.json @@ -0,0 +1,71 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [12, 16, 1], + "faces": { + "north": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [12, 0, 13, 12], "texture": "#1"}, + "south": {"uv": [0, 0, 12, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [1, 4, 12], + "to": [1, 16, 16], + "faces": { + "east": {"uv": [4, 4, 8, 16], "texture": "#3"}, + "west": {"uv": [0, 4, 4, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [12, 4, 1], + "to": [16, 16, 1], + "faces": { + "north": {"uv": [4, 4, 8, 16], "texture": "#3"}, + "south": {"uv": [0, 4, 4, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 0], + "to": [1, 16, 12], + "faces": { + "east": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [3, 0, 4, 12], "texture": "#1"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 39]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_se.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_se.json new file mode 100644 index 000000000..818121858 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_se.json @@ -0,0 +1,71 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [4, 4, 15], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "south": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [12, 0, 13, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [15, 4, 0], + "to": [15, 16, 4], + "faces": { + "east": {"uv": [0, 4, 4, 16], "texture": "#3"}, + "west": {"uv": [4, 4, 8, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [0, 4, 15], + "to": [4, 16, 15], + "faces": { + "north": {"uv": [0, 4, 4, 16], "texture": "#3"}, + "south": {"uv": [4, 4, 8, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [15, 4, 4], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3, 0, 4, 12], "texture": "#1"}, + "east": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "west": {"uv": [4, 0, 16, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_sw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_sw.json new file mode 100644 index 000000000..1ad709653 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_bottom_window_sw.json @@ -0,0 +1,71 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 4, 4], + "to": [1, 16, 16], + "faces": { + "north": {"uv": [12, 0, 13, 12], "texture": "#1"}, + "east": {"uv": [0, 0, 12, 12], "texture": "#1"}, + "west": {"uv": [4, 0, 16, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [12, 4, 15], + "to": [16, 16, 15], + "faces": { + "north": {"uv": [4, 4, 8, 16], "texture": "#3"}, + "south": {"uv": [0, 4, 4, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [1, 4, 0], + "to": [1, 16, 4], + "faces": { + "east": {"uv": [0, 4, 4, 16], "texture": "#3"}, + "west": {"uv": [4, 4, 8, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 15], + "to": [12, 16, 16], + "faces": { + "north": {"uv": [4, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [3, 0, 4, 12], "texture": "#1"}, + "south": {"uv": [0, 0, 12, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [39, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle.json new file mode 100644 index 000000000..7815ab94b --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle.json @@ -0,0 +1,57 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 15], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [1, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "west"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window.json new file mode 100644 index 000000000..5f62b589c --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window.json @@ -0,0 +1,137 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [4, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [12, 0, 13, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 16, 4], + "faces": { + "east": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [12, 0, 13, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [12, 0, 15], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [12, 0, 13, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 12], + "to": [1, 16, 16], + "faces": { + "north": {"uv": [12, 0, 13, 16], "texture": "#1", "cullface": "west"}, + "east": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Window", + "from": [4, 0, 1], + "to": [12, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "north"}, + "south": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "north"} + } + }, + { + "name": "Window", + "from": [15, 0, 4], + "to": [15, 16, 12], + "faces": { + "east": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "east"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "east"} + } + }, + { + "name": "Window", + "from": [4, 0, 15], + "to": [12, 16, 15], + "faces": { + "north": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "south"}, + "south": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "south"} + } + }, + { + "name": "Window", + "from": [1, 0, 4], + "to": [1, 16, 12], + "faces": { + "east": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "west"}, + "west": {"uv": [8, 0, 16, 16], "texture": "#3", "cullface": "west"} + } + }, + { + "name": "SideLeft", + "from": [12, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "north"}, + "west": {"uv": [3, 0, 4, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideLeft", + "from": [15, 0, 12], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3, 0, 4, 16], "texture": "#1", "cullface": "east"}, + "east": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 15], + "to": [4, 16, 16], + "faces": { + "north": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "south"}, + "east": {"uv": [3, 0, 4, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 0], + "to": [1, 16, 4], + "faces": { + "east": {"uv": [12, 0, 16, 16], "texture": "#1", "cullface": "west"}, + "south": {"uv": [3, 0, 4, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 0, 4, 16], "texture": "#1", "cullface": "west"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_ne.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_ne.json new file mode 100644 index 000000000..bca53a94d --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_ne.json @@ -0,0 +1,56 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 16, 12], + "faces": { + "east": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [12, 0, 13, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 12, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [0, 0, 1], + "to": [4, 16, 1], + "faces": { + "north": {"uv": [8, 0, 12, 16], "texture": "#3"}, + "south": {"uv": [12, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [15, 0, 12], + "to": [15, 16, 16], + "faces": { + "east": {"uv": [12, 0, 16, 16], "texture": "#3"}, + "west": {"uv": [8, 0, 12, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [4, 0, 0], + "to": [16, 16, 1], + "faces": { + "north": {"uv": [0, 0, 12, 16], "texture": "#1"}, + "south": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [3, 0, 4, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_nw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_nw.json new file mode 100644 index 000000000..56e4f161f --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_nw.json @@ -0,0 +1,56 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [12, 16, 1], + "faces": { + "north": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [12, 0, 13, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 12, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [1, 0, 12], + "to": [1, 16, 16], + "faces": { + "east": {"uv": [12, 0, 16, 16], "texture": "#3"}, + "west": {"uv": [8, 0, 12, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [12, 0, 1], + "to": [16, 16, 1], + "faces": { + "north": {"uv": [12, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [8, 0, 12, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 0], + "to": [1, 16, 12], + "faces": { + "east": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [3, 0, 4, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 12, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_se.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_se.json new file mode 100644 index 000000000..2ae7111a1 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_se.json @@ -0,0 +1,56 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [4, 0, 15], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 12, 16], "texture": "#1"}, + "south": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [12, 0, 13, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [15, 0, 0], + "to": [15, 16, 4], + "faces": { + "east": {"uv": [8, 0, 12, 16], "texture": "#3"}, + "west": {"uv": [12, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [0, 0, 15], + "to": [4, 16, 15], + "faces": { + "north": {"uv": [8, 0, 12, 16], "texture": "#3"}, + "south": {"uv": [12, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [15, 0, 4], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [3, 0, 4, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 12, 16], "texture": "#1"}, + "west": {"uv": [4, 0, 16, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_sw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_sw.json new file mode 100644 index 000000000..44ff9e1a0 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_middle_window_sw.json @@ -0,0 +1,56 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 4], + "to": [1, 16, 16], + "faces": { + "north": {"uv": [12, 0, 13, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 12, 16], "texture": "#1"}, + "west": {"uv": [4, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [12, 0, 15], + "to": [16, 16, 15], + "faces": { + "north": {"uv": [12, 0, 16, 16], "texture": "#3"}, + "south": {"uv": [8, 0, 12, 16], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [1, 0, 0], + "to": [1, 16, 4], + "faces": { + "east": {"uv": [8, 0, 12, 16], "texture": "#3"}, + "west": {"uv": [12, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 15], + "to": [12, 16, 16], + "faces": { + "north": {"uv": [4, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [3, 0, 4, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 12, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single.json new file mode 100644 index 000000000..fff031667 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single.json @@ -0,0 +1,119 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "Lid", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + }, + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 15], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "east": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Lid", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 4, 16, 12], "texture": "#1", "cullface": "north"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [] + }, + { + "name": "block_middle", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [] + } + ] + }, + { + "name": "block_bottom", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3] + } + ] + }, + { + "name": "block_top", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [4, 5] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single_window.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window.json new file mode 100644 index 000000000..10732b44a --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window.json @@ -0,0 +1,166 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "5": "create:block/fluid_tank_window_single", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "Lid", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [4, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "north"}, + "east": {"uv": [12, 4, 13, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 12, 4], + "faces": { + "east": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "east"}, + "south": {"uv": [12, 4, 13, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [12, 4, 15], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "south"}, + "west": {"uv": [12, 4, 13, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 4, 12], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [12, 4, 13, 12], "texture": "#1", "cullface": "west"}, + "east": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Window", + "from": [4, 4, 1], + "to": [12, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "north"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "north"} + } + }, + { + "name": "Window", + "from": [15, 4, 4], + "to": [15, 12, 12], + "faces": { + "east": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "east"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "east"} + } + }, + { + "name": "Window", + "from": [4, 4, 15], + "to": [12, 12, 15], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "south"}, + "south": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "south"} + } + }, + { + "name": "Window", + "from": [1, 4, 4], + "to": [1, 12, 12], + "faces": { + "east": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "west"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#5", "cullface": "west"} + } + }, + { + "name": "SideLeft", + "from": [12, 4, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "north"}, + "south": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "north"}, + "west": {"uv": [3, 4, 4, 12], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideLeft", + "from": [15, 4, 12], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [3, 4, 4, 12], "texture": "#1", "cullface": "east"}, + "east": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "east"}, + "west": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 15], + "to": [4, 12, 16], + "faces": { + "north": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "south"}, + "east": {"uv": [3, 4, 4, 12], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 0], + "to": [1, 12, 4], + "faces": { + "east": {"uv": [12, 4, 16, 12], "texture": "#1", "cullface": "west"}, + "south": {"uv": [3, 4, 4, 12], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 4, 4, 12], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_ne.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_ne.json new file mode 100644 index 000000000..796adf27f --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_ne.json @@ -0,0 +1,100 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "4": "create:block/fluid_tank_window_single", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [15, 4, 0], + "to": [16, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "south": {"uv": [12, 4, 13, 12], "texture": "#1"}, + "west": {"uv": [0, 4, 12, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [0, 4, 1], + "to": [4, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 8], "texture": "#4"}, + "south": {"uv": [4, 0, 8, 8], "texture": "#4"} + } + }, + { + "name": "Window", + "from": [15, 4, 12], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 0, 8, 8], "texture": "#4"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#4"} + } + }, + { + "name": "SideLeft", + "from": [4, 4, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 4, 12, 12], "texture": "#1"}, + "south": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "west": {"uv": [3, 4, 4, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [-23, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [-23, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "block_bottom_centered_window", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [5] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_nw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_nw.json new file mode 100644 index 000000000..555cbf4ac --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_nw.json @@ -0,0 +1,100 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "4": "create:block/fluid_tank_window_single", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 4, 0], + "to": [12, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "east": {"uv": [12, 4, 13, 12], "texture": "#1"}, + "south": {"uv": [0, 4, 12, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [1, 4, 12], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 0, 8, 8], "texture": "#4"}, + "west": {"uv": [0, 0, 4, 8], "texture": "#4"} + } + }, + { + "name": "Window", + "from": [12, 4, 1], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 0, 8, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 4, 8], "texture": "#4"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 0], + "to": [1, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "south": {"uv": [3, 4, 4, 12], "texture": "#1"}, + "west": {"uv": [0, 4, 12, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 39]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 39]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "block_bottom_centered_window", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [5] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_se.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_se.json new file mode 100644 index 000000000..8987474f8 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_se.json @@ -0,0 +1,100 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "4": "create:block/fluid_tank_window_single", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [4, 4, 15], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 4, 12, 12], "texture": "#1"}, + "south": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "west": {"uv": [12, 4, 13, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [15, 4, 0], + "to": [15, 12, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [0, 0, 4, 8], "texture": "#4"}, + "west": {"uv": [4, 0, 8, 8], "texture": "#4"} + } + }, + { + "name": "Window", + "from": [0, 4, 15], + "to": [4, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 8], "texture": "#4"}, + "south": {"uv": [4, 0, 8, 8], "texture": "#4"} + } + }, + { + "name": "SideLeft", + "from": [15, 4, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [3, 4, 4, 12], "texture": "#1"}, + "east": {"uv": [0, 4, 12, 12], "texture": "#1"}, + "west": {"uv": [4, 4, 16, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "block_bottom_centered_window", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [5] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_sw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_sw.json new file mode 100644 index 000000000..84fc2e862 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_single_window_sw.json @@ -0,0 +1,100 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "4": "create:block/fluid_tank_window_single", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 4, 4], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [12, 4, 13, 12], "texture": "#1"}, + "east": {"uv": [0, 4, 12, 12], "texture": "#1"}, + "west": {"uv": [4, 4, 16, 12], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [12, 4, 15], + "to": [16, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 0, 8, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 4, 8], "texture": "#4"} + } + }, + { + "name": "Window", + "from": [1, 4, 0], + "to": [1, 12, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [0, 0, 4, 8], "texture": "#4"}, + "west": {"uv": [4, 0, 8, 8], "texture": "#4"} + } + }, + { + "name": "SideLeft", + "from": [0, 4, 15], + "to": [12, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 4, 16, 12], "texture": "#1"}, + "east": {"uv": [3, 4, 4, 12], "texture": "#1"}, + "south": {"uv": [0, 4, 12, 12], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [39, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "Bottom", + "from": [0, 0, 0], + "to": [16, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [39, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "block_bottom_centered_window", + "origin": [8, 8, 8], + "children": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [5] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top.json index 7253e97c4..c82bca162 100644 --- a/src/main/resources/assets/create/models/block/fluid_tank/block_top.json +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top.json @@ -3,24 +3,67 @@ "parent": "block/block", "textures": { "0": "create:block/copper_casing", - "2": "create:block/fluid_tank", - "3": "create:block/oxidized/copper_block_0", - "particle": "create:block/copper_casing" + "1": "create:block/fluid_tank", + "particle": "create:block/fluid_tank" }, "elements": [ { - "name": "top", + "name": "Lid", "from": [0, 12, 0], "to": [16, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 8]}, + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, "faces": { - "north": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "east": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "west": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "north": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, "down": {"uv": [0, 0, 16, 16], "texture": "#0"} } + }, + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 12, 16], + "faces": { + "east": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 15], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [1, 12, 16], + "faces": { + "east": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 4, 16, 16], "texture": "#1", "cullface": "west"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top_window.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window.json new file mode 100644 index 000000000..9c1e436a8 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window.json @@ -0,0 +1,152 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "Lid", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "east"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [4, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "north"}, + "east": {"uv": [12, 4, 13, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 12, 4], + "faces": { + "east": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [12, 4, 13, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideRight", + "from": [12, 0, 15], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "south"}, + "west": {"uv": [12, 4, 13, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideRight", + "from": [0, 0, 12], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [12, 4, 13, 16], "texture": "#1", "cullface": "west"}, + "east": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "west"} + } + }, + { + "name": "Window", + "from": [4, 0, 1], + "to": [12, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "north"}, + "south": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "north"} + } + }, + { + "name": "Window", + "from": [15, 0, 4], + "to": [15, 12, 12], + "faces": { + "east": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "east"}, + "west": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "east"} + } + }, + { + "name": "Window", + "from": [4, 0, 15], + "to": [12, 12, 15], + "faces": { + "north": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "south"}, + "south": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "south"} + } + }, + { + "name": "Window", + "from": [1, 0, 4], + "to": [1, 12, 12], + "faces": { + "east": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "west"}, + "west": {"uv": [0, 0, 8, 12], "texture": "#3", "cullface": "west"} + } + }, + { + "name": "SideLeft", + "from": [12, 0, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "north"}, + "south": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "north"}, + "west": {"uv": [3, 4, 4, 16], "texture": "#1", "cullface": "north"} + } + }, + { + "name": "SideLeft", + "from": [15, 0, 12], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [3, 4, 4, 16], "texture": "#1", "cullface": "east"}, + "east": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "east"}, + "west": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "east"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 15], + "to": [4, 12, 16], + "faces": { + "north": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "south"}, + "east": {"uv": [3, 4, 4, 16], "texture": "#1", "cullface": "south"}, + "south": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "south"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 0], + "to": [1, 12, 4], + "faces": { + "east": {"uv": [12, 4, 16, 16], "texture": "#1", "cullface": "west"}, + "south": {"uv": [3, 4, 4, 16], "texture": "#1", "cullface": "west"}, + "west": {"uv": [0, 4, 4, 16], "texture": "#1", "cullface": "west"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_ne.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_ne.json new file mode 100644 index 000000000..ea6698cc5 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_ne.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [15, 0, 0], + "to": [16, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "south": {"uv": [12, 4, 13, 16], "texture": "#1"}, + "west": {"uv": [0, 4, 12, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [0, 0, 1], + "to": [4, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 12], "texture": "#3"}, + "south": {"uv": [4, 0, 8, 12], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [15, 0, 12], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 0, 8, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 4, 12], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [4, 0, 0], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 4, 12, 16], "texture": "#1"}, + "south": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "west": {"uv": [3, 4, 4, 16], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [-23, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_nw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_nw.json new file mode 100644 index 000000000..aac6384ff --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_nw.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 0], + "to": [12, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "east": {"uv": [12, 4, 13, 16], "texture": "#1"}, + "south": {"uv": [0, 4, 12, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [1, 0, 12], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 0, 8, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 4, 12], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [12, 0, 1], + "to": [16, 12, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 0, 8, 12], "texture": "#3"}, + "south": {"uv": [0, 0, 4, 12], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 0], + "to": [1, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "south": {"uv": [3, 4, 4, 16], "texture": "#1"}, + "west": {"uv": [0, 4, 12, 16], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 39]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_se.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_se.json new file mode 100644 index 000000000..bfa61d2f8 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_se.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [4, 0, 15], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 4, 12, 16], "texture": "#1"}, + "south": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "west": {"uv": [12, 4, 13, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [15, 0, 0], + "to": [15, 12, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [0, 0, 4, 12], "texture": "#3"}, + "west": {"uv": [4, 0, 8, 12], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [0, 0, 15], + "to": [4, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [0, 0, 4, 12], "texture": "#3"}, + "south": {"uv": [4, 0, 8, 12], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [15, 0, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [3, 4, 4, 16], "texture": "#1"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#1"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_sw.json b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_sw.json new file mode 100644 index 000000000..7e7d07038 --- /dev/null +++ b/src/main/resources/assets/create/models/block/fluid_tank/block_top_window_sw.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/copper_casing", + "1": "create:block/fluid_tank", + "3": "create:block/fluid_tank_window", + "particle": "create:block/fluid_tank" + }, + "elements": [ + { + "name": "SideRight", + "from": [0, 0, 4], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [12, 4, 13, 16], "texture": "#1"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#1"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#1"} + } + }, + { + "name": "Window", + "from": [12, 0, 15], + "to": [16, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 0, 8, 12], "texture": "#3"}, + "south": {"uv": [0, 0, 4, 12], "texture": "#3"} + } + }, + { + "name": "Window", + "from": [1, 0, 0], + "to": [1, 12, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "east": {"uv": [0, 0, 4, 12], "texture": "#3"}, + "west": {"uv": [4, 0, 8, 12], "texture": "#3"} + } + }, + { + "name": "SideLeft", + "from": [0, 0, 15], + "to": [12, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]}, + "faces": { + "north": {"uv": [4, 4, 16, 16], "texture": "#1"}, + "east": {"uv": [3, 4, 4, 16], "texture": "#1"}, + "south": {"uv": [0, 4, 12, 16], "texture": "#1"} + } + }, + { + "name": "Bottom", + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [39, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 4], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "tank", + "origin": [8, 8, -23], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/block_windows.json b/src/main/resources/assets/create/models/block/fluid_tank/block_windows.json deleted file mode 100644 index eca23948b..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/block_windows.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "credit": "Made with Blockbench", - "parent": "block/block", - "textures": { - "2": "create:block/fluid_tank", - "particle": "create:block/copper_casing" - }, - "elements": [ - { - "from": [1, 0, 0], - "to": [15, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 12, 9]}, - "faces": { - "east": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "east"}, - "west": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "west"} - } - }, - { - "from": [0, 0, 1], - "to": [16, 16, 15], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "north"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "south"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_east.json b/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_east.json deleted file mode 100644 index 72066ac6b..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_east.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [15, 0, 1], - "to": [16, 16, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9]}, - "faces": { - "north": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - }, - { - "from": [14, 0, 0], - "to": [15, 16, 1], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]}, - "faces": { - "east": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_west.json b/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_west.json deleted file mode 100644 index 96f39cca5..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/north_west.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [1, 0, 0], - "to": [2, 16, 1], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 8, 8]}, - "faces": { - "west": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - }, - { - "from": [0, 0, 1], - "to": [1, 16, 2], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9]}, - "faces": { - "north": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_east.json b/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_east.json deleted file mode 100644 index 8aeb2deab..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_east.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [14, 0, 15], - "to": [15, 16, 16], - "faces": { - "east": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - }, - { - "from": [15, 0, 14], - "to": [16, 16, 15], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, - "faces": { - "south": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_west.json b/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_west.json deleted file mode 100644 index 59198e276..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/diagonal_fillers/south_west.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [0, 0, 14], - "to": [1, 16, 15], - "faces": { - "south": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - }, - { - "from": [1, 0, 15], - "to": [2, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 8, 8]}, - "faces": { - "west": {"uv": [14, 0, 15, 16], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/item.json b/src/main/resources/assets/create/models/block/fluid_tank/item.json deleted file mode 100644 index 211256bf2..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/item.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "credit": "Made with Blockbench", - "parent": "block/block", - "textures": { - "0": "create:block/copper_casing", - "2": "create:block/fluid_tank", - "3": "create:block/oxidized/copper_block_0", - "particle": "create:block/copper_casing" - }, - "elements": [ - { - "name": "bottom", - "from": [0, 0, 0], - "to": [16, 4, 16], - "faces": { - "north": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "east": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "south": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "west": {"uv": [0, 12, 16, 16], "texture": "#2"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#3"} - } - }, - { - "name": "top", - "from": [0, 12, 0], - "to": [16, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 8]}, - "faces": { - "north": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "east": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "west": {"uv": [0, 0, 16, 4], "texture": "#2"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#0"} - } - }, - { - "from": [1, 0, 0], - "to": [15, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 12, 9]}, - "faces": { - "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, - "west": {"uv": [0, 0, 16, 16], "texture": "#2"} - } - }, - { - "from": [0, 0, 1], - "to": [16, 16, 15], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#2"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_east.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_east.json deleted file mode 100644 index 12da2aeeb..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_east.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [16, 0, 0], - "to": [17, 4, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 8, 8]}, - "faces": { - "north": {"uv": [15, 12, 16, 16], "texture": "#0"}, - "east": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 12, 1, 16], "texture": "#0"}, - "west": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "up": {"uv": [0, 12, 16, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 15, 16, 16], "rotation": 270, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_north.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_north.json deleted file mode 100644 index c55207a3a..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_north.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [0, 0, -1], - "to": [16, 4, 0], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]}, - "faces": { - "north": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "east": {"uv": [0, 12, 1, 16], "texture": "#0"}, - "south": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "west": {"uv": [15, 12, 16, 16], "texture": "#0"}, - "up": {"uv": [0, 12, 16, 13], "texture": "#0"}, - "down": {"uv": [0, 15, 16, 16], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_south.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_south.json deleted file mode 100644 index 9c5957945..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_south.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [0, 0, 16], - "to": [16, 4, 17], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 9]}, - "faces": { - "north": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "east": {"uv": [15, 12, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 12, 1, 16], "texture": "#0"}, - "up": {"uv": [0, 12, 16, 13], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 15, 16, 16], "rotation": 180, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_west.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_west.json deleted file mode 100644 index 22421a92e..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/bottom_west.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [-1, 0, 0], - "to": [0, 4, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]}, - "faces": { - "north": {"uv": [0, 12, 1, 16], "texture": "#0"}, - "east": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "south": {"uv": [15, 12, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 12, 16, 16], "texture": "#0"}, - "up": {"uv": [0, 12, 16, 13], "rotation": 270, "texture": "#0"}, - "down": {"uv": [0, 15, 16, 16], "rotation": 90, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_east.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_east.json deleted file mode 100644 index 81be350ef..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_east.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [16, 12, 0], - "to": [17, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 20, 8]}, - "faces": { - "north": {"uv": [15, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 4], "texture": "#0"}, - "west": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 16, 1], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 3, 16, 4], "rotation": 270, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_north.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_north.json deleted file mode 100644 index 7c8e95315..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_north.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [0, 12, -1], - "to": [16, 16, 0], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 7]}, - "faces": { - "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [0, 0, 1, 4], "texture": "#0"}, - "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "west": {"uv": [15, 0, 16, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 16, 1], "texture": "#0"}, - "down": {"uv": [0, 3, 16, 4], "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_south.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_south.json deleted file mode 100644 index 2ec5b9ddb..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_south.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [0, 12, 16], - "to": [16, 16, 17], - "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 9]}, - "faces": { - "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "east": {"uv": [15, 0, 16, 4], "texture": "#0"}, - "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "west": {"uv": [0, 0, 1, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 16, 1], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 3, 16, 4], "rotation": 180, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_west.json b/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_west.json deleted file mode 100644 index 680787058..000000000 --- a/src/main/resources/assets/create/models/block/fluid_tank/lid_fillers/top_west.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "create:block/fluid_tank", - "particle": "create:block/fluid_tank" - }, - "elements": [ - { - "from": [-1, 12, 0], - "to": [0, 16, 16], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 20, 8]}, - "faces": { - "north": {"uv": [0, 0, 1, 4], "texture": "#0"}, - "east": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "south": {"uv": [15, 0, 16, 4], "texture": "#0"}, - "west": {"uv": [0, 0, 16, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 16, 1], "rotation": 270, "texture": "#0"}, - "down": {"uv": [0, 3, 16, 4], "rotation": 90, "texture": "#0"} - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/fluid_tank.png b/src/main/resources/assets/create/textures/block/fluid_tank.png index be50240aa0f8ab2efcd3677de56a3f7ebfcb7e14..fbcc5a2fae248c8435214922490834a28f046ec7 100644 GIT binary patch delta 194 zcmey){El&g1SbnK0|Ud`yN`k@>&}0wK2|bPln&IyuiDi z5f3IMy4nJ@ErzW#^d=bQh%nkJGYsD-#vk7EIdM-Mw*=0<&-oS8t*oM;K3v#sL=*i5Uj2J{NdhBC@!Q d+1K1~5oBP}RhFJmu+s=+x2LP0%Q~loCIGmVJm&xa delta 461 zcmV;;0W$vX0rvxt7zqdl0000V^Z#LyAs~MVa7bBm000ic000ic0Tn1pfB*mij7da6 zR5(xVlRHbpP!z}i$xTv|z9_!BNGs?fqJtm9;vnLvh&Z@9=&1Ym1ko&) zP`S;ZFEN4Z!yTNTrQZUSvuULE_po|$gFq;R$EOm82M3V4&Oni6)ao?^`~egSd31M2 zksKPqV>-)%|G5QzdVQN~kIJ~Ys~~^UB|GJ6&>D4+HUh!}JT&-312tWTNSb(78_4D> zXbVahUD@DR3m(;C8O54~`HfvC&sWxF#_isC1Q(Y@_k<>J2=;U`CD;-E@iK+l-hExk z0#tJkOwsEGldbT4J^87EWNL3=#PalmfYh0|AK&5;Wz=qt?Tw200000NkvXXu0mjf DP@L51 diff --git a/src/main/resources/assets/create/textures/block/fluid_tank_connected.png b/src/main/resources/assets/create/textures/block/fluid_tank_connected.png index c8a1824bf92ae5076e5e98f441438862181b3f80..2ce847acb3b1b50bd4a551ea28b3b15c12754235 100644 GIT binary patch literal 1610 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$jZRL%n;xc;+kP+Q)+M5Mt z-uGft*xk;E2a}TCuFD4+H3~*UV0eVU!R_qFfj;3Z@Q5sCVBk9h!i=ICUJVQkOqV@f z977`9*M@aZTdlyeMD#|S*T(<+*A7N6D4T*F8G_ zxP6|$-`Zv60xm)}AqAqs2m3y1l}-4;a7n`X!-eqXZI4{u=N((R`iHjV3zmZtX9~R+ z8Qoi#B+Volb7;yD*~g)OMEN5e_*rsi*L5Fvnk72z;Ne6oYn$aP)r{{ytL9AhV4J?- z_8wi!r2-#LTBgoVI>hwP?6UQx37Z_6j#QfcIL^kB-(IDdP^)}mG2?oJ%huB#A6$2F z+ub)@?!U_4H{LK-soBmlt1-mzbM|2om4DWdbY<=1+U+wqwEl@WdEZjs!{0c`!{X=T8Q(oqY$^n7 zqgoomHV97%ct9P7cqX3eX*?i4)9#sqmg6#2rUgPLT6!H~-9jBMa5P4)mva#a;SV@j-6Y5VtJlG~ z;Pj>mzTF>LqM1(ddoz7%ZVi(t=#ek*XDH-$oV>)a%<@KJMF{7nXA9HszCso6x&MYF?1VkqB;g=L{BJZ`m7%iwY_# zZfBhl4R`t}?tXW9)b<_EmK=-OC^RKrz-0Q=g#Oo4uSsp2@htH9!mjAeRq3o#l|0VoBPWipB{a1&LJ?3{( z+8mb7ZA_BP-*M_%CWrctll%NHsPpb!`SNh=hMtS;Ojmxc3pK6XA^j$9x6{d+Nplq@ zujF30sno(}+f2@64t2Klh?ZXq|6M=4q(b*UFVdQ&MBb@04UOi AS^xk5 literal 3227 zcmV;M3}o|(P)FH^^yX-EBH=Au%cD~GrjC}RptCw}@u6p@p zL`FpZMr6Fs;RhE6lUW8cGa0O`ti#mQ1Wa`^n8-S?*581&)eY$P*I_UiK$d0D=>SYl zPC&N{(4C%yTOU8%dGoRR2A_X%3NE{-3ky#l>44+&-t&(P-hb;$_|w(%aLZ#abgHKB z;|dej%){t!%b`*1O=F zH(r6yKKUN*efH&!QYys&l(F2f|0=lg{=ZjFzYR)uwJ}$~&G*~|U%h@5p8DuJ=*`W+ zfB*M0TzAdY@YOfRU}oDkSUS4|z4Ll-{P=%h*RG4<9|s@I%m4e#dTszpsW^%}boi)q z1bF#x2L}H-(H|NCs-&L`AmS9D8^BxdzI$l@zI}f+1^mptcMO)7*GriKLg=^N08jv` z2jjea=G5t2CbRR~VeM=mR)1N}zn@y#fcf4;{#RF^iN|@pNcmXSG=MtLZ?h5P!?nJM zLj@NNR37dU^nJX(h>L;eo+Fs_L-4IPfY%@X%i!xDPUpwLxYfhY^tKt8 zIoR z=L)k7{<%EFEZ=$i;N1fi2e7ob$c_gBlsG2@kn6dfCH4vAFnB~PG zS=rRNa|1Mh5P!UM8!Dw=B+OC9GsILVx2_Hz;^;pA-8*}E3;;DA0DA-;4&g@~!f@gN zs-|xf*eLnuDlB&SEyK@qM~)sU^5+-D1L#b-@L0~akEi0Rraub)V=LHKAAA0>?ZbUU z^ydkGE-IR`W8ug(v@F{Id_CC5NWz~Bp{MMae6o!3oNWN92g`b}RDLm(uGhgffYgI! zJywwBILS{drM51E-GIWyJ?UQfJVPD|Y2=!j-Y>W>JwpALmpFUV0FPcOxlE zscSrf*cWikwR<=36QUrvz68Xmqh!j;*zEDBKnXsEFM?tKstjku;?x^jR_qJ7WH#Hp zQyAh)(BlCpdt+BTKnPyyi{PH+*KQXe9Rj6OfPTF^WCTFV=kzMu2qKAxpiTj`9RZ{U zz|9X}yB#c504J>7whQ3k&7n4i{6dHC7&!L*d?bqT0w+KDFwYaPWAF8>`~XS;q4@z~ z)5rQa7h`M&z=?^p@gGBxp>+i12hj5b?73-yl^;Nl>OKC`QqDIwrZ6UbZhixs0Z91| zRbC97cpIos0o-^1YycWTtSKObK8BIo5?r`k!n)uaKLwbJC|`a6EU*0kc!>nBf|&~| zpYU)Lzs_Fak8`ydsC%=MCeldD-XdSHk`9(zZMU*c;fJ=ZFQs&A}Fbeur@E@wY z7`WU3IQRQ)L=%2E^H~hVjH-^I5r7hx@9Mz`@6WF=D#cRi42=Mks9x6yknsLIiB!dm zs@#?}fbV|4Zw^m*ccRQuDV9oS$N+rz`+bYB7Gf15+ z=vT8ah($lhq2w1Z@i7mgDD*=WRTfU{3wZ7ECs_Fbupy=|f#ZzPojIsHZhiq1kNil_ z@;UsMrO42F#lC=dUV24*md`myP{RJ>l^5ih%DLwlCO#xrvgwQ9@E@wEvT(JU0x0JQ zYQDE+DhT@8j0XX>q%y@v1n8KL!QGgu&r2;qG z&y6XR(l_zqDL`^RADNME!=&_;K&bf*s0yIu7r?rFY3-==Ld&u910W$i9zg$2$q#_# z^>_eGNXf}h5SxAo|2|=J;~~uYe0U#y&U03N07}Ka`~bc>623S;gHLuL&q=phLMl#} zW=J3zKr{4I8kflcN)v4}DozH_3_X>`Wio)$MB9vtz4-xr{%~xj>wY~2&&dy9#seVz zHsg!V5vb-TJ_wS=190;LnEre;F#J&S3yd3HYyi@;czlO2C)Y44OOFS@cmmG-ew#nP z&3Nfive*}(zjK(HAE3yePVwfs;sM%lhW zYh$boJcoZ*egMh{A`v!XYZniIOmURL5w=ZOW#Bpd+x+nyd@KVPg|Sh1&8Gm4KU`|T zvGH8~ZTSf}?WYLURi<|F0N5kdUYdKq-n9jx_`_r1CH(7(YHd7#G~d6?+By05rFbs? zNKcPP!0(**9Z*I9pFiKsk6_m6!&7*mmSM*O_%d?&{P|VmeS-1vUw6EZKl3@;7a+}Z zS2dn1pm8tHHUM7__6e+NypO-OJ!cz0)je2BzikTkwU=!GRrg>ieV;(u_MB}1vG?&@ zflKLg>5Y4NmI0KJub(4eX}*2)iaEu1p!3&syiL|*11KwBKh*%F`SxA;1t>f;9beQ& zvH_?HY}vLs{&?veF2&pO3s4L|m1#P@lyd;i%A8ZyrWh&S7Ei!2fTrWc24L%foLwzce*M3KHL-ns!`b<%wM`V>HkM=+a^;sGKWfEq%5 z{%BXee`&sbEwt?ZzPsp)&UqDi0xC9Efft)I0o7Hgf=6OCB zuhZxF25j5grsJhXJv0J@=DVi|F;>2Rv%%;c#NVj-0mcm<)c`^laU5rkG~d73VErgK zWEhd44_&1iq35^faoG^R)w{AUx4I& z1Dtf}zU{3~bv3|8-yT+;EL!@$0rdv)1}N_kzU;!sr{iEQy7KdLfU4gYAbsD!j=k5X zX)M&L&;Z^(c=zC`kG_N6+#H1D`F{-Z((h8ekl>C}=~P0tCVv2WSU_G*^FF&f9{1{oOlzfZu25x5L`me*V9DHs71r z{2%|p@6+36hRTc@zwq>tvnzStEcgUp~qY?*ve8=2q=bZ@I3m%_kc`(fxi5=D<(r{d}rYq{c&~)3$PC15ko7 z@Au>Hoc9H^O~7?;FWUfI_xmZgbL%dUw(-X{0N4F~$~vHJ0|e*;z|*(J4r?g;<@ N002ovPDHLkV1lEjK3D(% diff --git a/src/main/resources/assets/create/textures/block/fluid_tank_window.png b/src/main/resources/assets/create/textures/block/fluid_tank_window.png new file mode 100644 index 0000000000000000000000000000000000000000..3c7bbdfab2068fcd80430b0db9bcd5adc09248e9 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1en@QbI5V~B-+a*Wj5uk#r>^lW|}I&k{jp$|Ww z%L`0D=+MUQQ~&4Ofe)tpXD+;QZ-$@_1FLx4-aqv^$`c!(zI!d7;Cpd(c(ZDr&F=#X z6jcvwFfkFyS-`>19w8&15G3|AK_L58`UP>(WR`~owWbEVMgl7C90rYZI=CN9Ze~;y z`1tUxwgJ0j!yYFd2I&U=55-QB5ey!DISmaPBqA6j8<>PxI4UPD;O1adbMjMRX>-sK zU}8yb6i|4<q1eXMmNq@iq01m(bYSxJf00053NklwF+9e>1z=fEfR!2jD&1NqjEHv<~@4Fgvfee z=AOCtoO9oM&K+%gDPsFtAh^9cbiHi*ysc%!A^DJzG5Y~*?SCI?v{x7A?bo+=xELIo z9zmO-<2h|1`Dh`X$|I35<++Y$WQ{&*BVrYcGHN?(5t|MS49)b&Wa-6{ku-Jah@GU+ z*Q?{zv~ZC7tOgefMKn{k3O+u%#qL>D78NT~Va(1AN|LTl9p=4RSpmG>7P!=zxodqe zshy+mdeFeeSbqSET?UproCLMS`VIQ3LVKEQv0YiGl7wgd2~`v2YXto=5*J_0)(BM4 zZIl)3ZcS`SKzyEdDOf$6Q|gq0TB>bi?I z6@NrHuS=!qH5P)6opy)Tip|w`*b3G*{s&^Amf9Rxr1AVw30D}1cfqIuy@V)go)Grl zcV1RvK#U(qc6MfGc6Mf-wKg-QBOf3%gcXzu}5X-B=IX zyqULFJCjNs&ws`{6ov;|(AE?}EbIrUEY@4_tSNM;PK#_8?jOX+x4wp{i8<@`IkFO) ze~eZO%;2LNWULx2ktG0$gj%Fv)lg@$GZ|E3t|b(I)