Skip to content

Commit f15a4fa

Browse files
committed
fix: stop-gap solution for create virtual world
Related to #37
1 parent 6ccb1ed commit f15a4fa

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: ishland <[email protected]>
3+
Date: Sat, 8 Nov 2025 23:28:13 +0800
4+
Subject: [PATCH] fix: stop-gap solution for create virtual world
5+
6+
7+
diff --git a/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading_detections/random_instances/MixinWorld.java b/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading_detections/random_instances/MixinWorld.java
8+
index 5858f1c5..9b0e8e62 100644
9+
--- a/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading_detections/random_instances/MixinWorld.java
10+
+++ b/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading_detections/random_instances/MixinWorld.java
11+
@@ -18,6 +18,9 @@ public class MixinWorld {
12+
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/random/Random;create()Lnet/minecraft/util/math/random/Random;"))
13+
private Random redirectWorldRandomInit() {
14+
// new CheckedThreadLocalRandom(RandomSeed.getSeed(), () -> new Thread()).nextInt();
15+
+ if (this.getClass().getName().equals("com.simibubi.create.foundation.virtualWorld")) { // stop-gap solution
16+
+ return Random.create();
17+
+ }
18+
return new CheckedThreadLocalRandom(RandomSeed.getSeed(), () -> this.thread);
19+
}
20+

0 commit comments

Comments
 (0)