diff --git a/src/main/java/ru/betterend/blocks/BlockEndLotusLeaf.java b/src/main/java/ru/betterend/blocks/BlockEndLotusLeaf.java new file mode 100644 index 00000000..4c4f3762 --- /dev/null +++ b/src/main/java/ru/betterend/blocks/BlockEndLotusLeaf.java @@ -0,0 +1,50 @@ +package ru.betterend.blocks; + +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Material; +import net.minecraft.block.ShapeContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.BlockMirror; +import net.minecraft.util.BlockRotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.BlockView; +import ru.betterend.blocks.BlockProperties.TripleShape; +import ru.betterend.blocks.basis.BlockBaseNotFull; +import ru.betterend.util.BlocksHelper; + +public class BlockEndLotusLeaf extends BlockBaseNotFull { + public static final EnumProperty HORIZONTAL_FACING = Properties.HORIZONTAL_FACING; + public static final EnumProperty SHAPE = BlockProperties.TRIPLE_SHAPE; + private static final VoxelShape VSHAPE = Block.createCuboidShape(0, 0, 0, 16, 1, 16); + + public BlockEndLotusLeaf() { + super(FabricBlockSettings.of(Material.PLANT).sounds(BlockSoundGroup.WET_GRASS)); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(SHAPE, HORIZONTAL_FACING); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) { + return VSHAPE; + } + + @Override + public BlockState rotate(BlockState state, BlockRotation rotation) { + return BlocksHelper.rotateHorizontal(state, rotation, HORIZONTAL_FACING); + } + + @Override + public BlockState mirror(BlockState state, BlockMirror mirror) { + return BlocksHelper.mirrorHorizontal(state, mirror, HORIZONTAL_FACING); + } +} diff --git a/src/main/java/ru/betterend/blocks/BlockEndLotusSeed.java b/src/main/java/ru/betterend/blocks/BlockEndLotusSeed.java new file mode 100644 index 00000000..3732f378 --- /dev/null +++ b/src/main/java/ru/betterend/blocks/BlockEndLotusSeed.java @@ -0,0 +1,109 @@ +package ru.betterend.blocks; + +import java.util.Random; + +import net.minecraft.block.BlockState; +import net.minecraft.fluid.Fluids; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.Mutable; +import net.minecraft.util.math.Direction; +import net.minecraft.world.StructureWorldAccess; +import ru.betterend.blocks.BlockProperties.TripleShape; +import ru.betterend.blocks.basis.BlockUnderwaterPlantWithAge; +import ru.betterend.registry.BlockRegistry; +import ru.betterend.util.BlocksHelper; + +public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge { + @Override + public void grow(StructureWorldAccess world, Random random, BlockPos pos) { + if (canGrow(world, pos)) { + BlockState startLeaf = BlockRegistry.END_LOTUS_STEM.getDefaultState().with(BlockEndLotusStem.LEAF, true); + BlockState roots = BlockRegistry.END_LOTUS_STEM.getDefaultState().with(BlockEndLotusStem.SHAPE, TripleShape.BOTTOM).with(BlockEndLotusStem.WATERLOGGED, true); + BlockState stem = BlockRegistry.END_LOTUS_STEM.getDefaultState(); + BlockState flower = BlockRegistry.END_LOTUS_FLOWER.getDefaultState(); + + BlocksHelper.setWithoutUpdate(world, pos, roots); + Mutable bpos = new Mutable().set(pos); + bpos.setY(bpos.getY() + 1); + while (world.getFluidState(bpos).isStill()) { + BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.WATERLOGGED, true)); + bpos.setY(bpos.getY() + 1); + } + + int height = random.nextBoolean() ? 0 : random.nextBoolean() ? 1 : random.nextBoolean() ? 1 : -1; + TripleShape shape = (height == 0) ? TripleShape.TOP : TripleShape.MIDDLE; + Direction dir = BlocksHelper.randomHorizontal(random); + BlockPos leafCenter = bpos.toImmutable().offset(dir); + if (hasLeaf(world, leafCenter)) { + generateLeaf(world, leafCenter); + BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(BlockEndLotusStem.SHAPE, shape).with(BlockEndLotusStem.FACING, dir)); + } + else { + BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, shape)); + } + + bpos.setY(bpos.getY() + 1); + for (int i = 1; i <= height; i++) { + if (!world.isAir(bpos)) { + System.out.println("Set incorrect flower!"); + bpos.setY(bpos.getY() - 1); + BlocksHelper.setWithoutUpdate(world, bpos, flower); + bpos.setY(bpos.getY() - 1); + stem = world.getBlockState(bpos); + BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP)); + return; + } + BlocksHelper.setWithoutUpdate(world, bpos, stem); + bpos.setY(bpos.getY() + 1); + } + + if (!world.isAir(bpos) || height < 0) { + bpos.setY(bpos.getY() - 1); + } + + System.out.println("Set flower!"); + BlocksHelper.setWithoutUpdate(world, bpos, flower); + bpos.setY(bpos.getY() - 1); + stem = world.getBlockState(bpos); + BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP)); + } + } + + private boolean canGrow(StructureWorldAccess world, BlockPos pos) { + Mutable bpos = new Mutable(); + bpos.set(pos); + while (world.getBlockState(bpos).getFluidState().getFluid().equals(Fluids.WATER.getStill())) { + bpos.setY(bpos.getY() + 1); + } + return world.isAir(bpos) && world.isAir(bpos.up()); + } + + private void generateLeaf(StructureWorldAccess world, BlockPos pos) { + Mutable p = new Mutable(); + BlockState leaf = BlockRegistry.END_LOTUS_LEAF.getDefaultState(); + BlocksHelper.setWithoutUpdate(world, pos, leaf.with(BlockEndLotusLeaf.SHAPE, TripleShape.BOTTOM)); + for (Direction move: BlocksHelper.HORIZONTAL) { + BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, move).with(BlockEndLotusLeaf.SHAPE, TripleShape.MIDDLE)); + } + for (int i = 0; i < 4; i ++) { + Direction d1 = BlocksHelper.HORIZONTAL[i]; + Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3]; + BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, d1).with(BlockEndLotusLeaf.SHAPE, TripleShape.TOP)); + } + } + + private boolean hasLeaf(StructureWorldAccess world, BlockPos pos) { + Mutable p = new Mutable(); + p.setY(pos.getY()); + int count = 0; + for (int x = -1; x < 2; x ++) { + p.setX(pos.getX() + x); + for (int z = -1; z < 2; z ++) { + p.setZ(pos.getZ() + z); + if (world.isAir(p)) + count ++; + } + } + return count == 9; + } +} diff --git a/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java b/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java index 901d6666..9e1f6f46 100644 --- a/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java +++ b/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java @@ -13,6 +13,8 @@ import net.minecraft.state.StateManager; import net.minecraft.state.property.BooleanProperty; import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; +import net.minecraft.util.BlockMirror; +import net.minecraft.util.BlockRotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.shape.VoxelShape; @@ -20,15 +22,18 @@ import net.minecraft.world.BlockView; import net.minecraft.world.WorldAccess; import ru.betterend.blocks.BlockProperties.TripleShape; import ru.betterend.blocks.basis.BlockBase; +import ru.betterend.util.BlocksHelper; public class BlockEndLotusStem extends BlockBase implements Waterloggable { + public static final EnumProperty FACING = Properties.FACING; public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; + public static final BooleanProperty LEAF = BooleanProperty.of("leaf"); public static final EnumProperty SHAPE = BlockProperties.TRIPLE_SHAPE; private static final VoxelShape VSHAPE = Block.createCuboidShape(6, 0, 6, 10, 16, 10); public BlockEndLotusStem() { super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS)); - this.setDefaultState(getDefaultState().with(WATERLOGGED, false).with(SHAPE, TripleShape.MIDDLE)); + this.setDefaultState(getDefaultState().with(WATERLOGGED, false).with(SHAPE, TripleShape.MIDDLE).with(LEAF, false).with(FACING, Direction.UP)); } @Override @@ -38,7 +43,7 @@ public class BlockEndLotusStem extends BlockBase implements Waterloggable { @Override protected void appendProperties(StateManager.Builder builder) { - builder.add(WATERLOGGED, SHAPE); + builder.add(FACING, WATERLOGGED, SHAPE, LEAF); } @Override @@ -50,9 +55,20 @@ public class BlockEndLotusStem extends BlockBase implements Waterloggable { public BlockState getPlacementState(ItemPlacementContext ctx) { WorldAccess worldAccess = ctx.getWorld(); BlockPos blockPos = ctx.getBlockPos(); - return this.getDefaultState().with(WATERLOGGED, worldAccess.getFluidState(blockPos).getFluid() == Fluids.WATER); + return this.getDefaultState().with(WATERLOGGED, worldAccess.getFluidState(blockPos).getFluid() == Fluids.WATER).with(FACING, ctx.getSide()); + } + + @Override + public BlockState rotate(BlockState state, BlockRotation rotation) { + return BlocksHelper.rotateHorizontal(state, rotation, FACING); } + @Override + public BlockState mirror(BlockState state, BlockMirror mirror) { + return BlocksHelper.mirrorHorizontal(state, mirror, FACING); + } + + @Override public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) { if ((Boolean) state.get(WATERLOGGED)) { world.getFluidTickScheduler().schedule(pos, Fluids.WATER, Fluids.WATER.getTickRate(world)); diff --git a/src/main/java/ru/betterend/registry/BlockRegistry.java b/src/main/java/ru/betterend/registry/BlockRegistry.java index aebe8667..2b20a0b9 100644 --- a/src/main/java/ru/betterend/registry/BlockRegistry.java +++ b/src/main/java/ru/betterend/registry/BlockRegistry.java @@ -16,6 +16,8 @@ import ru.betterend.blocks.BlockChorusGrass; import ru.betterend.blocks.BlockEndLily; import ru.betterend.blocks.BlockEndLilySeed; import ru.betterend.blocks.BlockEndLotusFlower; +import ru.betterend.blocks.BlockEndLotusLeaf; +import ru.betterend.blocks.BlockEndLotusSeed; import ru.betterend.blocks.BlockEndLotusStem; import ru.betterend.blocks.BlockEndstoneDust; import ru.betterend.blocks.BlockGlowingMoss; @@ -70,7 +72,9 @@ public class BlockRegistry { public static final Block PYTHADENDRON_LEAVES = registerBlock("pythadendron_leaves", new BlockLeaves(MaterialColor.MAGENTA)); public static final WoodenMaterial PYTHADENDRON = new WoodenMaterial("pythadendron", MaterialColor.MAGENTA, MaterialColor.PURPLE); + public static final Block END_LOTUS_SEED = registerBlock("end_lotus_seed", new BlockEndLotusSeed()); public static final Block END_LOTUS_STEM = registerBlock("end_lotus_stem", new BlockEndLotusStem()); + public static final Block END_LOTUS_LEAF = registerBlockNI("end_lotus_leaf", new BlockEndLotusLeaf()); public static final Block END_LOTUS_FLOWER = registerBlockNI("end_lotus_flower", new BlockEndLotusFlower()); public static final WoodenMaterial END_LOTUS = new WoodenMaterial("end_lotus", MaterialColor.LIGHT_BLUE, MaterialColor.CYAN); diff --git a/src/main/java/ru/betterend/registry/FeatureRegistry.java b/src/main/java/ru/betterend/registry/FeatureRegistry.java index 11425f48..bcff8e67 100644 --- a/src/main/java/ru/betterend/registry/FeatureRegistry.java +++ b/src/main/java/ru/betterend/registry/FeatureRegistry.java @@ -12,6 +12,8 @@ import ru.betterend.world.features.DoublePlantFeature; import ru.betterend.world.features.EndFeature; import ru.betterend.world.features.EndLakeFeature; import ru.betterend.world.features.EndLilyFeature; +import ru.betterend.world.features.EndLotusFeature; +import ru.betterend.world.features.EndLotusLeafFeature; import ru.betterend.world.features.MossyGlowshroomFeature; import ru.betterend.world.features.PythadendronBushFeature; import ru.betterend.world.features.PythadendronTreeFeature; @@ -35,8 +37,12 @@ public class FeatureRegistry { public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(BlockRegistry.DENSE_VINE, 24), 3); - public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(BlockRegistry.BUBBLE_CORAL, 4), 20); - public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(5), 20); + public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(BlockRegistry.BUBBLE_CORAL, 10), 10); + public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(BlockRegistry.BUBBLE_CORAL, 3), 2); + public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(10), 10); + public static final EndFeature END_LILY_RARE = new EndFeature("end_lily_rare", new EndLilyFeature(3), 1); + public static final EndFeature END_LOTUS = new EndFeature("end_lotus", new EndLotusFeature(5), 5); + public static final EndFeature END_LOTUS_LEAF = new EndFeature("end_lotus_leaf", new EndLotusLeafFeature(5), 5); // Features // public static final EndFeature END_LAKE = EndFeature.makeLakeFeature("end_lake", new EndLakeFeature(), 4); diff --git a/src/main/java/ru/betterend/util/BlocksHelper.java b/src/main/java/ru/betterend/util/BlocksHelper.java index 88610356..bea63167 100644 --- a/src/main/java/ru/betterend/util/BlocksHelper.java +++ b/src/main/java/ru/betterend/util/BlocksHelper.java @@ -219,6 +219,10 @@ public class BlocksHelper { } public static Direction[] makeHorizontal() { - return new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST }; + return new Direction[] { Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST }; + } + + public static Direction randomHorizontal(Random random) { + return HORIZONTAL[random.nextInt(4)]; } } diff --git a/src/main/java/ru/betterend/world/biome/BiomeMegalake.java b/src/main/java/ru/betterend/world/biome/BiomeMegalake.java index 0bd5ee56..2f7f07ab 100644 --- a/src/main/java/ru/betterend/world/biome/BiomeMegalake.java +++ b/src/main/java/ru/betterend/world/biome/BiomeMegalake.java @@ -16,8 +16,10 @@ public class BiomeMegalake extends EndBiome { .setSurface(BlockRegistry.ENDSTONE_DUST) .addStructureFeature(StructureRegistry.MEGALAKE) .addStructureFeature(ConfiguredStructureFeatures.END_CITY) - .addFeature(FeatureRegistry.BUBBLE_CORAL) - .addFeature(FeatureRegistry.END_LILY) + .addFeature(FeatureRegistry.END_LOTUS) + .addFeature(FeatureRegistry.END_LOTUS_LEAF) + .addFeature(FeatureRegistry.BUBBLE_CORAL_RARE) + .addFeature(FeatureRegistry.END_LILY_RARE) .addMobSpawn(EntityType.ENDERMAN, 50, 1, 2)); } } diff --git a/src/main/java/ru/betterend/world/features/EndLotusFeature.java b/src/main/java/ru/betterend/world/features/EndLotusFeature.java new file mode 100644 index 00000000..23282522 --- /dev/null +++ b/src/main/java/ru/betterend/world/features/EndLotusFeature.java @@ -0,0 +1,25 @@ +package ru.betterend.world.features; + +import java.util.Random; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.StructureWorldAccess; +import ru.betterend.blocks.BlockEndLotusSeed; +import ru.betterend.registry.BlockRegistry; + +public class EndLotusFeature extends UnderwaterPlantScatter { + public EndLotusFeature(int radius) { + super(radius); + } + + @Override + public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) { + BlockEndLotusSeed seed = (BlockEndLotusSeed) BlockRegistry.END_LOTUS_SEED; + seed.grow(world, random, blockPos); + } + + @Override + protected int getChance() { + return 15; + } +} diff --git a/src/main/java/ru/betterend/world/features/EndLotusLeafFeature.java b/src/main/java/ru/betterend/world/features/EndLotusLeafFeature.java new file mode 100644 index 00000000..4d333019 --- /dev/null +++ b/src/main/java/ru/betterend/world/features/EndLotusLeafFeature.java @@ -0,0 +1,71 @@ +package ru.betterend.world.features; + +import java.util.Random; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockPos.Mutable; +import net.minecraft.util.math.Direction; +import net.minecraft.world.StructureWorldAccess; +import ru.betterend.blocks.BlockEndLotusLeaf; +import ru.betterend.blocks.BlockProperties.TripleShape; +import ru.betterend.registry.BlockRegistry; +import ru.betterend.util.BlocksHelper; + +public class EndLotusLeafFeature extends ScatterFeature { + public EndLotusLeafFeature(int radius) { + super(radius); + } + + @Override + public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) { + if (hasLeaf(world, blockPos)) { + generateLeaf(world, blockPos); + } + } + + @Override + protected int getChance() { + return 15; + } + + @Override + protected BlockPos getCenterGround(StructureWorldAccess world, BlockPos pos) { + return getPosOnSurface(world, pos); + } + + private void generateLeaf(StructureWorldAccess world, BlockPos pos) { + Mutable p = new Mutable(); + BlockState leaf = BlockRegistry.END_LOTUS_LEAF.getDefaultState(); + BlocksHelper.setWithoutUpdate(world, pos, leaf.with(BlockEndLotusLeaf.SHAPE, TripleShape.BOTTOM)); + for (Direction move: BlocksHelper.HORIZONTAL) { + BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, move).with(BlockEndLotusLeaf.SHAPE, TripleShape.MIDDLE)); + } + for (int i = 0; i < 4; i ++) { + Direction d1 = BlocksHelper.HORIZONTAL[i]; + Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3]; + BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, d1).with(BlockEndLotusLeaf.SHAPE, TripleShape.TOP)); + } + } + + private boolean hasLeaf(StructureWorldAccess world, BlockPos pos) { + Mutable p = new Mutable(); + p.setY(pos.getY()); + int count = 0; + for (int x = -1; x < 2; x ++) { + p.setX(pos.getX() + x); + for (int z = -1; z < 2; z ++) { + p.setZ(pos.getZ() + z); + if (world.isAir(p)) + count ++; + } + } + return count == 9; + } + + @Override + public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos, float radius) { + return world.isAir(blockPos) && world.getBlockState(blockPos.down()).isOf(Blocks.WATER); + } +} diff --git a/src/main/resources/assets/betterend/blockstates/end_lotus_leaf.json b/src/main/resources/assets/betterend/blockstates/end_lotus_leaf.json new file mode 100644 index 00000000..b93879bb --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/end_lotus_leaf.json @@ -0,0 +1,18 @@ +{ + "variants": { + "facing=north,shape=bottom": { "model": "betterend:block/end_lotus_leaf_center" }, + "facing=south,shape=bottom": { "model": "betterend:block/end_lotus_leaf_center" }, + "facing=east,shape=bottom": { "model": "betterend:block/end_lotus_leaf_center" }, + "facing=west,shape=bottom": { "model": "betterend:block/end_lotus_leaf_center" }, + + "facing=north,shape=middle": { "model": "betterend:block/end_lotus_leaf_side" }, + "facing=south,shape=middle": { "model": "betterend:block/end_lotus_leaf_side", "y": 180 }, + "facing=east,shape=middle": { "model": "betterend:block/end_lotus_leaf_side", "y": 90 }, + "facing=west,shape=middle": { "model": "betterend:block/end_lotus_leaf_side", "y": 270 }, + + "facing=north,shape=top": { "model": "betterend:block/end_lotus_leaf_corner" }, + "facing=south,shape=top": { "model": "betterend:block/end_lotus_leaf_corner", "y": 180 }, + "facing=east,shape=top": { "model": "betterend:block/end_lotus_leaf_corner", "y": 90 }, + "facing=west,shape=top": { "model": "betterend:block/end_lotus_leaf_corner", "y": 270 } + } +} diff --git a/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json b/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json index 5ef30a1a..f970af2c 100644 --- a/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json +++ b/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json @@ -1,7 +1,46 @@ { "variants": { - "shape=top": { "model": "betterend:block/end_lotus_stem_top" }, - "shape=middle": { "model": "betterend:block/end_lotus_stem" }, - "shape=bottom": { "model": "betterend:block/end_lotus_roots" } + "leaf=false,shape=top,facing=north": { "model": "betterend:block/end_lotus_stem_top" }, + "leaf=false,shape=top,facing=south": { "model": "betterend:block/end_lotus_stem_top" }, + "leaf=false,shape=top,facing=east": { "model": "betterend:block/end_lotus_stem_top" }, + "leaf=false,shape=top,facing=west": { "model": "betterend:block/end_lotus_stem_top" }, + "leaf=false,shape=top,facing=up": { "model": "betterend:block/end_lotus_stem_top" }, + "leaf=false,shape=top,facing=down": { "model": "betterend:block/end_lotus_stem_top" }, + + "leaf=false,shape=bottom,facing=north": { "model": "betterend:block/end_lotus_roots" }, + "leaf=false,shape=bottom,facing=south": { "model": "betterend:block/end_lotus_roots" }, + "leaf=false,shape=bottom,facing=east": { "model": "betterend:block/end_lotus_roots" }, + "leaf=false,shape=bottom,facing=west": { "model": "betterend:block/end_lotus_roots" }, + "leaf=false,shape=bottom,facing=up": { "model": "betterend:block/end_lotus_roots" }, + "leaf=false,shape=bottom,facing=down": { "model": "betterend:block/end_lotus_roots" }, + + "leaf=false,shape=middle,facing=north": { "model": "betterend:block/end_lotus_stem", "x": 90 }, + "leaf=false,shape=middle,facing=south": { "model": "betterend:block/end_lotus_stem", "z": 90 }, + "leaf=false,shape=middle,facing=east": { "model": "betterend:block/end_lotus_stem", "x": 90 }, + "leaf=false,shape=middle,facing=west": { "model": "betterend:block/end_lotus_stem", "z": 90 }, + "leaf=false,shape=middle,facing=up": { "model": "betterend:block/end_lotus_stem" }, + "leaf=false,shape=middle,facing=down": { "model": "betterend:block/end_lotus_stem" }, + + "leaf=true,shape=middle,facing=north": { "model": "betterend:block/end_lotus_stem_leaf", "y": 180 }, + "leaf=true,shape=middle,facing=south": { "model": "betterend:block/end_lotus_stem_leaf" }, + "leaf=true,shape=middle,facing=east": { "model": "betterend:block/end_lotus_stem_leaf", "y": 270 }, + "leaf=true,shape=middle,facing=west": { "model": "betterend:block/end_lotus_stem_leaf", "y": 90 }, + + "leaf=true,shape=middle,facing=up": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=middle,facing=down": { "model": "betterend:block/end_lotus_stem" }, + + "leaf=true,shape=top,facing=north": { "model": "betterend:block/end_lotus_stem_top_leaf", "y": 180 }, + "leaf=true,shape=top,facing=east": { "model": "betterend:block/end_lotus_stem_top_leaf", "y": 270 }, + "leaf=true,shape=top,facing=south": { "model": "betterend:block/end_lotus_stem_top_leaf" }, + "leaf=true,shape=top,facing=west": { "model": "betterend:block/end_lotus_stem_top_leaf", "y": 90 }, + "leaf=true,shape=top,facing=up": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=top,facing=down": { "model": "betterend:block/end_lotus_stem" }, + + "leaf=true,shape=bottom,facing=north": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=bottom,facing=east": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=bottom,facing=south": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=bottom,facing=west": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=bottom,facing=up": { "model": "betterend:block/end_lotus_stem" }, + "leaf=true,shape=bottom,facing=down": { "model": "betterend:block/end_lotus_stem" } } } diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_leaf_center.json b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_center.json new file mode 100644 index 00000000..fa9d1386 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_center.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/plane_bottom", + "textures": { + "texture": "betterend:block/end_lotus_leaf_center" + } +} diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_leaf_corner.json b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_corner.json new file mode 100644 index 00000000..f421ac73 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_corner.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/plane_bottom", + "textures": { + "texture": "betterend:block/end_lotus_leaf_corner" + } +} diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_leaf_side.json b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_side.json new file mode 100644 index 00000000..e728f8d4 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_leaf_side.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/plane_bottom", + "textures": { + "texture": "betterend:block/end_lotus_leaf_side" + } +} diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_stem_leaf.json b/src/main/resources/assets/betterend/models/block/end_lotus_stem_leaf.json new file mode 100644 index 00000000..bfee2fc4 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_stem_leaf.json @@ -0,0 +1,34 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/end_lotus_stem", + "texture": "betterend:block/end_lotus_stem", + "texture1": "betterend:block/end_lotus_leaf_cutout" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 6, 0, 6 ], + "to": [ 10, 16, 10 ], + "faces": { + "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "down" }, + "up": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "up" }, + "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneY2", + "from": [ 0, 0, 0 ], + "to": [ 16, 0.001, 16 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture1" }, + "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture1" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_stem_top_leaf.json b/src/main/resources/assets/betterend/models/block/end_lotus_stem_top_leaf.json new file mode 100644 index 00000000..61aa0afd --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_stem_top_leaf.json @@ -0,0 +1,45 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/end_lotus_stem", + "texture": "betterend:block/end_lotus_stem", + "leaf": "betterend:block/end_lotus_leaf_cutout" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 6, 0, 6 ], + "to": [ 10, 12, 10 ], + "faces": { + "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "down" }, + "north": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box2", + "from": [ 5, 12, 5 ], + "to": [ 11, 16, 11 ], + "faces": { + "down": { "uv": [ 4, 8, 10, 14 ], "texture": "#texture" }, + "up": { "uv": [ 4, 8, 10, 14 ], "texture": "#texture", "cullface": "up" }, + "north": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "south": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "west": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "east": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneY3", + "from": [ 0, 0, 0 ], + "to": [ 16, 0.001, 16 ], + "faces": { + "down": { "uv": [ 0, 16, 16, 0 ], "texture": "#leaf" }, + "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaf" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/plane_bottom.json b/src/main/resources/assets/betterend/models/block/plane_bottom.json new file mode 100644 index 00000000..daca44a4 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/plane_bottom.json @@ -0,0 +1,17 @@ +{ + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "__comment": "PlaneY1", + "from": [ 0, 0, 0 ], + "to": [ 16, 0.001, 16 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/end_lotus_leaf_cutout.png b/src/main/resources/assets/betterend/textures/block/end_lotus_leaf_cutout.png new file mode 100644 index 00000000..e58251bd Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/end_lotus_leaf_cutout.png differ