diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index c6c5b3bb..e6cf1df5 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -133,6 +133,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()); // Ores // public static final Block ENDER_ORE = registerBlock("ender_ore", new BlockOre(EndItems.ENDER_DUST, 1, 3)); diff --git a/src/main/java/ru/betterend/registry/EndFeatures.java b/src/main/java/ru/betterend/registry/EndFeatures.java index d665031b..4718a078 100644 --- a/src/main/java/ru/betterend/registry/EndFeatures.java +++ b/src/main/java/ru/betterend/registry/EndFeatures.java @@ -46,12 +46,15 @@ public class EndFeatures { public static final EndFeature CHORUS_GRASS = new EndFeature("chorus_grass", new SinglePlantFeature(EndBlocks.CHORUS_GRASS, 4), 5); public static final EndFeature CAVE_GRASS = new EndFeature("cave_grass", new CavePlantFeature(EndBlocks.CAVE_GRASS, 7), 7); public static final EndFeature CRYSTAL_GRASS = new EndFeature("crystal_grass", new SinglePlantFeature(EndBlocks.CRYSTAL_GRASS, 8, false), 5); - public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant", new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 7); - public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 4), 2); - public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass", new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 4), 2); + public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant", new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 9); + public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 3), 2); + public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass", new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 3), 2); + // 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); + // Water // public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 10), 10); public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 4); public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(10), 10); diff --git a/src/main/java/ru/betterend/registry/EndTags.java b/src/main/java/ru/betterend/registry/EndTags.java index 0dee6d4e..97acb5c9 100644 --- a/src/main/java/ru/betterend/registry/EndTags.java +++ b/src/main/java/ru/betterend/registry/EndTags.java @@ -21,6 +21,7 @@ import net.minecraft.world.gen.surfacebuilder.SurfaceConfig; import ru.betterend.BetterEnd; import ru.betterend.blocks.BlockTerrain; import ru.betterend.blocks.basis.BlockSimpleLeaves; +import ru.betterend.blocks.basis.BlockVine; import ru.betterend.util.TagHelper; public class EndTags { @@ -56,6 +57,9 @@ public class EndTags { else if (block instanceof LeavesBlock || block instanceof BlockSimpleLeaves) { TagHelper.addTag(BlockTags.LEAVES, block); } + else if (block instanceof BlockVine) { + TagHelper.addTag(BlockTags.CLIMBABLE, block); + } }); TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone); diff --git a/src/main/java/ru/betterend/world/biome/BiomeShadowForest.java b/src/main/java/ru/betterend/world/biome/BiomeShadowForest.java index a7dfa96f..0f91ba1b 100644 --- a/src/main/java/ru/betterend/world/biome/BiomeShadowForest.java +++ b/src/main/java/ru/betterend/world/biome/BiomeShadowForest.java @@ -23,6 +23,7 @@ public class BiomeShadowForest extends EndBiome { .addFeature(EndFeatures.SHADOW_PLANT) .addFeature(EndFeatures.MURKWEED) .addFeature(EndFeatures.NEEDLEGRASS) + .addFeature(EndFeatures.TWISTED_VINE) .addStructureFeature(ConfiguredStructureFeatures.END_CITY) .addMobSpawn(EntityType.ENDERMAN, 80, 1, 4) .addMobSpawn(EntityType.PHANTOM, 1, 1, 2)); diff --git a/src/main/java/ru/betterend/world/features/InvertedScatterFeature.java b/src/main/java/ru/betterend/world/features/InvertedScatterFeature.java index f8b6bd0c..895fdc5a 100644 --- a/src/main/java/ru/betterend/world/features/InvertedScatterFeature.java +++ b/src/main/java/ru/betterend/world/features/InvertedScatterFeature.java @@ -31,7 +31,7 @@ public abstract class InvertedScatterFeature extends DefaultFeature { POS.set(center.getX(), y, center.getZ()); if (world.getBlockState(POS).isAir() && !world.getBlockState(POS.up()).isAir()) { float r = MHelper.randRange(radius * 0.5F, radius, random); - int count = MHelper.floor(r * r * MHelper.randRange(1.5F, 3F, random)); + int count = MHelper.floor(r * r * MHelper.randRange(0.5F, 1.5F, random)); for (int i = 0; i < count; i++) { float pr = r * (float) Math.sqrt(random.nextFloat()); float theta = random.nextFloat() * MHelper.PI2; diff --git a/src/main/resources/assets/betterend/blockstates/twisted_vine.json b/src/main/resources/assets/betterend/blockstates/twisted_vine.json new file mode 100644 index 00000000..e635d360 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/twisted_vine.json @@ -0,0 +1,13 @@ +{ + "variants": { + "shape=top": { "model": "betterend:block/twisted_vine_top" }, + "shape=middle": [ + { "model": "betterend:block/twisted_vine_middle_1" }, + { "model": "betterend:block/twisted_vine_middle_2" } + ], + "shape=bottom": [ + { "model": "betterend:block/twisted_vine_bottom_1" }, + { "model": "betterend:block/twisted_vine_bottom_2" } + ] + } +} diff --git a/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_1.json b/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_1.json new file mode 100644 index 00000000..d6f5408a --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_1.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion", + "textures": { + "texture": "betterend:block/twisted_vine_bottom" + } +} diff --git a/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_2.json b/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_2.json new file mode 100644 index 00000000..98840097 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/twisted_vine_bottom_2.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion_inverted", + "textures": { + "texture": "betterend:block/twisted_vine_bottom" + } +} diff --git a/src/main/resources/assets/betterend/models/block/twisted_vine_middle_1.json b/src/main/resources/assets/betterend/models/block/twisted_vine_middle_1.json new file mode 100644 index 00000000..6c6f9ebb --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/twisted_vine_middle_1.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion", + "textures": { + "texture": "betterend:block/twisted_vine" + } +} diff --git a/src/main/resources/assets/betterend/models/block/twisted_vine_middle_2.json b/src/main/resources/assets/betterend/models/block/twisted_vine_middle_2.json new file mode 100644 index 00000000..cc4d9cca --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/twisted_vine_middle_2.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_no_distortion_inverted", + "textures": { + "texture": "betterend:block/twisted_vine" + } +} diff --git a/src/main/resources/assets/betterend/models/block/twisted_vine_top.json b/src/main/resources/assets/betterend/models/block/twisted_vine_top.json new file mode 100644 index 00000000..d85b207b --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/twisted_vine_top.json @@ -0,0 +1,76 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "betterend:block/twisted_vine", + "texture": "betterend:block/twisted_vine", + "roots": "betterend:block/twisted_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/models/item/twisted_vine.json b/src/main/resources/assets/betterend/models/item/twisted_vine.json new file mode 100644 index 00000000..ae77c2e7 --- /dev/null +++ b/src/main/resources/assets/betterend/models/item/twisted_vine.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "betterend:block/twisted_vine_bottom" + } +} diff --git a/src/main/resources/assets/betterend/textures/block/twisted_vine_bottom.png b/src/main/resources/assets/betterend/textures/block/twisted_vine_bottom.png new file mode 100644 index 00000000..76efc18f Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/twisted_vine_bottom.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 new file mode 100644 index 00000000..676682d4 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png differ