Wooden complex material migration
This commit is contained in:
parent
e5fde106fc
commit
a151132478
18 changed files with 134 additions and 385 deletions
|
@ -87,7 +87,7 @@ public class TenaneaBushFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
});
|
||||
sphere.fillRecursive(world, pos);
|
||||
BlockState stem = EndBlocks.TENANEA.bark.defaultBlockState();
|
||||
BlockState stem = EndBlocks.TENANEA.getBark().defaultBlockState();
|
||||
BlocksHelper.setWithoutUpdate(world, pos, stem);
|
||||
for (Direction d : Direction.values()) {
|
||||
BlockPos p = pos.relative(d);
|
||||
|
|
|
@ -66,7 +66,7 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
|
||||
radius = MHelper.randRange(1.2F, 2.3F, random);
|
||||
SDF function = SplineHelper.buildSDF(spline, radius, 1.2F, (bpos) -> {
|
||||
return EndBlocks.DRAGON_TREE.bark.defaultBlockState();
|
||||
return EndBlocks.DRAGON_TREE.getBark().defaultBlockState();
|
||||
});
|
||||
|
||||
function.setReplaceFunction(REPLACE);
|
||||
|
@ -86,17 +86,17 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
List<Vector3f> branch = SplineHelper.copySpline(BRANCH);
|
||||
SplineHelper.rotateSpline(branch, angle);
|
||||
SplineHelper.scale(branch, scale);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.getBark().defaultBlockState(), pos, REPLACE);
|
||||
|
||||
branch = SplineHelper.copySpline(SIDE1);
|
||||
SplineHelper.rotateSpline(branch, angle);
|
||||
SplineHelper.scale(branch, scale);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.getBark().defaultBlockState(), pos, REPLACE);
|
||||
|
||||
branch = SplineHelper.copySpline(SIDE2);
|
||||
SplineHelper.rotateSpline(branch, angle);
|
||||
SplineHelper.scale(branch, scale);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.getBark().defaultBlockState(), pos, REPLACE);
|
||||
}
|
||||
leavesBall(world, pos.above(offset), radius * 1.15F + 2, random, noise);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
SplineHelper.scale(branch, scale);
|
||||
Vector3f last = branch.get(branch.size() - 1);
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.getBark().defaultBlockState(), pos, REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
}
|
||||
}
|
||||
info.setState(EndBlocks.DRAGON_TREE.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.DRAGON_TREE.getBark().defaultBlockState());
|
||||
for (int x = -6; x < 7; x++) {
|
||||
int ax = Math.abs(x);
|
||||
mut.setX(x + info.getPos().getX());
|
||||
|
@ -185,12 +185,12 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
}
|
||||
}
|
||||
if (place) {
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.DRAGON_TREE.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.DRAGON_TREE.getBark());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.DRAGON_TREE.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.DRAGON_TREE.getBark());
|
||||
}
|
||||
|
||||
static {
|
||||
|
@ -213,7 +213,7 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
|
||||
POST = (info) -> {
|
||||
if (EndBlocks.DRAGON_TREE.isTreeLog(info.getStateUp()) && EndBlocks.DRAGON_TREE.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.DRAGON_TREE.log.defaultBlockState();
|
||||
return EndBlocks.DRAGON_TREE.getLog().defaultBlockState();
|
||||
}
|
||||
return info.getState();
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
spline.add(new Vector3f(dx, i * 2, dz));
|
||||
}
|
||||
SDF sdf = SplineHelper.buildSDF(spline, 1.7F, 0.5F, (p) -> {
|
||||
return EndBlocks.HELIX_TREE.bark.defaultBlockState();
|
||||
return EndBlocks.HELIX_TREE.getBark().defaultBlockState();
|
||||
});
|
||||
SDF rotated = new SDFRotation().setRotation(Vector3f.YP, (float) Math.PI).setSource(sdf);
|
||||
sdf = new SDFUnion().setSourceA(rotated).setSourceB(sdf);
|
||||
|
@ -62,7 +62,7 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
Vector3f lastPoint = spline.get(spline.size() - 1);
|
||||
List<Vector3f> spline2 = SplineHelper.makeSpline(0, 0, 0, 0, 20, 0, 5);
|
||||
SDF stem = SplineHelper.buildSDF(spline2, 1.0F, 0.5F, (p) -> {
|
||||
return EndBlocks.HELIX_TREE.bark.defaultBlockState();
|
||||
return EndBlocks.HELIX_TREE.getBark().defaultBlockState();
|
||||
});
|
||||
stem = new SDFTranslate().setTranslate(lastPoint.x(), lastPoint.y(), lastPoint.z()).setSource(stem);
|
||||
sdf = new SDFSmoothUnion().setRadius(3).setSourceA(sdf).setSourceB(stem);
|
||||
|
@ -73,11 +73,11 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
float dy2 = 100 * scale;
|
||||
sdf.addPostProcess(POST).fillArea(world, pos, new AABB(pos.offset(-dx, dy1, -dx), pos.offset(dx, dy2, dx)));
|
||||
SplineHelper.scale(spline, scale);
|
||||
SplineHelper.fillSplineForce(spline, world, EndBlocks.HELIX_TREE.bark.defaultBlockState(), pos, (state) -> {
|
||||
SplineHelper.fillSplineForce(spline, world, EndBlocks.HELIX_TREE.getBark().defaultBlockState(), pos, (state) -> {
|
||||
return state.getMaterial().isReplaceable();
|
||||
});
|
||||
SplineHelper.rotateSpline(spline, (float) Math.PI);
|
||||
SplineHelper.fillSplineForce(spline, world, EndBlocks.HELIX_TREE.bark.defaultBlockState(), pos, (state) -> {
|
||||
SplineHelper.fillSplineForce(spline, world, EndBlocks.HELIX_TREE.getBark().defaultBlockState(), pos, (state) -> {
|
||||
return state.getMaterial().isReplaceable();
|
||||
});
|
||||
SplineHelper.scale(spline2, scale);
|
||||
|
@ -85,7 +85,7 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
SplineHelper.fillSplineForce(
|
||||
spline2,
|
||||
world,
|
||||
EndBlocks.HELIX_TREE.log.defaultBlockState(),
|
||||
EndBlocks.HELIX_TREE.getLog().defaultBlockState(),
|
||||
leafStart,
|
||||
(state) -> {
|
||||
return state.getMaterial().isReplaceable();
|
||||
|
@ -189,7 +189,7 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
static {
|
||||
POST = (info) -> {
|
||||
if (EndBlocks.HELIX_TREE.isTreeLog(info.getStateUp()) && EndBlocks.HELIX_TREE.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.HELIX_TREE.log.defaultBlockState();
|
||||
return EndBlocks.HELIX_TREE.getLog().defaultBlockState();
|
||||
}
|
||||
return info.getState();
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ public class JellyshroomFeature extends DefaultFeature {
|
|||
final WorldGenLevel world = featureConfig.level();
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false;
|
||||
|
||||
BlockState bark = EndBlocks.JELLYSHROOM.bark.defaultBlockState();
|
||||
BlockState bark = EndBlocks.JELLYSHROOM.getBark().defaultBlockState();
|
||||
BlockState membrane = EndBlocks.JELLYSHROOM_CAP_PURPLE.defaultBlockState();
|
||||
|
||||
int height = MHelper.randRange(5, 8, random);
|
||||
|
@ -61,7 +61,7 @@ public class JellyshroomFeature extends DefaultFeature {
|
|||
sdf.setReplaceFunction(REPLACE).addPostProcess((info) -> {
|
||||
if (EndBlocks.JELLYSHROOM.isTreeLog(info.getState())) {
|
||||
if (EndBlocks.JELLYSHROOM.isTreeLog(info.getStateUp()) && EndBlocks.JELLYSHROOM.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.JELLYSHROOM.log.defaultBlockState();
|
||||
return EndBlocks.JELLYSHROOM.getLog().defaultBlockState();
|
||||
}
|
||||
}
|
||||
else if (info.getState().is(EndBlocks.JELLYSHROOM_CAP_PURPLE)) {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
|
||||
radius = MHelper.randRange(1.2F, 1.8F, random);
|
||||
SDF function = SplineHelper.buildSDF(spline, radius, 0.7F, (bpos) -> {
|
||||
return EndBlocks.LACUGROVE.bark.defaultBlockState();
|
||||
return EndBlocks.LACUGROVE.getBark().defaultBlockState();
|
||||
});
|
||||
|
||||
function.setReplaceFunction(REPLACE);
|
||||
|
@ -65,7 +65,7 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
function.fillRecursive(world, pos);
|
||||
|
||||
spline = spline.subList(4, 6);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.LACUGROVE.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.LACUGROVE.getBark().defaultBlockState(), pos, REPLACE);
|
||||
|
||||
MutableBlockPos mut = new MutableBlockPos();
|
||||
int offset = random.nextInt(2);
|
||||
|
@ -97,7 +97,7 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
mut,
|
||||
y == top ? EndBlocks.LACUGROVE.bark : EndBlocks.LACUGROVE.log
|
||||
y == top ? EndBlocks.LACUGROVE.getBark() : EndBlocks.LACUGROVE.getLog()
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
@ -133,7 +133,7 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
}
|
||||
}
|
||||
info.setState(EndBlocks.LACUGROVE.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.LACUGROVE.getBark().defaultBlockState());
|
||||
for (int x = -6; x < 7; x++) {
|
||||
int ax = Math.abs(x);
|
||||
mut.setX(x + info.getPos().getX());
|
||||
|
@ -178,12 +178,12 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
}
|
||||
}
|
||||
if (place) {
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LACUGROVE.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LACUGROVE.getBark());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.LACUGROVE.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.LACUGROVE.getBark());
|
||||
}
|
||||
|
||||
static {
|
||||
|
@ -209,7 +209,7 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
|
||||
POST = (info) -> {
|
||||
if (EndBlocks.LACUGROVE.isTreeLog(info.getStateUp()) && EndBlocks.LACUGROVE.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.LACUGROVE.log.defaultBlockState();
|
||||
return EndBlocks.LACUGROVE.getLog().defaultBlockState();
|
||||
}
|
||||
return info.getState();
|
||||
};
|
||||
|
|
|
@ -58,7 +58,7 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
SplineHelper.rotateSpline(spline, angle);
|
||||
SplineHelper.scale(spline, size * MHelper.randRange(0.5F, 1F, random));
|
||||
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.LUCERNIA.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.LUCERNIA.getBark().defaultBlockState(), pos, REPLACE);
|
||||
Vector3f last = spline.get(spline.size() - 1);
|
||||
float leavesRadius = (size * 0.13F + MHelper.randRange(0.8F, 1.5F, random)) * 1.4F;
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
|
@ -88,10 +88,10 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
MutableBlockPos mut = new MutableBlockPos();
|
||||
for (Direction d1 : BlocksHelper.HORIZONTAL) {
|
||||
BlockPos p = mut.set(pos).move(Direction.UP).move(d1).immutable();
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LUCERNIA.bark.defaultBlockState());
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LUCERNIA.getBark().defaultBlockState());
|
||||
for (Direction d2 : BlocksHelper.HORIZONTAL) {
|
||||
mut.set(p).move(Direction.UP).move(d2);
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LUCERNIA.bark.defaultBlockState());
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.LUCERNIA.getBark().defaultBlockState());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
}
|
||||
}
|
||||
info.setState(EndBlocks.LUCERNIA.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.LUCERNIA.getBark().defaultBlockState());
|
||||
}
|
||||
|
||||
MHelper.shuffle(DIRECTIONS, random);
|
||||
|
@ -152,7 +152,7 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
});
|
||||
sphere.fillRecursiveIgnore(world, pos, IGNORE);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.LUCERNIA.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.LUCERNIA.getBark());
|
||||
|
||||
support.forEach((bpos) -> {
|
||||
BlockState state = world.getBlockState(bpos);
|
||||
|
@ -187,7 +187,7 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
SplineHelper.scale(branch, scale);
|
||||
Vector3f last = branch.get(branch.size() - 1);
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
SplineHelper.fillSplineForce(branch, world, EndBlocks.LUCERNIA.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSplineForce(branch, world, EndBlocks.LUCERNIA.getBark().defaultBlockState(), pos, REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,14 +58,14 @@ public class MossyGlowshroomFeature extends DefaultFeature {
|
|||
CONE1.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
|
||||
CONE2.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
|
||||
CONE_GLOW.setBlock(EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE);
|
||||
ROOTS.setBlock(EndBlocks.MOSSY_GLOWSHROOM.bark);
|
||||
ROOTS.setBlock(EndBlocks.MOSSY_GLOWSHROOM.getBark());
|
||||
|
||||
float height = MHelper.randRange(10F, 25F, random);
|
||||
int count = MHelper.floor(height / 4);
|
||||
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, height, 0, count);
|
||||
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
||||
SDF sdf = SplineHelper.buildSDF(spline, 2.1F, 1.5F, (pos) -> {
|
||||
return EndBlocks.MOSSY_GLOWSHROOM.log.defaultBlockState();
|
||||
return EndBlocks.MOSSY_GLOWSHROOM.getLog().defaultBlockState();
|
||||
});
|
||||
Vector3f pos = spline.get(spline.size() - 1);
|
||||
float scale = MHelper.randRange(0.75F, 1.1F, random);
|
||||
|
@ -89,7 +89,7 @@ public class MossyGlowshroomFeature extends DefaultFeature {
|
|||
}
|
||||
else if (!EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(
|
||||
info.getStateDown())) {
|
||||
info.setState(EndBlocks.MOSSY_GLOWSHROOM.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.MOSSY_GLOWSHROOM.getBark().defaultBlockState());
|
||||
return info.getState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
);
|
||||
|
||||
SDF function = SplineHelper.buildSDF(spline, 1.7F, 1.1F, (bpos) -> {
|
||||
return EndBlocks.PYTHADENDRON.bark.defaultBlockState();
|
||||
return EndBlocks.PYTHADENDRON.getBark().defaultBlockState();
|
||||
});
|
||||
function.setReplaceFunction(REPLACE);
|
||||
function.addPostProcess(POST);
|
||||
|
@ -92,7 +92,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
boolean s1 = SplineHelper.fillSpline(
|
||||
spline,
|
||||
world,
|
||||
EndBlocks.PYTHADENDRON.bark.defaultBlockState(),
|
||||
EndBlocks.PYTHADENDRON.getBark().defaultBlockState(),
|
||||
pos,
|
||||
REPLACE
|
||||
);
|
||||
|
@ -105,7 +105,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
boolean s2 = SplineHelper.fillSpline(
|
||||
spline,
|
||||
world,
|
||||
EndBlocks.PYTHADENDRON.bark.defaultBlockState(),
|
||||
EndBlocks.PYTHADENDRON.getBark().defaultBlockState(),
|
||||
pos,
|
||||
REPLACE
|
||||
);
|
||||
|
@ -157,7 +157,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
}
|
||||
}
|
||||
info.setState(EndBlocks.PYTHADENDRON.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.PYTHADENDRON.getBark().defaultBlockState());
|
||||
for (int x = -6; x < 7; x++) {
|
||||
int ax = Math.abs(x);
|
||||
mut.setX(x + info.getPos().getX());
|
||||
|
@ -206,7 +206,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
|
||||
POST = (info) -> {
|
||||
if (EndBlocks.PYTHADENDRON.isTreeLog(info.getStateUp()) && EndBlocks.PYTHADENDRON.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.PYTHADENDRON.log.defaultBlockState();
|
||||
return EndBlocks.PYTHADENDRON.getLog().defaultBlockState();
|
||||
}
|
||||
return info.getState();
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
SplineHelper.rotateSpline(spline, angle);
|
||||
SplineHelper.scale(spline, size + MHelper.randRange(0, size * 0.5F, random));
|
||||
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.TENANEA.bark.defaultBlockState(), pos, REPLACE);
|
||||
SplineHelper.fillSpline(spline, world, EndBlocks.TENANEA.getBark().defaultBlockState(), pos, REPLACE);
|
||||
Vector3f last = spline.get(spline.size() - 1);
|
||||
float leavesRadius = (size * 0.3F + MHelper.randRange(0.8F, 1.5F, random)) * 1.4F;
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
|
@ -84,10 +84,10 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
MutableBlockPos mut = new MutableBlockPos();
|
||||
for (Direction d1 : BlocksHelper.HORIZONTAL) {
|
||||
BlockPos p = mut.set(pos).move(Direction.UP).move(d1).immutable();
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.TENANEA.bark.defaultBlockState());
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.TENANEA.getBark().defaultBlockState());
|
||||
for (Direction d2 : BlocksHelper.HORIZONTAL) {
|
||||
mut.set(p).move(Direction.UP).move(d2);
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.TENANEA.bark.defaultBlockState());
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.TENANEA.getBark().defaultBlockState());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
}
|
||||
}
|
||||
info.setState(EndBlocks.TENANEA.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.TENANEA.getBark().defaultBlockState());
|
||||
}
|
||||
|
||||
MHelper.shuffle(DIRECTIONS, random);
|
||||
|
@ -149,7 +149,7 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
return info.getState();
|
||||
});
|
||||
sphere.fillRecursiveIgnore(world, pos, IGNORE);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.TENANEA.bark);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.TENANEA.getBark());
|
||||
|
||||
support.forEach((bpos) -> {
|
||||
BlockState state = world.getBlockState(bpos);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class UmbrellaTreeFeature extends DefaultFeature {
|
|||
final NoneFeatureConfiguration config = featureConfig.config();
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false;
|
||||
|
||||
BlockState wood = EndBlocks.UMBRELLA_TREE.bark.defaultBlockState();
|
||||
BlockState wood = EndBlocks.UMBRELLA_TREE.getBark().defaultBlockState();
|
||||
BlockState membrane = EndBlocks.UMBRELLA_TREE_MEMBRANE.defaultBlockState()
|
||||
.setValue(UmbrellaTreeMembraneBlock.COLOR, 1);
|
||||
BlockState center = EndBlocks.UMBRELLA_TREE_MEMBRANE.defaultBlockState()
|
||||
|
@ -113,7 +113,7 @@ public class UmbrellaTreeFeature extends DefaultFeature {
|
|||
|
||||
sdf.setReplaceFunction(REPLACE).addPostProcess((info) -> {
|
||||
if (EndBlocks.UMBRELLA_TREE.isTreeLog(info.getStateUp()) && EndBlocks.UMBRELLA_TREE.isTreeLog(info.getStateDown())) {
|
||||
return EndBlocks.UMBRELLA_TREE.log.defaultBlockState();
|
||||
return EndBlocks.UMBRELLA_TREE.getLog().defaultBlockState();
|
||||
}
|
||||
else if (info.getState().equals(membrane)) {
|
||||
Center min = centers.get(0);
|
||||
|
|
|
@ -75,14 +75,14 @@ public class GiantMossyGlowshroomStructure extends SDFStructureFeature {
|
|||
cone1.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
|
||||
cone2.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
|
||||
priGlowCone.setBlock(EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE);
|
||||
primRoots.setBlock(EndBlocks.MOSSY_GLOWSHROOM.bark);
|
||||
primRoots.setBlock(EndBlocks.MOSSY_GLOWSHROOM.getBark());
|
||||
|
||||
float height = MHelper.randRange(10F, 25F, random);
|
||||
int count = MHelper.floor(height / 4);
|
||||
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, height, 0, count);
|
||||
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
||||
SDF sdf = SplineHelper.buildSDF(spline, 2.1F, 1.5F, (pos) -> {
|
||||
return EndBlocks.MOSSY_GLOWSHROOM.log.defaultBlockState();
|
||||
return EndBlocks.MOSSY_GLOWSHROOM.getLog().defaultBlockState();
|
||||
});
|
||||
Vector3f pos = spline.get(spline.size() - 1);
|
||||
float scale = MHelper.randRange(2F, 3.5F, random);
|
||||
|
@ -106,7 +106,7 @@ public class GiantMossyGlowshroomStructure extends SDFStructureFeature {
|
|||
}
|
||||
else if (!EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !EndBlocks.MOSSY_GLOWSHROOM
|
||||
.isTreeLog(info.getStateDown())) {
|
||||
info.setState(EndBlocks.MOSSY_GLOWSHROOM.bark.defaultBlockState());
|
||||
info.setState(EndBlocks.MOSSY_GLOWSHROOM.getBark().defaultBlockState());
|
||||
return info.getState();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue