@@ -13,8 +13,8 @@ import net.minecraft.world.gen.feature.ReplaceBlockConfig;
|
||||
public class ChargedQuartzOreConfig implements IFeatureConfig {
|
||||
|
||||
public static final Codec<ChargedQuartzOreConfig> CODEC = RecordCodecBuilder.create((instance) -> instance
|
||||
.group(BlockState.field_235877_b_.fieldOf("target").forGetter((config) -> config.target),
|
||||
BlockState.field_235877_b_.fieldOf("state").forGetter((config) -> config.state),
|
||||
.group(BlockState.BLOCKSTATE_CODEC.fieldOf("target").forGetter((config) -> config.target),
|
||||
BlockState.BLOCKSTATE_CODEC.fieldOf("state").forGetter((config) -> config.state),
|
||||
Codec.FLOAT.fieldOf("chance").withDefault(0f).forGetter((config) -> config.chance))
|
||||
.apply(instance, ChargedQuartzOreConfig::new));
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class MeteoriteStructureStart extends StructureStart<NoFeatureConfig> {
|
||||
int scanRadius = (int) Math.max(1, meteoriteRadius * 2);
|
||||
for (int x = -scanRadius; x <= scanRadius; x++) {
|
||||
for (int z = -scanRadius; z <= scanRadius; z++) {
|
||||
int h = generator.func_222529_a(centerX + x, centerZ + z, heightmapType);
|
||||
int h = generator.getHeight(centerX + x, centerZ + z, heightmapType);
|
||||
stats.add(h);
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class MeteoriteStructureStart extends StructureStart<NoFeatureConfig> {
|
||||
final double distanceFrom = dx * dx + dz * dz;
|
||||
|
||||
if (maxY > h + distanceFrom * 0.0175 && maxY < h + distanceFrom * 0.02) {
|
||||
int heigth = generator.func_222529_a(blockPos.getX(), blockPos.getZ(), Heightmap.Type.OCEAN_FLOOR);
|
||||
int heigth = generator.getHeight(blockPos.getX(), blockPos.getZ(), Heightmap.Type.OCEAN_FLOOR);
|
||||
if (heigth < seaLevel) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user