From 0739e0580b5018f9135fc44ac397f30d9f470f33 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Tue, 9 Mar 2021 15:54:51 +0300 Subject: [PATCH] Stalactite enhancements (WIP) --- .../betterend/blocks/basis/EndSignBlock.java | 8 +- .../blocks/basis/FeatureSaplingBlock.java | 2 +- .../blocks/basis/StalactiteBlock.java | 100 +++++++++++++++--- .../java/ru/betterend/patterns/Patterns.java | 14 +-- .../features/terrain/StalactiteFeature.java | 10 +- .../block/{sapling.json => cross.json} | 0 .../patterns/block/cross_shaded.json | 25 +++++ .../patterns/block/stone_stalactite_1.json | 44 ++++++++ .../patterns/block/stone_stalactite_2.json | 44 ++++++++ .../patterns/block/stone_stalactite_3.json | 44 ++++++++ .../patterns/blockstate/stalactite.json | 24 +++-- .../textures/block/end_stone_stalactite_0.png | Bin 0 -> 171 bytes .../textures/block/end_stone_stalactite_1.png | Bin 0 -> 181 bytes .../textures/block/end_stone_stalactite_2.png | Bin 0 -> 190 bytes .../textures/block/end_stone_stalactite_3.png | Bin 0 -> 186 bytes .../textures/block/end_stone_stalactite_4.png | Bin 0 -> 199 bytes .../textures/block/end_stone_stalactite_5.png | Bin 0 -> 197 bytes .../textures/block/end_stone_stalactite_6.png | Bin 0 -> 214 bytes .../textures/block/end_stone_stalactite_7.png | Bin 0 -> 213 bytes 19 files changed, 272 insertions(+), 43 deletions(-) rename src/main/resources/assets/betterend/patterns/block/{sapling.json => cross.json} (100%) create mode 100644 src/main/resources/assets/betterend/patterns/block/cross_shaded.json create mode 100644 src/main/resources/assets/betterend/patterns/block/stone_stalactite_1.json create mode 100644 src/main/resources/assets/betterend/patterns/block/stone_stalactite_2.json create mode 100644 src/main/resources/assets/betterend/patterns/block/stone_stalactite_3.json create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_0.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_1.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_2.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_3.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_4.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_5.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_6.png create mode 100644 src/main/resources/assets/betterend/textures/block/end_stone_stalactite_7.png diff --git a/src/main/java/ru/betterend/blocks/basis/EndSignBlock.java b/src/main/java/ru/betterend/blocks/basis/EndSignBlock.java index 0a7c8d6b..ac4b6c4d 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndSignBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndSignBlock.java @@ -102,8 +102,7 @@ public class EndSignBlock extends AbstractSignBlock implements BlockPatterned { } @Override - public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, - ItemStack itemStack) { + public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { if (placer != null && placer instanceof PlayerEntity) { ESignBlockEntity sign = (ESignBlockEntity) world.getBlockEntity(pos); if (!world.isClient) { @@ -124,7 +123,7 @@ public class EndSignBlock extends AbstractSignBlock implements BlockPatterned { } return super.getStateForNeighborUpdate(state, facing, neighborState, world, pos, neighborPos); } - + @Override public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { if (!state.get(FLOOR)) { @@ -143,7 +142,8 @@ public class EndSignBlock extends AbstractSignBlock implements BlockPatterned { return this.getDefaultState().with(FLOOR, true) .with(ROTATION, MathHelper.floor((180.0 + ctx.getPlayerYaw() * 16.0 / 360.0) + 0.5 - 12) & 15) .with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER); - } else if (ctx.getSide() != Direction.DOWN) { + } + else if (ctx.getSide() != Direction.DOWN) { BlockState blockState = this.getDefaultState(); FluidState fluidState = ctx.getWorld().getFluidState(ctx.getBlockPos()); WorldView worldView = ctx.getWorld(); diff --git a/src/main/java/ru/betterend/blocks/basis/FeatureSaplingBlock.java b/src/main/java/ru/betterend/blocks/basis/FeatureSaplingBlock.java index 7dcf202e..c5bcb65b 100644 --- a/src/main/java/ru/betterend/blocks/basis/FeatureSaplingBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/FeatureSaplingBlock.java @@ -109,7 +109,7 @@ public abstract class FeatureSaplingBlock extends BlockBaseNotFull implements Fe block = block.split("/")[1]; return Patterns.createJson(Patterns.ITEM_BLOCK, block); } - return Patterns.createJson(Patterns.BLOCK_SAPLING, block); + return Patterns.createJson(Patterns.BLOCK_CROSS, block); } @Override diff --git a/src/main/java/ru/betterend/blocks/basis/StalactiteBlock.java b/src/main/java/ru/betterend/blocks/basis/StalactiteBlock.java index 9a7f60ac..d4d74dd4 100644 --- a/src/main/java/ru/betterend/blocks/basis/StalactiteBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/StalactiteBlock.java @@ -4,11 +4,19 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.FluidFillable; import net.minecraft.block.ShapeContext; +import net.minecraft.block.Waterloggable; import net.minecraft.entity.LivingEntity; +import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.FluidState; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; import net.minecraft.state.property.IntProperty; +import net.minecraft.state.property.Properties; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos.Mutable; @@ -20,29 +28,62 @@ import net.minecraft.world.World; import net.minecraft.world.WorldAccess; import net.minecraft.world.WorldView; import ru.betterend.blocks.BlockProperties; +import ru.betterend.client.render.ERenderLayer; +import ru.betterend.interfaces.IRenderTypeable; import ru.betterend.patterns.Patterns; -public class StalactiteBlock extends BlockBaseNotFull { +public class StalactiteBlock extends BlockBaseNotFull implements Waterloggable, FluidFillable, IRenderTypeable { + public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; + public static final BooleanProperty IS_FLOOR = BlockProperties.IS_FLOOR; public static final IntProperty SIZE = BlockProperties.SIZE; private static final Mutable POS = new Mutable(); private static final VoxelShape[] SHAPES; - private final Block source; public StalactiteBlock(Block source) { super(FabricBlockSettings.copy(source).nonOpaque()); - this.setDefaultState(getStateManager().getDefaultState().with(SIZE, 0)); - this.source = source; + this.setDefaultState(getStateManager().getDefaultState().with(SIZE, 0).with(IS_FLOOR, true).with(WATERLOGGED, false)); } @Override protected void appendProperties(StateManager.Builder stateManager) { - stateManager.add(SIZE); + stateManager.add(WATERLOGGED, IS_FLOOR, SIZE); } @Override public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) { return SHAPES[state.get(SIZE)]; } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + WorldView worldView = ctx.getWorld(); + BlockPos blockPos = ctx.getBlockPos(); + Direction dir = ctx.getSide(); + boolean water = worldView.getFluidState(blockPos).getFluid() == Fluids.WATER; + + if (dir == Direction.UP) { + if (sideCoversSmallSquare(worldView, blockPos.up(), Direction.DOWN)) { + return getDefaultState().with(IS_FLOOR, false).with(WATERLOGGED, water); + } + else if (sideCoversSmallSquare(worldView, blockPos.down(), Direction.UP)) { + return getDefaultState().with(IS_FLOOR, true).with(WATERLOGGED, water); + } + else { + return null; + } + } + else { + if (sideCoversSmallSquare(worldView, blockPos.up(), Direction.DOWN)) { + return getDefaultState().with(IS_FLOOR, false).with(WATERLOGGED, water); + } + else if (sideCoversSmallSquare(worldView, blockPos.down(), Direction.UP)) { + return getDefaultState().with(IS_FLOOR, true).with(WATERLOGGED, water); + } + else { + return null; + } + } + } @Override public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { @@ -55,7 +96,7 @@ public class StalactiteBlock extends BlockBaseNotFull { BlockState state2 = world.getBlockState(POS); int size = state2.get(SIZE); if (size < i) { - world.setBlockState(POS, state2.with(SIZE, i)); + world.setBlockState(POS, state2.with(SIZE, i).with(IS_FLOOR, true)); } else { break; @@ -75,7 +116,7 @@ public class StalactiteBlock extends BlockBaseNotFull { BlockState state2 = world.getBlockState(POS); int size = state2.get(SIZE); if (size < i) { - world.setBlockState(POS, state2.with(SIZE, i)); + world.setBlockState(POS, state2.with(SIZE, i).with(IS_FLOOR, false)); } else { break; @@ -94,18 +135,29 @@ public class StalactiteBlock extends BlockBaseNotFull { return Blocks.AIR.getDefaultState(); } else { + if (checkUp(world, neighborPos, state.get(SIZE))) { + state = state.with(IS_FLOOR, false); + } return state; } } @Override public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { - BlockState upState = world.getBlockState(pos.up()); - BlockState downState = world.getBlockState(pos.down()); int size = state.get(SIZE); - boolean validUp = (upState.isOf(this) && upState.get(SIZE) >= size) || upState.isFullCube(world, pos.up()); - boolean validDown = (downState.isOf(this) && downState.get(SIZE) >= size) || downState.isFullCube(world, pos.down()); - return validUp || validDown; + return checkUp(world, pos, size) || checkDown(world, pos, size); + } + + private boolean checkUp(BlockView world, BlockPos pos, int size) { + BlockPos p = pos.up(); + BlockState state = world.getBlockState(p); + return (state.getBlock() instanceof StalactiteBlock && state.get(SIZE) >= size) || state.isFullCube(world, p); + } + + private boolean checkDown(BlockView world, BlockPos pos, int size) { + BlockPos p = pos.down(); + BlockState state = world.getBlockState(p); + return (state.getBlock() instanceof StalactiteBlock && state.get(SIZE) >= size) || state.isFullCube(world, p); } @Override @@ -114,15 +166,33 @@ public class StalactiteBlock extends BlockBaseNotFull { if (block.contains("item")) { return Patterns.createJson(Patterns.ITEM_GENERATED, "item/" + blockId.getPath()); } - blockId = Registry.BLOCK.getId(source); - int shape = Character.getNumericValue(block.charAt(block.lastIndexOf('_') + 1)); - return Patterns.createJson(Patterns.BLOCKS_STALACTITE[shape], blockId.getNamespace() + ":block/" + blockId.getPath()); + return Patterns.createJson(Patterns.BLOCK_CROSS_SHADED, block); } @Override public Identifier statePatternId() { return Patterns.STATE_STALACTITE; } + + @Override + public boolean canFillWithFluid(BlockView world, BlockPos pos, BlockState state, Fluid fluid) { + return false; + } + + @Override + public boolean tryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState) { + return false; + } + + @Override + public FluidState getFluidState(BlockState state) { + return state.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : Fluids.EMPTY.getDefaultState(); + } + + @Override + public ERenderLayer getRenderLayer() { + return ERenderLayer.CUTOUT; + } static { SHAPES = new VoxelShape[8]; diff --git a/src/main/java/ru/betterend/patterns/Patterns.java b/src/main/java/ru/betterend/patterns/Patterns.java index d37b63e8..ad73c1a7 100644 --- a/src/main/java/ru/betterend/patterns/Patterns.java +++ b/src/main/java/ru/betterend/patterns/Patterns.java @@ -71,7 +71,8 @@ public class Patterns { public final static Identifier BLOCK_DOOR_TOP_HINGE = BetterEnd.makeID("patterns/block/door_top_hinge.json"); public final static Identifier BLOCK_DOOR_BOTTOM = BetterEnd.makeID("patterns/block/door_bottom.json"); public final static Identifier BLOCK_DOOR_BOTTOM_HINGE = BetterEnd.makeID("patterns/block/door_bottom_hinge.json"); - public final static Identifier BLOCK_SAPLING = BetterEnd.makeID("patterns/block/sapling.json"); + public final static Identifier BLOCK_CROSS = BetterEnd.makeID("patterns/block/cross.json"); + public final static Identifier BLOCK_CROSS_SHADED = BetterEnd.makeID("patterns/block/cross_shaded.json"); public final static Identifier BLOCK_GATE_CLOSED = BetterEnd.makeID("patterns/block/fence_gate_closed.json"); public final static Identifier BLOCK_GATE_CLOSED_WALL = BetterEnd.makeID("patterns/block/wall_gate_closed.json"); public final static Identifier BLOCK_GATE_OPEN = BetterEnd.makeID("patterns/block/fence_gate_open.json"); @@ -105,17 +106,6 @@ public class Patterns { public final static Identifier BLOCK_TOP_SIDE_BOTTOM = BetterEnd.makeID("patterns/block/top_side_bottom.json"); public final static Identifier BLOCK_PATH = BetterEnd.makeID("patterns/block/path.json"); - public final static Identifier[] BLOCKS_STALACTITE = new Identifier[] { - BetterEnd.makeID("patterns/block/stalactite_0.json"), - BetterEnd.makeID("patterns/block/stalactite_1.json"), - BetterEnd.makeID("patterns/block/stalactite_2.json"), - BetterEnd.makeID("patterns/block/stalactite_3.json"), - BetterEnd.makeID("patterns/block/stalactite_4.json"), - BetterEnd.makeID("patterns/block/stalactite_5.json"), - BetterEnd.makeID("patterns/block/stalactite_6.json"), - BetterEnd.makeID("patterns/block/stalactite_7.json") - }; - //Models Item public final static Identifier ITEM_WALL = BetterEnd.makeID("patterns/item/pattern_wall.json"); public final static Identifier ITEM_FENCE = BetterEnd.makeID("patterns/item/pattern_fence.json"); diff --git a/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java b/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java index a8093cc5..6e7438ff 100644 --- a/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java @@ -4,6 +4,7 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos.Mutable; import net.minecraft.util.math.MathHelper; @@ -33,14 +34,14 @@ public class StalactiteFeature extends DefaultFeature { } Mutable mut = new Mutable().set(pos); - int height = random.nextInt(8); + int height = random.nextInt(8); int dir = ceiling ? -1 : 1; boolean stalagnate = false; for (int i = 1; i <= height; i++) { mut.setY(pos.getY() + i * dir); BlockState state = world.getBlockState(mut); - if (!state.isAir()) { + if (!state.getMaterial().isReplaceable()) { stalagnate = state.isIn(EndTags.GEN_TERRAIN); height = i - 1; break; @@ -51,7 +52,10 @@ public class StalactiteFeature extends DefaultFeature { for (int i = 0; i < height; i++) { mut.setY(pos.getY() + i * dir); int size = stalagnate ? MathHelper.abs(i - center) + 1 : height - i - 1; - BlocksHelper.setWithoutUpdate(world, mut, block.getDefaultState().with(StalactiteBlock.SIZE, size)); + boolean waterlogged = !world.getFluidState(mut).isEmpty(); + BlockState base = block.getDefaultState().with(StalactiteBlock.SIZE, size).with(Properties.WATERLOGGED, waterlogged); + BlockState state = stalagnate ? base.with(StalactiteBlock.IS_FLOOR, dir > 0 ? i < center : i > center) : base.with(StalactiteBlock.IS_FLOOR, dir > 0); + BlocksHelper.setWithoutUpdate(world, mut, state); } return true; diff --git a/src/main/resources/assets/betterend/patterns/block/sapling.json b/src/main/resources/assets/betterend/patterns/block/cross.json similarity index 100% rename from src/main/resources/assets/betterend/patterns/block/sapling.json rename to src/main/resources/assets/betterend/patterns/block/cross.json diff --git a/src/main/resources/assets/betterend/patterns/block/cross_shaded.json b/src/main/resources/assets/betterend/patterns/block/cross_shaded.json new file mode 100644 index 00000000..7ff90f6b --- /dev/null +++ b/src/main/resources/assets/betterend/patterns/block/cross_shaded.json @@ -0,0 +1,25 @@ +{ + "ambientocclusion": false, + "textures": { + "cross": "betterend:block/%texture%", + "particle": "#cross" + }, + "elements": [ + { "from": [ 0.8, 0, 8 ], + "to": [ 15.2, 16, 8 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" } + } + }, + { "from": [ 8, 0, 0.8 ], + "to": [ 8, 16, 15.2 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" } + } + } + ] +} diff --git a/src/main/resources/assets/betterend/patterns/block/stone_stalactite_1.json b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_1.json new file mode 100644 index 00000000..c2ed967d --- /dev/null +++ b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_1.json @@ -0,0 +1,44 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/%texture%", + "texture": "betterend:block/%texture%" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 6, 0, 6 ], + "to": [ 10, 16, 10 ], + "faces": { + "down": { "uv": [ 6, 6, 10, 10 ], "texture": "#texture" }, + "up": { "uv": [ 6, 6, 10, 10 ], "texture": "#texture" }, + "north": { "uv": [ 6, 0, 10, 16 ], "texture": "#texture" }, + "south": { "uv": [ 6, 0, 10, 16 ], "texture": "#texture" }, + "west": { "uv": [ 6, 0, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 6, 0, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 0.0007, 0, -0.0007 ], + "to": [ 22.5007, 16, 0.0003 ], + "rotation": { "origin": [ 0, 0, 0 ], "axis": "y", "angle": -45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ -6.5007, 0, -0.0003 ], + "to": [ 15.9993, 16, 0.0007 ], + "rotation": { "origin": [ 16, 0, 0 ], "axis": "y", "angle": 45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/patterns/block/stone_stalactite_2.json b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_2.json new file mode 100644 index 00000000..f33e1e64 --- /dev/null +++ b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_2.json @@ -0,0 +1,44 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/%texture%", + "texture": "betterend:block/%texture%" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 5, 0, 5 ], + "to": [ 11, 16, 11 ], + "faces": { + "down": { "uv": [ 5, 5, 11, 11 ], "texture": "#texture" }, + "up": { "uv": [ 5, 5, 11, 11 ], "texture": "#texture" }, + "north": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture" }, + "south": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture" }, + "west": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture" }, + "east": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 0.0007, 0, -0.0007 ], + "to": [ 22.5007, 16, 0.0003 ], + "rotation": { "origin": [ 0, 0, 0 ], "axis": "y", "angle": -45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ -6.5007, 0, -0.0003 ], + "to": [ 15.9993, 16, 0.0007 ], + "rotation": { "origin": [ 16, 0, 0 ], "axis": "y", "angle": 45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/patterns/block/stone_stalactite_3.json b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_3.json new file mode 100644 index 00000000..145acf77 --- /dev/null +++ b/src/main/resources/assets/betterend/patterns/block/stone_stalactite_3.json @@ -0,0 +1,44 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/%texture%", + "texture": "betterend:block/%texture%" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 4, 0, 4 ], + "to": [ 12, 16, 12 ], + "faces": { + "down": { "uv": [ 4, 4, 12, 12 ], "texture": "#texture" }, + "up": { "uv": [ 4, 4, 12, 12 ], "texture": "#texture" }, + "north": { "uv": [ 4, 0, 12, 16 ], "texture": "#texture" }, + "south": { "uv": [ 4, 0, 12, 16 ], "texture": "#texture" }, + "west": { "uv": [ 4, 0, 12, 16 ], "texture": "#texture" }, + "east": { "uv": [ 4, 0, 12, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 0.0007, 0, -0.0007 ], + "to": [ 22.5007, 16, 0.0003 ], + "rotation": { "origin": [ 0, 0, 0 ], "axis": "y", "angle": -45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ -6.5007, 0, -0.0003 ], + "to": [ 15.9993, 16, 0.0007 ], + "rotation": { "origin": [ 16, 0, 0 ], "axis": "y", "angle": 45 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/patterns/blockstate/stalactite.json b/src/main/resources/assets/betterend/patterns/blockstate/stalactite.json index 9d093574..d9e41bcc 100644 --- a/src/main/resources/assets/betterend/patterns/blockstate/stalactite.json +++ b/src/main/resources/assets/betterend/patterns/blockstate/stalactite.json @@ -1,13 +1,21 @@ { "variants": { - "size=0": { "model": "betterend:pattern/%block%/%block%_0" }, - "size=1": { "model": "betterend:pattern/%block%/%block%_1" }, - "size=2": { "model": "betterend:pattern/%block%/%block%_2" }, - "size=3": { "model": "betterend:pattern/%block%/%block%_3" }, - "size=4": { "model": "betterend:pattern/%block%/%block%_4" }, - "size=5": { "model": "betterend:pattern/%block%/%block%_5" }, - "size=6": { "model": "betterend:pattern/%block%/%block%_6" }, - "size=7": { "model": "betterend:pattern/%block%/%block%_7" } + "size=0,is_floor=true": { "model": "betterend:pattern/%block%/%block%_0" }, + "size=1,is_floor=true": { "model": "betterend:pattern/%block%/%block%_1" }, + "size=2,is_floor=true": { "model": "betterend:pattern/%block%/%block%_2" }, + "size=3,is_floor=true": { "model": "betterend:pattern/%block%/%block%_3" }, + "size=4,is_floor=true": { "model": "betterend:pattern/%block%/%block%_4" }, + "size=5,is_floor=true": { "model": "betterend:pattern/%block%/%block%_5" }, + "size=6,is_floor=true": { "model": "betterend:pattern/%block%/%block%_6" }, + "size=7,is_floor=true": { "model": "betterend:pattern/%block%/%block%_7" }, + "size=0,is_floor=false": { "model": "betterend:pattern/%block%/%block%_0", "x": 180 }, + "size=1,is_floor=false": { "model": "betterend:pattern/%block%/%block%_1", "x": 180 }, + "size=2,is_floor=false": { "model": "betterend:pattern/%block%/%block%_2", "x": 180 }, + "size=3,is_floor=false": { "model": "betterend:pattern/%block%/%block%_3", "x": 180 }, + "size=4,is_floor=false": { "model": "betterend:pattern/%block%/%block%_4", "x": 180 }, + "size=5,is_floor=false": { "model": "betterend:pattern/%block%/%block%_5", "x": 180 }, + "size=6,is_floor=false": { "model": "betterend:pattern/%block%/%block%_6", "x": 180 }, + "size=7,is_floor=false": { "model": "betterend:pattern/%block%/%block%_7", "x": 180 } } } \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_0.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_0.png new file mode 100644 index 0000000000000000000000000000000000000000..424bbbb75b3074a38840a98f1b3ab7c27f5e535a GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbK_^mK6yk(kkf|CFBpRTa1O_-=I^f6j%N@EvOLIdX$wzF{zOAZ-oG@9=;U}We$XS~G>sF}gj L)z4*}Q$iB}G2T3_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_1.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_1.png new file mode 100644 index 0000000000000000000000000000000000000000..4e63ebf754c5130f759d7d819a97f1e1741242c1 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbMb_H=O!k(fI5tRokL zB9HUMTYt{{?bqRG3JXv>?e3)H7F4#zlZz#dJ+OiKT<0n7oz3=tThjJ3yz5m{D=EIs Wa5wbG+POeu7(8A5T-G@yGywq25<*)5 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_2.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2567f16097ad8f6a75071edf73441d6c266a9941 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbLw@pN$vk(fI5oF^B9 z0SB`~w$T6oPxJx;sd1k%k@z^kh^$U-mnZQThss;USe-8_8Em8^u1|zRb f*CxXQzi+b4PGNNH59lrin#bVj>gTe~DWM4f3nWCR literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_3.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_3.png new file mode 100644 index 0000000000000000000000000000000000000000..25b05051634a1b430f12c36cbae15d1ce443ce81 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbLw@N{tuk(gS0){&1v zfrHsG9Zy6|oZc}-I80c5L2uDPW-F$uP4^cyL}ogCFMD{7&y3mb aWFu>V9>b^Kj{-n$V(@hJb6Mw<&;$VY6GM#v literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_4.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_4.png new file mode 100644 index 0000000000000000000000000000000000000000..61662aba97cce71efc9e805e65bb1486fb33c013 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbNG^>lFzk(gS0-cjg) z0SA)<_oV;!J58o1@I8IjXBD;eaGvSwBTGdXbXOWCs5TUFv+rO&&nojk<-u-c_iYN( p%}&N=>^ygxcgF$k&!Tb_jE}c4PTIfhiz(1x22WQ%mvv4FO#uA`O4k4Y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_5.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_5.png new file mode 100644 index 0000000000000000000000000000000000000000..280ca7371e1bc5560617dc994f0984a224586817 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbNG_H=O!k(k69OSyuf+rx<%gTe~DWM4f!ct4) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_6.png b/src/main/resources/assets/betterend/textures/block/end_stone_stalactite_6.png new file mode 100644 index 0000000000000000000000000000000000000000..0c27b76c93bf9b58c149c1ade455a0e2f52dc846 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~(Ey(iS0H_K zU-#K#-B)i-x%X_zyKh^*{n}fdd6pk2!Cn&N7tHV<43^d}`wbL|@pN$vk(e5L{x)BO z0uS?ri{1bKpA=hUq`2oxiubNnS{J74E||w|p=281@+ZOP!_|g=2PMw5eB*LZHG9Ch zh~Goy;P#s_o(auUQm)-ls4qXC%X!bBdsV!-ek3z@o!Kq+{qw4Vd23Oo4G|# zDN71AoDzr-;9MqJ#i+&4yDCIB_W)b|f_qW62e|p0UNPNb3}OESw1&ac)z4*}Q$iB} D`#Mc# literal 0 HcmV?d00001