Cleaned up unused imports and remove redundant comments
This commit is contained in:
@@ -18,8 +18,6 @@ import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
|||||||
public class ModBiomeModifiers {
|
public class ModBiomeModifiers {
|
||||||
public static final ResourceKey<BiomeModifier> ADD_STALINIUM_ORE = registerKey("add_stalinium_ore");
|
public static final ResourceKey<BiomeModifier> ADD_STALINIUM_ORE = registerKey("add_stalinium_ore");
|
||||||
public static final ResourceKey<BiomeModifier> ADD_COMPRESSED_BEDROCK = registerKey("add_compressed_bedrock");
|
public static final ResourceKey<BiomeModifier> ADD_COMPRESSED_BEDROCK = registerKey("add_compressed_bedrock");
|
||||||
|
|
||||||
// ModBiomeModifiers.java
|
|
||||||
public static void bootstrap(BootstrapContext<BiomeModifier> ctx) {
|
public static void bootstrap(BootstrapContext<BiomeModifier> ctx) {
|
||||||
HolderGetter<Biome> biomes = ctx.lookup(Registries.BIOME);
|
HolderGetter<Biome> biomes = ctx.lookup(Registries.BIOME);
|
||||||
HolderGetter<PlacedFeature> placed = ctx.lookup(Registries.PLACED_FEATURE);
|
HolderGetter<PlacedFeature> placed = ctx.lookup(Registries.PLACED_FEATURE);
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package net.krituximon.stalinium.worldgen;
|
package net.krituximon.stalinium.worldgen;
|
||||||
|
|
||||||
import net.krituximon.stalinium.Stalinium;
|
import net.krituximon.stalinium.Stalinium;
|
||||||
import net.krituximon.stalinium.block.ModBlocks;
|
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.data.worldgen.BootstrapContext;
|
import net.minecraft.data.worldgen.BootstrapContext;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import net.minecraft.world.level.levelgen.placement.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
// ModPlacedFeatures.java
|
|
||||||
public class ModPlacedFeatures {
|
public class ModPlacedFeatures {
|
||||||
public static final ResourceKey<PlacedFeature> STALINIUM_VEIN_PLACED_KEY =
|
public static final ResourceKey<PlacedFeature> STALINIUM_VEIN_PLACED_KEY =
|
||||||
registerKey("stalinium_vein_placed");
|
registerKey("stalinium_vein_placed");
|
||||||
@@ -30,7 +29,6 @@ public class ModPlacedFeatures {
|
|||||||
),
|
),
|
||||||
BiomeFilter.biome()
|
BiomeFilter.biome()
|
||||||
);
|
);
|
||||||
|
|
||||||
context.register(STALINIUM_VEIN_PLACED_KEY, new PlacedFeature(cfg, mods));
|
context.register(STALINIUM_VEIN_PLACED_KEY, new PlacedFeature(cfg, mods));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,7 @@ public class StaliniumVeinFeature extends Feature<NoneFeatureConfiguration> {
|
|||||||
LevelAccessor world = ctx.level();
|
LevelAccessor world = ctx.level();
|
||||||
BlockPos center = ctx.origin();
|
BlockPos center = ctx.origin();
|
||||||
RandomSource rand = ctx.random();
|
RandomSource rand = ctx.random();
|
||||||
|
|
||||||
// only spawn below Y = -60
|
|
||||||
if (center.getY() > -60) return false;
|
if (center.getY() > -60) return false;
|
||||||
|
|
||||||
// place a 3x3x3 cube of compressed bedrock around center
|
|
||||||
BlockState bedrock = ModBlocks.COMPRESSED_BEDROCK.get().defaultBlockState();
|
BlockState bedrock = ModBlocks.COMPRESSED_BEDROCK.get().defaultBlockState();
|
||||||
for (int dx = -1; dx <= 1; dx++) {
|
for (int dx = -1; dx <= 1; dx++) {
|
||||||
for (int dy = -1; dy <= 1; dy++) {
|
for (int dy = -1; dy <= 1; dy++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user