From d97d4e39532fe97f318c10b58df23fd97c39b136 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Sun, 27 Dec 2020 19:20:31 +0300 Subject: [PATCH] Some fixes --- .../integration/byg/biomes/BYGBiomes.java | 4 ++-- .../byg/features/BigEtherTreeFeature.java | 15 +++++---------- .../betterend/mixin/common/BoneMealItemMixin.java | 4 ---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/main/java/ru/betterend/integration/byg/biomes/BYGBiomes.java b/src/main/java/ru/betterend/integration/byg/biomes/BYGBiomes.java index c165d77f..8d426eb2 100644 --- a/src/main/java/ru/betterend/integration/byg/biomes/BYGBiomes.java +++ b/src/main/java/ru/betterend/integration/byg/biomes/BYGBiomes.java @@ -7,12 +7,12 @@ import ru.betterend.world.biome.EndBiome; public class BYGBiomes { // New Biomes 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 addBiomes() { 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")); } } diff --git a/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java b/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java index 8219e4f4..3be4934a 100644 --- a/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java +++ b/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java @@ -18,9 +18,6 @@ import ru.betterend.registry.EndTags; import ru.betterend.util.MHelper; import ru.betterend.util.SplineHelper; 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; public class BigEtherTreeFeature extends DefaultFeature { @@ -41,14 +38,14 @@ public class BigEtherTreeFeature extends DefaultFeature { SplineHelper.offsetParts(trunk, random, 2F, 0, 2F); 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++) { - float splinePos = (float) i / count; + float splinePos = (float) i / (float) count; float startAngle = random.nextFloat() * MHelper.PI2; float length = (1 - splinePos) * height * 0.4F; int points = (int) (length / 3); List 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); float startRad = MathHelper.lerp(splinePos, 2.3F, 0.8F) * 0.8F; Vector3f start = SplineHelper.getPos(trunk, splinePos * (trunk.size() - 1)); @@ -58,10 +55,8 @@ public class BigEtherTreeFeature extends DefaultFeature { List br = SplineHelper.copySpline(branch); SplineHelper.offsetParts(br, random, 0, 1, 1); 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); - //sdf = new SDFSmoothUnion().setRadius(2).setSourceA(sdf).setSourceB(branchSDF); - //sdf = new SDFUnion().setSourceA(sdf).setSourceB(branchSDF); + + SplineHelper.offset(br, start); SplineHelper.fillSpline(br, world, wood, pos, replace); } } diff --git a/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java b/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java index 708d3593..490ce1cd 100644 --- a/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java +++ b/src/main/java/ru/betterend/mixin/common/BoneMealItemMixin.java @@ -37,7 +37,6 @@ public class BoneMealItemMixin { if (!world.isClient) { BlockPos offseted = blockPos.offset(context.getSide()); boolean endBiome = world.getBiome(offseted).getCategory() == Category.THEEND; - //boolean skip = false; if (world.getBlockState(blockPos).isIn(EndTags.END_GROUND)) { boolean consume = false; @@ -53,9 +52,6 @@ public class BoneMealItemMixin { if (world.getBlockState(offseted).equals(Blocks.WATER)) { consume = beGrowWaterGrass(world, blockPos); } - /*else { - skip = true; - }*/ } else { consume = beGrowGrass(world, blockPos);