Skyblock Builder

Skyblock Builder

10M Downloads

Feature Bug

tmanfoo1 opened this issue · 6 comments

commented

Minecraft version

1.18.2

LibX version

3.2.15

Skyblock Builder version

3.3.10

Forge version

40.1.25

The latest.log file

https://pastebin.com/Q64Wy5Rw

Issue description

The world won't generate any of the features even though they are in the .txt file and recognized!
package.zip

Steps to reproduce

1 install the mod with the skyblock mod
2 boot up
3 try to generate a skyblock world with the default structure
4 none of the features are located anywere

Other information

No response

commented

Yes, maybe that helps.

commented

I just woke up and am on smartphone only and can’t review the files to see which features you want but I want to ask if you read this line in the config and know which stuff is required for your selection?
https://github.com/MelanX/SkyblockBuilder/blob/1.18.x/src/main/java/de/melanx/skyblockbuilder/config/ConfigHandler.java#L21

commented

when I coded it, it shouldn't require any special surfaces. From my understanding it only requires a y level and air I think?

commented

I could try and provide the exact coding mcreator gave me if that helps

commented

package net.mcreator.floatingisles.world.features;

/* imports omitted */

public class DefaultIslandFeature extends Feature {

public static DefaultIslandFeature FEATURE = null;
public static Holder<ConfiguredFeature<NoneFeatureConfiguration, ?>> CONFIGURED_FEATURE = null;
public static Holder<PlacedFeature> PLACED_FEATURE = null;

public static Feature<?> feature() {
	FEATURE = new DefaultIslandFeature();
	CONFIGURED_FEATURE = FeatureUtils.register("floating_isles:default_island", FEATURE, FeatureConfiguration.NONE);
	PLACED_FEATURE = PlacementUtils.register("floating_isles:default_island", CONFIGURED_FEATURE, List.of());
	return FEATURE;
}

public static Holder<PlacedFeature> placedFeature() {
	return PLACED_FEATURE;
}

public static final Set<ResourceLocation> GENERATE_BIOMES = null;

private final Set<ResourceKey<Level>> generate_dimensions = Set.of(Level.OVERWORLD);

private final List<Block> base_blocks;

private StructureTemplate template = null;

public DefaultIslandFeature() {
	super(NoneFeatureConfiguration.CODEC);

	base_blocks = List.of(Blocks.AIR);
}

@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
	if (!generate_dimensions.contains(context.level().getLevel().dimension()))
		return false;

	if (template == null)
		template = context.level().getLevel().getStructureManager().getOrCreate(new ResourceLocation("floating_isles", "skyislandv1"));

	if (template == null)
		return false;

	boolean anyPlaced = false;
	if ((context.random().nextInt(1000000) + 1) <= 250000) {
		int count = context.random().nextInt(1) + 1;
		for (int a = 0; a < count; a++) {
			int i = context.origin().getX() + context.random().nextInt(16);
			int k = context.origin().getZ() + context.random().nextInt(16);

			int j = context.level().getHeight(Heightmap.Types.WORLD_SURFACE_WG, i, k);

			j += context.random().nextInt(64) + 16;

			if (!base_blocks.contains(context.level().getBlockState(new BlockPos(i, j, k)).getBlock()))
				continue;

			BlockPos spawnTo = new BlockPos(i + 0, j + 0, k + 0);

			if (template.placeInWorld(context.level(), spawnTo, spawnTo,
					new StructurePlaceSettings().setMirror(Mirror.values()[context.random().nextInt(2)])
							.setRotation(Rotation.values()[context.random().nextInt(3)]).setRandom(context.random())
							.addProcessor(BlockIgnoreProcessor.STRUCTURE_BLOCK).setIgnoreEntities(false),
					context.random(), 2)) {

				anyPlaced = true;
			}
		}
	}

	return anyPlaced;
}

}

--This is the code mcreator made

commented

For me it generates.

2022-06-04_21 01 46