Some fixes
This commit is contained in:
parent
47ba04c177
commit
d97d4e3953
3 changed files with 7 additions and 16 deletions
|
@ -7,12 +7,12 @@ import ru.betterend.world.biome.EndBiome;
|
||||||
public class BYGBiomes {
|
public class BYGBiomes {
|
||||||
// New Biomes
|
// New Biomes
|
||||||
public static final EndBiome OLD_BULBIS_GARDENS = EndBiomes.registerSubBiomeIntegration(new OldBulbisGardens());
|
public static final EndBiome OLD_BULBIS_GARDENS = EndBiomes.registerSubBiomeIntegration(new OldBulbisGardens());
|
||||||
public static final EndBiome ETHERIAL_GROVE = EndBiomes.registerSubBiomeIntegration(new EterialGrove());
|
//public static final EndBiome ETHERIAL_GROVE = EndBiomes.registerSubBiomeIntegration(new EterialGrove());
|
||||||
|
|
||||||
public static void register() {}
|
public static void register() {}
|
||||||
|
|
||||||
public static void addBiomes() {
|
public static void addBiomes() {
|
||||||
EndBiomes.addSubBiomeIntegration(OLD_BULBIS_GARDENS, Integrations.BYG.getID("bulbis_gardens"));
|
EndBiomes.addSubBiomeIntegration(OLD_BULBIS_GARDENS, Integrations.BYG.getID("bulbis_gardens"));
|
||||||
EndBiomes.addSubBiomeIntegration(ETHERIAL_GROVE, Integrations.BYG.getID("ethereal_islands"));
|
//EndBiomes.addSubBiomeIntegration(ETHERIAL_GROVE, Integrations.BYG.getID("ethereal_islands"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,6 @@ import ru.betterend.registry.EndTags;
|
||||||
import ru.betterend.util.MHelper;
|
import ru.betterend.util.MHelper;
|
||||||
import ru.betterend.util.SplineHelper;
|
import ru.betterend.util.SplineHelper;
|
||||||
import ru.betterend.util.sdf.SDF;
|
import ru.betterend.util.sdf.SDF;
|
||||||
import ru.betterend.util.sdf.operator.SDFSmoothUnion;
|
|
||||||
import ru.betterend.util.sdf.operator.SDFTranslate;
|
|
||||||
import ru.betterend.util.sdf.operator.SDFUnion;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class BigEtherTreeFeature extends DefaultFeature {
|
public class BigEtherTreeFeature extends DefaultFeature {
|
||||||
|
@ -41,14 +38,14 @@ public class BigEtherTreeFeature extends DefaultFeature {
|
||||||
SplineHelper.offsetParts(trunk, random, 2F, 0, 2F);
|
SplineHelper.offsetParts(trunk, random, 2F, 0, 2F);
|
||||||
SDF sdf = SplineHelper.buildSDF(trunk, 2.3F, 0.8F, splinePlacer);
|
SDF sdf = SplineHelper.buildSDF(trunk, 2.3F, 0.8F, splinePlacer);
|
||||||
|
|
||||||
int count = height / 10;
|
int count = height / 15;
|
||||||
for (int i = 1; i < count; i++) {
|
for (int i = 1; i < count; i++) {
|
||||||
float splinePos = (float) i / count;
|
float splinePos = (float) i / (float) count;
|
||||||
float startAngle = random.nextFloat() * MHelper.PI2;
|
float startAngle = random.nextFloat() * MHelper.PI2;
|
||||||
float length = (1 - splinePos) * height * 0.4F;
|
float length = (1 - splinePos) * height * 0.4F;
|
||||||
int points = (int) (length / 3);
|
int points = (int) (length / 3);
|
||||||
List<Vector3f> branch = SplineHelper.makeSpline(0, 0, 0, length, 0, 0, points < 2 ? 2 : points);
|
List<Vector3f> branch = SplineHelper.makeSpline(0, 0, 0, length, 0, 0, points < 2 ? 2 : points);
|
||||||
SplineHelper.powerOffset(branch, length * 0.5F, 1.5F);
|
SplineHelper.powerOffset(branch, length, 2F);
|
||||||
int rotCount = MHelper.randRange(5, 7, random);
|
int rotCount = MHelper.randRange(5, 7, random);
|
||||||
float startRad = MathHelper.lerp(splinePos, 2.3F, 0.8F) * 0.8F;
|
float startRad = MathHelper.lerp(splinePos, 2.3F, 0.8F) * 0.8F;
|
||||||
Vector3f start = SplineHelper.getPos(trunk, splinePos * (trunk.size() - 1));
|
Vector3f start = SplineHelper.getPos(trunk, splinePos * (trunk.size() - 1));
|
||||||
|
@ -58,10 +55,8 @@ public class BigEtherTreeFeature extends DefaultFeature {
|
||||||
List<Vector3f> br = SplineHelper.copySpline(branch);
|
List<Vector3f> br = SplineHelper.copySpline(branch);
|
||||||
SplineHelper.offsetParts(br, random, 0, 1, 1);
|
SplineHelper.offsetParts(br, random, 0, 1, 1);
|
||||||
SplineHelper.rotateSpline(br, angle);
|
SplineHelper.rotateSpline(br, angle);
|
||||||
//SDF branchSDF = SplineHelper.buildSDF(br, startRad, 0.5F, splinePlacer);
|
|
||||||
//branchSDF = new SDFTranslate().setTranslate(start.getX(), start.getY(), start.getZ()).setSource(branchSDF);
|
SplineHelper.offset(br, start);
|
||||||
//sdf = new SDFSmoothUnion().setRadius(2).setSourceA(sdf).setSourceB(branchSDF);
|
|
||||||
//sdf = new SDFUnion().setSourceA(sdf).setSourceB(branchSDF);
|
|
||||||
SplineHelper.fillSpline(br, world, wood, pos, replace);
|
SplineHelper.fillSpline(br, world, wood, pos, replace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ public class BoneMealItemMixin {
|
||||||
if (!world.isClient) {
|
if (!world.isClient) {
|
||||||
BlockPos offseted = blockPos.offset(context.getSide());
|
BlockPos offseted = blockPos.offset(context.getSide());
|
||||||
boolean endBiome = world.getBiome(offseted).getCategory() == Category.THEEND;
|
boolean endBiome = world.getBiome(offseted).getCategory() == Category.THEEND;
|
||||||
//boolean skip = false;
|
|
||||||
|
|
||||||
if (world.getBlockState(blockPos).isIn(EndTags.END_GROUND)) {
|
if (world.getBlockState(blockPos).isIn(EndTags.END_GROUND)) {
|
||||||
boolean consume = false;
|
boolean consume = false;
|
||||||
|
@ -53,9 +52,6 @@ public class BoneMealItemMixin {
|
||||||
if (world.getBlockState(offseted).equals(Blocks.WATER)) {
|
if (world.getBlockState(offseted).equals(Blocks.WATER)) {
|
||||||
consume = beGrowWaterGrass(world, blockPos);
|
consume = beGrowWaterGrass(world, blockPos);
|
||||||
}
|
}
|
||||||
/*else {
|
|
||||||
skip = true;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
consume = beGrowGrass(world, blockPos);
|
consume = beGrowGrass(world, blockPos);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue