From 591d015f90e889c4f4dae81f88c422fe1996f0d3 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Tue, 3 Nov 2020 19:55:54 +0300 Subject: [PATCH] More plants --- .../java/ru/betterend/registry/EndBlocks.java | 1 + .../ru/betterend/registry/EndFeatures.java | 9 ++- .../java/ru/betterend/registry/EndTags.java | 4 + .../world/biome/BiomeShadowForest.java | 1 + .../features/InvertedScatterFeature.java | 2 +- .../betterend/blockstates/twisted_vine.json | 13 +++ .../models/block/twisted_vine_bottom_1.json | 6 ++ .../models/block/twisted_vine_bottom_2.json | 6 ++ .../models/block/twisted_vine_middle_1.json | 6 ++ .../models/block/twisted_vine_middle_2.json | 6 ++ .../models/block/twisted_vine_top.json | 76 ++++++++++++++++++ .../betterend/models/item/twisted_vine.json | 6 ++ .../textures/block/twisted_vine_bottom.png | Bin 0 -> 2244 bytes .../textures/block/twisted_vine_roots.png | Bin 0 -> 1924 bytes 14 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/assets/betterend/blockstates/twisted_vine.json create mode 100644 src/main/resources/assets/betterend/models/block/twisted_vine_bottom_1.json create mode 100644 src/main/resources/assets/betterend/models/block/twisted_vine_bottom_2.json create mode 100644 src/main/resources/assets/betterend/models/block/twisted_vine_middle_1.json create mode 100644 src/main/resources/assets/betterend/models/block/twisted_vine_middle_2.json create mode 100644 src/main/resources/assets/betterend/models/block/twisted_vine_top.json create mode 100644 src/main/resources/assets/betterend/models/item/twisted_vine.json create mode 100644 src/main/resources/assets/betterend/textures/block/twisted_vine_bottom.png create mode 100644 src/main/resources/assets/betterend/textures/block/twisted_vine_roots.png 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 0000000000000000000000000000000000000000..76efc18f6e27d9cbe409aca8b3a31e944d17a8e4 GIT binary patch literal 2244 zcmcIm4Qvx-81DEPYyyt|f&t25HdLZ0(iaZR@H* zhoBn>@?$U~=p>Ba5tS@L$Uw570uq9TKXFbmXeJPxiVVmU{I2UNnt_DGCfED!yXSk} z=Y8MjzPsAOf|-L;$EF$#hQWC*XAwH5>Bqoi^grR+9e_?LA=iA>V0dJ>ek2(-ZZaAS z$(vNiVKv5HnE(UvXUHanPQ?ziX}*vpctH_c+$!{2F)LvoL2(>MkTgNlI6~lRRZs&FJg83UVQ@lK2+JW&R)Qv-5qOny z&5j|Z-6;e@3EH3meU{F&LmP%kzmE7(G zyjR*lAc0o3+zO;9o?EYI)l(IML=jY#@~{AND^SEqJ;FkMMN?G2a*sR`w-ecfct;ol zO$mDxrL3n>g*_}LheL0S%`|zQ92AvG^$9&td<}F04cal9q)D8jaFX#*9M8}^%|1mk zJV|y#-N*_e&_J(Xmd|AV0aip=s`^i;DDaXJ4ggdrIRJc+2nBtyXl^&37gRM66kwjy zjv=XLSr&Pljg?3*ZNV*!MZg)+V!=5UaJYr?0+wc33DQ!}dZ!|k>rK?xcl%jX1jLaj z9nT69By9|fGr&UO9A{y1ua}{5i4{33>9x@u=*}IfnH`qVBL&LtX4O@Rh|wxZ0!MN- z-0HO=LD0hBfMYGV*J`C~3?s4>4KUN+aUDvT5_T&hsyU+@I%X{1C99}=Rq;op7%q;F z%4Ac_OFR&CyW25A?=uv!__W+hogPe4H*KXKBGUUbzZ<41l2!@AFx!V}`XK%y?xkM^ z757)439J^zCb76kL5Pc-g~S14rEx%Wv{!^QfE3%4eXr{8cH={;j~7?)gP;$h9hATx zKA#73?R~oOzvV;dduO-Rh=02es;dE@6eWxi`S#s>FX!HdBjn$y?A&1$@b>X zNY=M6j=VX&@yycvtvN$p?<+Npx%uakU!n)S!k&_bk}1hGlVAJf?deVD8)j^&jvjn| z6V}q_@b_ts&1tz?=6rEU>)3d^_(DZ<%E~Nb`?WD=Ue14f*iYg8{;cs^4y+z=D@=}E zMb^z4Rxf_^?BYEoYrgb*#!Y&sAj2~vH?3;J^t~A^)xUmywPNLUsj2$-k2z~y%Y37j zE;)2ZO>Vt9s3Gc?bj!gHNN&! z;~)7uJ(qn+o%+fTJzkGjuY8M*D$&aa9;I7b-=t=sm>vXkwHE1FmBUr?~- zgv9JRm|fBQ+{df;_8s!!+{WyEt^LzqI(xeGy(ec~(l(~APg#`ud(=)Hxw!bK)Ra@B zd}jXn#?v>9VC@l1Ye(tr%mbiQBRw5>(8smuG^IM#aU1!l+G#)W%I$oiAR*Uxvo o`}q%T!R>9XJAL}!9)8I1#+szlu8f8Y`gcZNZh`atoP|sO0wIkEj{pDw literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..676682d48033accb65382b01a8db195ff169e59f GIT binary patch literal 1924 zcmbVNeQeZZ9PXIN*g!F8m;5+xB^% z=lOl~ch5C7)=e(2DyJxFazlNrnVhG%N7?P<_x>wGkenu(^{Z`)s+j5?B~rLnm=c)g#Qs{(}sy$`NK|AkN3lC{C;O zofclv*_c3`El8A^MGw;pa}puYumkCwmeFk~7h&?e5?Q;qIfl+doR$c)#1*7h#hd7; zVPQJp4YCOMeRN3lf*>#Y{2toJgAm7uI3Tb*koce^h;-q@5H(9yq~=&{L5o~Pn6%@V z631n;S#MVG8diz}q9}5_kMsFhf?(|q-GMn)w`Y$q#ITJl)pS%tr(H&vG}@d9L!1tW zpqWKl-7chwB#g^JlLKDf4Ji+lQ4wdhS(&`Jj5wUZ8rB_~U_lXUrVYoi)5Z;`i;u4p zAgPVViyC8k(X^t3?bNiBFbWA76Ky9tOw2W7+i0^8u4yMWXS>muQq;oGF|34PWJU_r zG-8>KM%}`M>3J(vT{g0I^{72K1|1w>e7uim0r?6Eo|gha2?+CfLE`ygXxxxhrDHS{ zu)L4}A}O#G2wVpxT_ZyW{wG*Ql44jIBr&TROkvK{Qw&|qq!cwWhDC&lJ0b5P9+w() z+kra54Y3GA!uG1FED17H6eS5+Ugi~6oqOeE^i@eXz1B`ucL+5)$s#k4Ny^g{wvI4gjRvDGfw}k|e+wKtt zxpl@eQ@E{;k&jzaF6_^yF(JK4@rTuILvgau!b?&lcem1C+>QL(u>I!lZ>^fcwnn=j zvmgJb`$BS18tN%bCMd_a@o?^}87>X?@2cgWjhag%a5C)NWpT=qi{hNdI-$166h2+E zHBM0_s~ciV65(UJUplgVfG>+Z>-n_hkMl!A%Z;k_FPh)o_txE>+v4wkym8-!X-6*9 z?SJyzRL{@XULF+Z3SZ3piFy97H!2P^FYSD-ZjZBWE=n)Xee-o6?C*X1mo0xTJpOCf z<$(*=)}QH^wD#SSboZRD`O7XHo}gw9-OxI&2i`$QJ>+R=J$mA?I9OWQ=jk5z(zC8Ef(KF?>^P15zdhv#n8w05|kwdSR z&1zh+`Kk1&-aw3(r514kF~_bWcBt5(~NG% cQ+f4HVQyv1@tqG$a{nhAY8qp`k8J4r8