fix some startup issues
This commit is contained in:
@@ -19,6 +19,24 @@ public net.minecraft.world.level.levelgen.SurfaceSystem getOrCreateRandomFactory
|
||||
|
||||
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
@@ -0,0 +0,0 @@ public class BuiltInRegistries {
|
||||
}
|
||||
|
||||
public static void bootStrap() {
|
||||
+ // Paper start
|
||||
+ bootStrap(() -> {});
|
||||
+ }
|
||||
+ public static void bootStrap(Runnable runnable) {
|
||||
+ // Paper end
|
||||
createContents();
|
||||
+ runnable.run(); // Paper
|
||||
freeze();
|
||||
validate(REGISTRY);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
||||
@@ -118,10 +136,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
||||
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||
@@ -0,0 +0,0 @@ public class Bootstrap {
|
||||
EntitySelectorOptions.bootStrap();
|
||||
DispenseItemBehavior.bootStrap();
|
||||
CauldronInteraction.bootStrap();
|
||||
BuiltInRegistries.bootStrap();
|
||||
+ net.minecraft.core.Registry.register(net.minecraft.core.registries.BuiltInRegistries.MATERIAL_CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this?
|
||||
- BuiltInRegistries.bootStrap();
|
||||
+ // Paper start - register custom flat bedrock
|
||||
+ BuiltInRegistries.bootStrap(() -> {
|
||||
+ net.minecraft.core.Registry.register(net.minecraft.core.registries.BuiltInRegistries.MATERIAL_CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec());
|
||||
+ });
|
||||
+ // Paper end
|
||||
Bootstrap.wrapStreams();
|
||||
}
|
||||
// CraftBukkit start - easier than fixing the decompile
|
||||
|
||||
Reference in New Issue
Block a user