BYG crash fix, BYG end sub-biome support, Old Bulbis Gardens

improvements
This commit is contained in:
paulevsGitch 2021-02-09 15:06:08 +03:00
parent 7ef23332fc
commit 38a09c7221
10 changed files with 183 additions and 53 deletions

View file

@ -1,6 +1,5 @@
package ru.betterend.integration.byg.features;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import ru.betterend.integration.Integrations;
import ru.betterend.integration.byg.BYGBlocks;
import ru.betterend.world.features.EndFeature;
@ -23,8 +22,8 @@ public class BYGFeatures {
public static final EndFeature NIGHTSHADE_REDWOOD_TREE = new EndFeature("nightshade_redwood_tree", new NightshadeRedwoodTreeFeature(), 1);
public static final EndFeature BIG_ETHER_TREE = new EndFeature("big_ether_tree", new BigEtherTreeFeature(), 1);
public static final ConfiguredFeature<?,?> BULBIS_TREES = Integrations.BYG.getConfiguredFeature("rs_sparse_bulbis_tree");
public static final ConfiguredFeature<?,?> PURPLE_BULBIS_TREES = Integrations.BYG.getConfiguredFeature("rs_sparse_purple_bulbis_tree");
//public static final ConfiguredFeature<?,?> BULBIS_TREES = Integrations.BYG.getConfiguredFeature("rs_sparse_bulbis_tree");
//public static final ConfiguredFeature<?,?> PURPLE_BULBIS_TREES = Integrations.BYG.getConfiguredFeature("rs_sparse_purple_bulbis_tree");
public static void register() {}
}

View file

@ -53,7 +53,10 @@ public class OldBulbisTreeFeature extends DefaultFeature {
};
float size = MHelper.randRange(10, 20, random);
float addSize = MHelper.randRange(1, 1.7F, random);
float addRad = addSize * 0.5F + 0.5F;
int count = (int) (size * 0.15F);
size *= addSize;
float var = MHelper.PI2 / (float) (count * 3);
float start = MHelper.randRange(0, MHelper.PI2, random);
SDF sdf = null;
@ -65,10 +68,10 @@ public class OldBulbisTreeFeature extends DefaultFeature {
List<Vector3f> spline = SplineHelper.copySpline(SPLINE);
float sizeXZ = (size + MHelper.randRange(0, size * 0.5F, random)) * 0.7F;
SplineHelper.scale(spline, sizeXZ, sizeXZ * 1.5F + MHelper.randRange(0, size * 0.5F, random), sizeXZ);
SplineHelper.offset(spline, new Vector3f((20 - size), 0, 0));
SplineHelper.offset(spline, new Vector3f(size * random.nextFloat() * 0.3F, 0, 0));
SplineHelper.rotateSpline(spline, angle);
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);//1.3F 0.8F
SDF branch = SplineHelper.buildSDF(spline, 2.3F, 1.3F, (bpos) -> {
SDF branch = SplineHelper.buildSDF(spline, 2.3F * addRad, 1.3F * addRad, (bpos) -> {
return stem;
});