diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index f96b546f..35261613 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -164,6 +164,7 @@ public class EndBlocks { // Vines // public static final Block DENSE_VINE = registerBlock("dense_vine", new BlockVine(15, true)); public static final Block TWISTED_VINE = registerBlock("twisted_vine", new BlockVine()); + public static final Block BULB_VINE = registerBlock("bulb_vine", new BlockVine(15, true)); // Ores // public static final Block ENDER_ORE = registerBlock("ender_ore", new BlockOre(EndItems.ENDER_DUST, 1, 3, 5)); diff --git a/src/main/java/ru/betterend/registry/EndFeatures.java b/src/main/java/ru/betterend/registry/EndFeatures.java index 5532afc7..40ccd126 100644 --- a/src/main/java/ru/betterend/registry/EndFeatures.java +++ b/src/main/java/ru/betterend/registry/EndFeatures.java @@ -62,6 +62,7 @@ public class EndFeatures { // Vines // public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3); public static final EndFeature TWISTED_VINE = new EndFeature("twisted_vine", new VineFeature(EndBlocks.TWISTED_VINE, 24), 3); + public static final EndFeature BULB_VINE = new EndFeature("bulb_vine", new VineFeature(EndBlocks.BULB_VINE, 24), 5); // Wall Plants // public static final EndFeature PURPLE_POLYPORE = new EndFeature("purple_polypore", new WallPlantOnLogFeature(EndBlocks.PURPLE_POLYPORE, 3), 5); diff --git a/src/main/java/ru/betterend/world/biome/BlossomingSpires.java b/src/main/java/ru/betterend/world/biome/BlossomingSpires.java index c15c7451..1fc74dcc 100644 --- a/src/main/java/ru/betterend/world/biome/BlossomingSpires.java +++ b/src/main/java/ru/betterend/world/biome/BlossomingSpires.java @@ -15,6 +15,7 @@ public class BlossomingSpires extends EndBiome { .addFeature(EndFeatures.FLOATING_SPIRE) .addFeature(EndFeatures.TENANEA) .addFeature(EndFeatures.TENANEA_BUSH) + .addFeature(EndFeatures.BULB_VINE) .addFeature(EndFeatures.TWISTED_MOSS) .addFeature(EndFeatures.TWISTED_MOSS_WOOD) .addMobSpawn(EntityType.ENDERMAN, 50, 1, 4)); diff --git a/src/main/java/ru/betterend/world/features/VineFeature.java b/src/main/java/ru/betterend/world/features/VineFeature.java index 5ffb6e92..362a31b2 100644 --- a/src/main/java/ru/betterend/world/features/VineFeature.java +++ b/src/main/java/ru/betterend/world/features/VineFeature.java @@ -26,11 +26,13 @@ public class VineFeature extends InvertedScatterFeature { @Override public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) { - int h = BlocksHelper.downRay(world, blockPos, random.nextInt(maxLength)); - BlocksHelper.setWithoutUpdate(world, blockPos, vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP)); - for (int i = 1; i < h; i++) { - BlocksHelper.setWithoutUpdate(world, blockPos.down(i), vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE)); + int h = BlocksHelper.downRay(world, blockPos, random.nextInt(maxLength)) - 1; + if (h > 2) { + BlocksHelper.setWithoutUpdate(world, blockPos, vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP)); + for (int i = 1; i < h; i++) { + BlocksHelper.setWithoutUpdate(world, blockPos.down(i), vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE)); + } + BlocksHelper.setWithoutUpdate(world, blockPos.down(h), vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM)); } - BlocksHelper.setWithoutUpdate(world, blockPos.down(h), vineBlock.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM)); } } diff --git a/src/main/resources/assets/betterend/blockstates/bulb_vine.json b/src/main/resources/assets/betterend/blockstates/bulb_vine.json new file mode 100644 index 00000000..e434ca56 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/bulb_vine.json @@ -0,0 +1,10 @@ +{ + "variants": { + "shape=top": { "model": "betterend:block/bulb_vine_top" }, + "shape=middle": [ + { "model": "betterend:block/bulb_vine_middle_1" }, + { "model": "betterend:block/bulb_vine_middle_2" } + ], + "shape=bottom": { "model": "betterend:block/bulb_vine_bottom" } + } +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/bulb_vine.json b/src/main/resources/assets/betterend/materialmaps/block/bulb_vine.json new file mode 100644 index 00000000..5f0f0cee --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/bulb_vine.json @@ -0,0 +1,14 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "betterend:block/bulb_vine", + "material": "betterend:glow_inc" + }, + { + "sprite": "betterend:block/bulb_vine_middle", + "material": "betterend:waving" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/bulb_vine_bottom.json b/src/main/resources/assets/betterend/models/block/bulb_vine_bottom.json new file mode 100644 index 00000000..ed4ff52f --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/bulb_vine_bottom.json @@ -0,0 +1,98 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/bulb_vine", + "texture": "betterend:block/bulb_vine", + "fur": "betterend:block/bulb_vine_fur", + "stem": "betterend:block/bulb_vine_middle" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 4, 4, 4 ], + "to": [ 12, 12, 12 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 8, 8, 16 ], "texture": "#texture" }, + "up": { "uv": [ 8, 0, 16, 8 ], "texture": "#texture" }, + "north": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" } + } + }, + { + "__comment": "Box1", + "from": [ 5, 12, 5 ], + "to": [ 11, 14, 11 ], + "faces": { + "up": { "uv": [ 9, 1, 15, 7 ], "texture": "#texture" }, + "north": { "uv": [ 9, 6, 15, 8 ], "texture": "#texture" }, + "south": { "uv": [ 9, 6, 15, 8 ], "texture": "#texture" }, + "west": { "uv": [ 9, 6, 15, 8 ], "texture": "#texture" }, + "east": { "uv": [ 9, 6, 15, 8 ], "texture": "#texture" } + } + }, + { + "__comment": "Box1", + "from": [ 6, 14, 6 ], + "to": [ 10, 15, 10 ], + "faces": { + "down": { "uv": [ 6, 6, 10, 10 ], "texture": "#texture" }, + "up": { "uv": [ 10, 2, 14, 6 ], "texture": "#texture" }, + "north": { "uv": [ 10, 5, 14, 6 ], "texture": "#texture" }, + "south": { "uv": [ 10, 5, 14, 6 ], "texture": "#texture" }, + "west": { "uv": [ 10, 5, 14, 6 ], "texture": "#texture" }, + "east": { "uv": [ 10, 5, 14, 6 ], "texture": "#texture" } + } + }, + { + "__comment": "Box4", + "from": [ 3, 7, 3 ], + "to": [ 13, 13, 13 ], + "shade": false, + "faces": { + "up": { "uv": [ 0, 0, 10, 10 ], "texture": "#fur" }, + "north": { "uv": [ 0, 10, 10, 16 ], "texture": "#fur" }, + "south": { "uv": [ 0, 10, 10, 16 ], "texture": "#fur" }, + "west": { "uv": [ 0, 10, 10, 16 ], "texture": "#fur" }, + "east": { "uv": [ 0, 10, 10, 16 ], "texture": "#fur" } + } + }, + { + "__comment": "Box4", + "from": [ 13, 13, 13 ], + "to": [ 3, 7, 3 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 0, 10, 10 ], "texture": "#fur" }, + "north": { "uv": [ 0, 16, 10, 10 ], "texture": "#fur" }, + "south": { "uv": [ 0, 16, 10, 10 ], "texture": "#fur" }, + "west": { "uv": [ 0, 16, 10, 10 ], "texture": "#fur" }, + "east": { "uv": [ 0, 16, 10, 10 ], "texture": "#fur" } + } + }, + { + "__comment": "PlaneX9", + "from": [ 7.25, 15, 7.25 ], + "to": [ 7.251, 16, 9.25 ], + "rotation": { "origin": [ 7.25, 15, 7.25 ], "axis": "y", "angle": 45 }, + "shade": false, + "faces": { + "west": { "uv": [ 7, 0, 9, 1 ], "texture": "#stem" }, + "east": { "uv": [ 7, 0, 9, 1 ], "texture": "#stem" } + } + }, + { + "__comment": "PlaneX9", + "from": [ 8.625, 15, 7.375 ], + "to": [ 8.626, 16, 9.375 ], + "rotation": { "origin": [ 8.625, 15, 7.375 ], "axis": "y", "angle": -45 }, + "shade": false, + "faces": { + "west": { "uv": [ 7, 0, 9, 1 ], "texture": "#stem" }, + "east": { "uv": [ 7, 0, 9, 1 ], "texture": "#stem" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/bulb_vine_middle_1.json b/src/main/resources/assets/betterend/models/block/bulb_vine_middle_1.json new file mode 100644 index 00000000..31de90ec --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/bulb_vine_middle_1.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion", + "textures": { + "texture": "betterend:block/bulb_vine_middle" + } +} diff --git a/src/main/resources/assets/betterend/models/block/bulb_vine_middle_2.json b/src/main/resources/assets/betterend/models/block/bulb_vine_middle_2.json new file mode 100644 index 00000000..8a3062e6 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/bulb_vine_middle_2.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion_inverted", + "textures": { + "texture": "betterend:block/bulb_vine_middle" + } +} diff --git a/src/main/resources/assets/betterend/models/block/bulb_vine_top.json b/src/main/resources/assets/betterend/models/block/bulb_vine_top.json new file mode 100644 index 00000000..3f42ff42 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/bulb_vine_top.json @@ -0,0 +1,76 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/bulb_vine_middle", + "texture": "betterend:block/bulb_vine_middle", + "roots": "betterend:block/bulb_vine_roots" + }, + "elements": [ + { + "__comment": "PlaneX1", + "from": [ 2.375, 0, 2.25 ], + "to": [ 2.376, 16, 18.25 ], + "rotation": { "origin": [ 2.375, 0, 2.25 ], "axis": "y", "angle": 45 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 13.75, 0, 2.25 ], + "to": [ 13.751, 16, 18.25 ], + "rotation": { "origin": [ 13.75, 0, 2.25 ], "axis": "y", "angle": -45 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX4", + "from": [ 5, 0, 0.5 ], + "to": [ 5.001, 16, 16.5 ], + "rotation": { "origin": [ 5, 0, 0.5 ], "axis": "y", "angle": 22.5 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" }, + "east": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneZ5", + "from": [ 0.5, 0, 11 ], + "to": [ 16.5, 16, 11.001 ], + "rotation": { "origin": [ 0.5, 0, 11 ], "axis": "y", "angle": 22.5 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" }, + "south": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneX4", + "from": [ 11, 0, 0.5 ], + "to": [ 11.001, 16, 16.5 ], + "rotation": { "origin": [ 11, 0, 0.5 ], "axis": "y", "angle": -22.5 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" }, + "east": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneZ5", + "from": [ 0.5, 0, 5 ], + "to": [ 16.5, 16, 5.001 ], + "rotation": { "origin": [ 0.5, 0, 5 ], "axis": "y", "angle": -22.5 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" }, + "south": { "uv": [ 0, 16, 16, 0 ], "texture": "#roots" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/bulb_vine.png b/src/main/resources/assets/betterend/textures/block/bulb_vine.png new file mode 100644 index 00000000..2c9f8ee8 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/bulb_vine.png differ diff --git a/src/main/resources/assets/betterend/textures/block/bulb_vine_fur.png b/src/main/resources/assets/betterend/textures/block/bulb_vine_fur.png new file mode 100644 index 00000000..c1e4194a Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/bulb_vine_fur.png differ diff --git a/src/main/resources/assets/betterend/textures/block/bulb_vine_middle.png b/src/main/resources/assets/betterend/textures/block/bulb_vine_middle.png new file mode 100644 index 00000000..a7cae3be Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/bulb_vine_middle.png differ diff --git a/src/main/resources/assets/betterend/textures/block/bulb_vine_roots.png b/src/main/resources/assets/betterend/textures/block/bulb_vine_roots.png new file mode 100644 index 00000000..1100b0a4 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/bulb_vine_roots.png differ diff --git a/src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png b/src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png index 77d9a9de..3419def1 100644 Binary files a/src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png and b/src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png differ