Changes to sopport proper Block-Tags for Workstations (#39)

This commit is contained in:
Frank 2022-07-26 18:22:57 +02:00
parent 29cf285f09
commit 42fa776320
10 changed files with 75 additions and 6 deletions

View file

@ -0,0 +1,7 @@
package org.betterx.worlds.together.world.event;
import net.minecraft.world.level.levelgen.WorldGenSettings;
public interface OnFinalizeWorldLoad {
void done(WorldGenSettings settings);
}

View file

@ -313,6 +313,8 @@ public class WorldBootstrap {
}
BCLib.LOGGER.info(output);
SurfaceRuleUtil.injectSurfaceRulesToAllDimensions(worldGenSettings);
WorldEventsImpl.ON_FINALIZED_WORLD_LOAD.emit(e -> e.done(worldGenSettings));
}
public static WorldGenSettings enforceInNewWorld(WorldGenSettings worldGenSettings) {

View file

@ -6,6 +6,7 @@ public class WorldEvents {
public static final Event<BeforeServerWorldLoad> BEFORE_SERVER_WORLD_LOAD = WorldEventsImpl.BEFORE_SERVER_WORLD_LOAD;
public static final Event<OnWorldLoad> ON_WORLD_LOAD = WorldEventsImpl.ON_WORLD_LOAD;
public static final Event<OnFinalizeLevelStem> ON_FINALIZE_LEVEL_STEM = WorldEventsImpl.ON_FINALIZE_LEVEL_STEM;
public static final Event<OnFinalizeWorldLoad> ON_FINALIZED_WORLD_LOAD = WorldEventsImpl.ON_FINALIZED_WORLD_LOAD;
public static final Event<OnWorldPatch> PATCH_WORLD = WorldEventsImpl.PATCH_WORLD;
public static final Event<OnAdaptWorldPresetSettings> ADAPT_WORLD_PRESET = WorldEventsImpl.ADAPT_WORLD_PRESET;

View file

@ -10,6 +10,7 @@ public class WorldEventsImpl {
public static final EventImpl<OnWorldLoad> ON_WORLD_LOAD = new EventImpl<>();
public static final EventImpl<OnFinalizeLevelStem> ON_FINALIZE_LEVEL_STEM = new EventImpl<>();
public static final EventImpl<OnFinalizeWorldLoad> ON_FINALIZED_WORLD_LOAD = new EventImpl<>();
public static final PatchWorldEvent PATCH_WORLD = new PatchWorldEvent();
public static final AdaptWorldPresetSettingEvent ADAPT_WORLD_PRESET = new AdaptWorldPresetSettingEvent();