Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cjsah committed Jul 31, 2024
1 parent 63cb6cc commit 605e31a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 82 deletions.
3 changes: 2 additions & 1 deletion common/src/main/java/net/cjsah/skyland/SkylandConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.cjsah.skyland;

public class SkylandConfig {
public static boolean GenSliverFishSpawner = true;
public static final boolean GenSliverFishSpawner = true; // 要塞末地传送门生成蠹虫刷怪笼
public static final boolean genFirstEndSpike = true; // 末地首次生成黑曜石柱
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@
import net.minecraft.world.level.levelgen.RandomState;

@Getter
public class SkylandChunkGenerateEvent {
private final WorldGenRegion level;
private final StructureManager structureManager;
private final RandomState random;
private final ChunkAccess chunk;

public SkylandChunkGenerateEvent(WorldGenRegion level, StructureManager structureManager, RandomState random, ChunkAccess chunk) {
this.level = level;
this.structureManager = structureManager;
this.random = random;
this.chunk = chunk;
}
}
public record SkylandChunkGenerateEvent(
WorldGenRegion level,
StructureManager structureManager,
RandomState random,
ChunkAccess chunk
) {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import it.unimi.dsi.fastutil.objects.ObjectLists;
import lombok.Getter;
import net.cjsah.skyland.Skyland;
import net.cjsah.skyland.SkylandConfig;
import net.cjsah.skyland.event.SkylandChunkGenerateEvent;
import net.cjsah.skyland.mixin.ChunkGeneratorAccessor;
import net.cjsah.skyland.mixin.NoiseChunkAccessor;
Expand Down Expand Up @@ -47,8 +48,6 @@
import net.minecraft.world.level.levelgen.structure.pools.JigsawJunction;
import net.minecraft.world.level.levelgen.structure.structures.StrongholdStructure;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.Collections;
Expand All @@ -68,7 +67,6 @@ public class SkylandChunkGenerator extends ChunkGenerator {
).apply(instance, instance.stable(SkylandChunkGenerator::new))
);
private static final BlockState AIR = Blocks.AIR.defaultBlockState();
private static final Logger log = LoggerFactory.getLogger(SkylandChunkGenerator.class);

@Getter
private final Holder<NoiseGeneratorSettings> settings;
Expand Down Expand Up @@ -217,7 +215,7 @@ public void applyBiomeDecoration(WorldGenLevel level, ChunkAccess chunkAccess, S
if (feature.feature().is(new ResourceLocation("end_gateway_return"))) {
level.setCurrentlyGenerating(supplier);
feature.placeWithBiomeCheck(level, this, random, blockPos);
} else if (feature.feature().is(new ResourceLocation("end_spike"))) {
} else if (SkylandConfig.genFirstEndSpike && feature.feature().is(new ResourceLocation("end_spike"))) {
level.setCurrentlyGenerating(supplier);
feature.placeWithBiomeCheck(level, this, random, blockPos);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@
import net.minecraft.world.level.block.Mirror;
import net.minecraft.world.level.block.Rotation;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.structure.BoundingBox;
import net.minecraft.world.level.levelgen.structure.StructurePiece;

import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Supplier;

public abstract class SkylandStructures {
protected final StructurePiece piece;
protected Rotation rotation;
protected Mirror mirror;
protected final Rotation rotation;
protected final Mirror mirror;

@SuppressWarnings("DataFlowIssue")
public SkylandStructures(StructurePiece piece) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.dubhe.anvilcraft.api.registry.AnvilCraftRegistrate;
import net.cjsah.skyland.Skyland;
import net.cjsah.skyland.integration.anvilcraft.event.SkylandChunkGenerateEventListener;
import net.cjsah.skyland.integration.anvilcraft.init.AnvilCraftBlocks;
import net.cjsah.skyland.integration.anvilcraft.init.AnvilCraftItemGroups;
import net.cjsah.skyland.integration.anvilcraft.init.AnvilCraftItems;
Expand Down Expand Up @@ -33,7 +32,6 @@ public void apply() {
AnvilCraftBlocks.register();
AnvilCraftItems.register();
AnvilCraftItemGroups.register();
Skyland.EVENT_BUS.register(new SkylandChunkGenerateEventListener());
REGISTRATE.register();
AnvilcraftIntegration.init();
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package net.cjsah.skyland.integration.anvilcraft.init;

import dev.architectury.injectables.annotations.ExpectPlatform;
import net.cjsah.skyland.Skyland;
import net.cjsah.skyland.integration.anvilcraft.block.StoneAnvilBlock;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.cjsah.skyland.integration.anvilcraft.init;

import dev.architectury.injectables.annotations.ExpectPlatform;
import net.cjsah.skyland.Skyland;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
Expand Down

0 comments on commit 605e31a

Please sign in to comment.