Lophine: add configs and update-suppression guards
Add Lophine-specific configuration support (global and carpet configs) and a temporary config transform step during init. Introduce config-controlled command registrations (function, scoreboard, trigger, tick) and enable tick-rate/command tweaks and an entity raytracing tracker flag. Fix datapack command save/listing behavior. Integrate Leaves update-suppression handling broadly: catch and convert update-suppression exceptions across packet handling, ticking, neighbor updates, block state updates and more; add configurable shulker CCE behavior and redstone upward-update compatibility. Provide an option to reintroduce an InstantNeighborUpdater (instant block updater) and other small compatibility/rebrand adjustments.
This commit is contained in:
@@ -5,20 +5,22 @@ Subject: [PATCH] Carpet features
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/me/earthme/luminol/config/ConfigManager.java b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
diff --git a/src/main/java/me/earthme/luminol/config/ConfigManager.java b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
index 05e1aa84586284ac0389e7023f975bfb08438535..da9ff49be1c7a12ea93d665c37e828afd24d7070 100644
|
index 05e1aa84586284ac0389e7023f975bfb08438535..5a8c94337e42584ddaf25ef289327777e7ac675e 100644
|
||||||
--- a/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
--- a/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
+++ b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
+++ b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
@@ -25,6 +25,13 @@ public class ConfigManager {
|
@@ -25,6 +25,15 @@ public class ConfigManager {
|
||||||
public static void initConfigs() {
|
public static void initConfigs() {
|
||||||
registerConfig("luminol", ConfigsInstance.of("luminol", "me.earthme.luminol.config.modules"));
|
registerConfig("luminol", ConfigsInstance.of("luminol", "me.earthme.luminol.config.modules"));
|
||||||
registerConfig("lophine", ConfigsInstance.of("lophine", "fun.bm.lophine.config.modules")); // add lophine global config
|
registerConfig("lophine", ConfigsInstance.of("lophine", "fun.bm.lophine.config.modules")); // add lophine global config
|
||||||
|
+ // Lophine start - add carpet config
|
||||||
+ registerConfig("lophine_carpet", ConfigsInstance.of(
|
+ registerConfig("lophine_carpet", ConfigsInstance.of(
|
||||||
+ new java.io.File("lophine_config"),
|
+ new java.io.File("lophine_config"),
|
||||||
+ "lophine_carpet",
|
+ "lophine_carpet",
|
||||||
+ "lophine_carpet_config.toml",
|
+ "lophine_carpet_config.toml",
|
||||||
+ "lophinecarpetconfig",
|
+ "lophinecarpetconfig",
|
||||||
+ "fun.bm.lophine.carpet.config.modules"
|
+ "fun.bm.lophine.carpet.config.modules"
|
||||||
+ )); // add lophine carpet config
|
+ ));
|
||||||
|
+ // Lophine end - add carpet config
|
||||||
preLoad();
|
preLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -7,17 +7,19 @@ Subject: [PATCH] TEMP: Temporarily transform config between different config
|
|||||||
Should be removed in Minecraft 26.2 Update
|
Should be removed in Minecraft 26.2 Update
|
||||||
|
|
||||||
diff --git a/src/main/java/me/earthme/luminol/config/ConfigManager.java b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
diff --git a/src/main/java/me/earthme/luminol/config/ConfigManager.java b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
index da9ff49be1c7a12ea93d665c37e828afd24d7070..dc6e6d38ebe0c4f7f481da571ab116015fd08cd2 100644
|
index 5a8c94337e42584ddaf25ef289327777e7ac675e..b652525f243c23e09c4e13f67617e99a3ce0db04 100644
|
||||||
--- a/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
--- a/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
+++ b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
+++ b/src/main/java/me/earthme/luminol/config/ConfigManager.java
|
||||||
@@ -62,6 +62,10 @@ public class ConfigManager {
|
@@ -64,6 +64,12 @@ public class ConfigManager {
|
||||||
CompletableFuture.allOf(futures).join();
|
CompletableFuture.allOf(futures).join();
|
||||||
CommandRegister.register(); // register command after config loaded to enable some command didn't depend on config files
|
CommandRegister.register(); // register command after config loaded to enable some command didn't depend on config files
|
||||||
initialized = true;
|
initialized = true;
|
||||||
+
|
+
|
||||||
|
+ // Lophine start - temporarily transform configs
|
||||||
+ reApplyStagedConfigs();
|
+ reApplyStagedConfigs();
|
||||||
+ saveConfigs();
|
+ saveConfigs();
|
||||||
+ configfiles.values().forEach((config) -> config.reload(true, false));
|
+ configfiles.values().forEach((config) -> config.reload(true, false));
|
||||||
|
+ // Lophine end - temporarily transform configs
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerRunnableBeforeFinalLoad(Runnable runnable) {
|
public static void registerRunnableBeforeFinalLoad(Runnable runnable) {
|
||||||
|
|||||||
+3
-3
@@ -26,7 +26,7 @@ index 83178b9a0b017c8945c0f41981838f40263c9a12..ef898f5b60219be00471f9ea227103df
|
|||||||
final Collection<String> packsToEnable, final io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause
|
final Collection<String> packsToEnable, final io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause
|
||||||
) {
|
) {
|
||||||
diff --git a/net/minecraft/server/commands/DataPackCommand.java b/net/minecraft/server/commands/DataPackCommand.java
|
diff --git a/net/minecraft/server/commands/DataPackCommand.java b/net/minecraft/server/commands/DataPackCommand.java
|
||||||
index 0c7c829270d3cd3dd05a3dc7dfe82ee01d5c6bd8..04fa1c5bb1c0b025a56941aae7d2151d1087e257 100644
|
index 0c7c829270d3cd3dd05a3dc7dfe82ee01d5c6bd8..991e0362e96488b64d994f1bdfb8ed5d66f98666 100644
|
||||||
--- a/net/minecraft/server/commands/DataPackCommand.java
|
--- a/net/minecraft/server/commands/DataPackCommand.java
|
||||||
+++ b/net/minecraft/server/commands/DataPackCommand.java
|
+++ b/net/minecraft/server/commands/DataPackCommand.java
|
||||||
@@ -98,7 +98,7 @@ public class DataPackCommand {
|
@@ -98,7 +98,7 @@ public class DataPackCommand {
|
||||||
@@ -34,7 +34,7 @@ index 0c7c829270d3cd3dd05a3dc7dfe82ee01d5c6bd8..04fa1c5bb1c0b025a56941aae7d2151d
|
|||||||
Commands.literal("datapack")
|
Commands.literal("datapack")
|
||||||
.requires(Commands.hasPermission(Commands.LEVEL_GAMEMASTERS))
|
.requires(Commands.hasPermission(Commands.LEVEL_GAMEMASTERS))
|
||||||
- /*.then( // Luminol - Add back read-only datapack command
|
- /*.then( // Luminol - Add back read-only datapack command
|
||||||
+ .then(
|
+ .then( // Lophine - Fix datapack command save function
|
||||||
Commands.literal("enable")
|
Commands.literal("enable")
|
||||||
.then(
|
.then(
|
||||||
Commands.argument("name", StringArgumentType.string())
|
Commands.argument("name", StringArgumentType.string())
|
||||||
@@ -57,7 +57,7 @@ index 0c7c829270d3cd3dd05a3dc7dfe82ee01d5c6bd8..04fa1c5bb1c0b025a56941aae7d2151d
|
|||||||
|
|
||||||
private static int listPacks(final CommandSourceStack source) {
|
private static int listPacks(final CommandSourceStack source) {
|
||||||
- return listEnabledPacks(source) ;// + listAvailablePacks(source); // Luminol - Add back read-only datapack command
|
- return listEnabledPacks(source) ;// + listAvailablePacks(source); // Luminol - Add back read-only datapack command
|
||||||
+ return listEnabledPacks(source) + listAvailablePacks(source);
|
+ return listEnabledPacks(source) + listAvailablePacks(source); // Lophine - Fix datapack command save function
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int listAvailablePacks(final CommandSourceStack source) {
|
private static int listAvailablePacks(final CommandSourceStack source) {
|
||||||
|
|||||||
+4
-2
@@ -5,17 +5,19 @@ Subject: [PATCH] Add config to enable function command
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||||
index 2c2487e1c1c65438119a13bd705a9e44697955ed..6d27350cdb2e699fcc541bc96a5af06a09e0dfd5 100644
|
index 2c2487e1c1c65438119a13bd705a9e44697955ed..4e0428948d618b0a072679762dc3cb39d6e12c2f 100644
|
||||||
--- a/net/minecraft/commands/Commands.java
|
--- a/net/minecraft/commands/Commands.java
|
||||||
+++ b/net/minecraft/commands/Commands.java
|
+++ b/net/minecraft/commands/Commands.java
|
||||||
@@ -217,7 +217,9 @@ public class Commands {
|
@@ -217,7 +217,11 @@ public class Commands {
|
||||||
FillCommand.register(this.dispatcher, context);
|
FillCommand.register(this.dispatcher, context);
|
||||||
FillBiomeCommand.register(this.dispatcher, context);
|
FillBiomeCommand.register(this.dispatcher, context);
|
||||||
ForceLoadCommand.register(this.dispatcher);
|
ForceLoadCommand.register(this.dispatcher);
|
||||||
- //FunctionCommand.register(this.dispatcher); // Folia - region threading - TODO
|
- //FunctionCommand.register(this.dispatcher); // Folia - region threading - TODO
|
||||||
|
+ // Lophine start - Add config to enable function command
|
||||||
+ if (fun.bm.lophine.config.modules.experiment.CommandConfig.function) {
|
+ if (fun.bm.lophine.config.modules.experiment.CommandConfig.function) {
|
||||||
+ FunctionCommand.register(this.dispatcher); // Folia - region threading - TODO
|
+ FunctionCommand.register(this.dispatcher); // Folia - region threading - TODO
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - Add config to enable function command
|
||||||
GameModeCommand.register(this.dispatcher);
|
GameModeCommand.register(this.dispatcher);
|
||||||
GameRuleCommand.register(this.dispatcher, context);
|
GameRuleCommand.register(this.dispatcher, context);
|
||||||
GiveCommand.register(this.dispatcher, context);
|
GiveCommand.register(this.dispatcher, context);
|
||||||
|
|||||||
+3
-3
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to enable scoreboard command
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||||
index 6d27350cdb2e699fcc541bc96a5af06a09e0dfd5..01784d3feaa0dce02f0c26b9a635877b735e6abf 100644
|
index 4e0428948d618b0a072679762dc3cb39d6e12c2f..87ffca5ff0c2775cb85a6058c9be66e00c94f01f 100644
|
||||||
--- a/net/minecraft/commands/Commands.java
|
--- a/net/minecraft/commands/Commands.java
|
||||||
+++ b/net/minecraft/commands/Commands.java
|
+++ b/net/minecraft/commands/Commands.java
|
||||||
@@ -244,7 +244,11 @@ public class Commands {
|
@@ -246,7 +246,11 @@ public class Commands {
|
||||||
RotateCommand.register(this.dispatcher);
|
RotateCommand.register(this.dispatcher);
|
||||||
SayCommand.register(this.dispatcher);
|
SayCommand.register(this.dispatcher);
|
||||||
//ScheduleCommand.register(this.dispatcher); // Folia - region threading
|
//ScheduleCommand.register(this.dispatcher); // Folia - region threading
|
||||||
@@ -17,7 +17,7 @@ index 6d27350cdb2e699fcc541bc96a5af06a09e0dfd5..01784d3feaa0dce02f0c26b9a635877b
|
|||||||
+ if (fun.bm.lophine.config.modules.experiment.CommandConfig.scoreboard) {
|
+ if (fun.bm.lophine.config.modules.experiment.CommandConfig.scoreboard) {
|
||||||
+ ScoreboardCommand.register(this.dispatcher, context); // Folia - region threading
|
+ ScoreboardCommand.register(this.dispatcher, context); // Folia - region threading
|
||||||
+ }
|
+ }
|
||||||
+ // Lophine start - Add a config to enable scoreboard command
|
+ // Lophine end - Add a config to enable scoreboard command
|
||||||
SeedCommand.register(this.dispatcher, commandSelection != Commands.CommandSelection.INTEGRATED);
|
SeedCommand.register(this.dispatcher, commandSelection != Commands.CommandSelection.INTEGRATED);
|
||||||
VersionCommand.register(this.dispatcher, commandSelection != Commands.CommandSelection.INTEGRATED);
|
VersionCommand.register(this.dispatcher, commandSelection != Commands.CommandSelection.INTEGRATED);
|
||||||
SetBlockCommand.register(this.dispatcher, context);
|
SetBlockCommand.register(this.dispatcher, context);
|
||||||
|
|||||||
+2
-2
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to enable trigger command
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||||
index 01784d3feaa0dce02f0c26b9a635877b735e6abf..bb5059a77741bf1d9e73bd8c7f0da6681ec63f67 100644
|
index 87ffca5ff0c2775cb85a6058c9be66e00c94f01f..74ef76058e5a410d12f88aa09450e7d90f63b5e6 100644
|
||||||
--- a/net/minecraft/commands/Commands.java
|
--- a/net/minecraft/commands/Commands.java
|
||||||
+++ b/net/minecraft/commands/Commands.java
|
+++ b/net/minecraft/commands/Commands.java
|
||||||
@@ -272,7 +272,11 @@ public class Commands {
|
@@ -274,7 +274,11 @@ public class Commands {
|
||||||
// Luminol end - Add a config to enable tick command
|
// Luminol end - Add a config to enable tick command
|
||||||
TimeCommand.register(this.dispatcher, context);
|
TimeCommand.register(this.dispatcher, context);
|
||||||
TitleCommand.register(this.dispatcher, context);
|
TitleCommand.register(this.dispatcher, context);
|
||||||
|
|||||||
+8
-4
@@ -18,7 +18,7 @@ index 0c0775bbb0c0ba0c37d1b884bb106b5250e94750..0dfb25ad032429a2aea7aa441dd5fd18
|
|||||||
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
||||||
if (rangeY != -1) {
|
if (rangeY != -1) {
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 552fd994ee30deb6e9f4228b17a2883cf26b164c..6f7e5d62901733df08c6beafbda2e54bc1c5f917 100644
|
index 552fd994ee30deb6e9f4228b17a2883cf26b164c..f090b8d77bd2731debfc61c263bd77550f52212b 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -167,7 +167,7 @@ public abstract class Entity
|
@@ -167,7 +167,7 @@ public abstract class Entity
|
||||||
@@ -30,10 +30,11 @@ index 552fd994ee30deb6e9f4228b17a2883cf26b164c..6f7e5d62901733df08c6beafbda2e54b
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private static final int CURRENT_LEVEL = 2;
|
private static final int CURRENT_LEVEL = 2;
|
||||||
static boolean isLevelAtLeast(ValueInput input, int level) {
|
static boolean isLevelAtLeast(ValueInput input, int level) {
|
||||||
@@ -6432,4 +6432,46 @@ public abstract class Entity
|
@@ -6432,4 +6432,48 @@ public abstract class Entity
|
||||||
// Paper end - Expose entity id counter
|
// Paper end - Expose entity id counter
|
||||||
|
|
||||||
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||||
|
+ // Lophine start - Add config to enable raytracing tracker
|
||||||
+
|
+
|
||||||
+ private long lasttime = 0;
|
+ private long lasttime = 0;
|
||||||
+ private boolean culled = false;
|
+ private boolean culled = false;
|
||||||
@@ -76,18 +77,21 @@ index 552fd994ee30deb6e9f4228b17a2883cf26b164c..6f7e5d62901733df08c6beafbda2e54b
|
|||||||
+ return this.outOfCamera;
|
+ return this.outOfCamera;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ // Lophine end - Add config to enable raytracing tracker
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||||
index cb0a52dc3795e1cf54069bcbe82abf7877a658b8..1440946665f41ebf534d701515f982bbbf4c9686 100644
|
index cb0a52dc3795e1cf54069bcbe82abf7877a658b8..0d743a01ae70baa789cd0e0bb9abd4c4f8310b99 100644
|
||||||
--- a/net/minecraft/world/entity/EntityType.java
|
--- a/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/net/minecraft/world/entity/EntityType.java
|
+++ b/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -1252,6 +1252,9 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
@@ -1252,6 +1252,11 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
||||||
public final int passengerTickTimerId;
|
public final int passengerTickTimerId;
|
||||||
public final int passengerInactiveTickTimerId;
|
public final int passengerInactiveTickTimerId;
|
||||||
// Folia end - profiler
|
// Folia end - profiler
|
||||||
|
+ // Lophine start - Add config to enable raytracing tracker
|
||||||
+ // Luminol - Raytracing entity tracker
|
+ // Luminol - Raytracing entity tracker
|
||||||
+ public boolean skipRaytracningCheck = false;
|
+ public boolean skipRaytracningCheck = false;
|
||||||
+ // Luminol end
|
+ // Luminol end
|
||||||
|
+ // Lophine end - Add config to enable raytracing tracker
|
||||||
|
|
||||||
public EntityType(
|
public EntityType(
|
||||||
final EntityType.EntityFactory<T> factory,
|
final EntityType.EntityFactory<T> factory,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ index 981f63b75584dbcb4bb0d5672e8c8bb140c52f9d..6e8ee04967afa410ce9dccff34bf9a43
|
|||||||
this.tickConnections();
|
this.tickConnections();
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
index 86c51506c518ee445d00f7eef36ee2c9adbd9b4c..6fe5107751fe448ab374bf57b1ef6859f481f17e 100644
|
index 86c51506c518ee445d00f7eef36ee2c9adbd9b4c..a37f392146ccc0319cf56ee0058ae8782b598fe3 100644
|
||||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
||||||
@@ -61,7 +61,7 @@ index 86c51506c518ee445d00f7eef36ee2c9adbd9b4c..6fe5107751fe448ab374bf57b1ef6859
|
|||||||
+ // use max(), don't assume that tickStart >= scheduledStart
|
+ // use max(), don't assume that tickStart >= scheduledStart
|
||||||
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||||
+ }
|
+ }
|
||||||
+ // Lophine end - Add tick command support
|
+ // Lophine end - Add a config to enable tick command
|
||||||
|
|
||||||
if (!this.tryMarkTicking()) {
|
if (!this.tryMarkTicking()) {
|
||||||
if (!this.cancelled.get()) {
|
if (!this.cancelled.get()) {
|
||||||
@@ -92,7 +92,7 @@ index 8d0f810100a4eac65831913feeb9a9eeb0e6006a..ca35415e152dc63cb9f4ae8da8b06766
|
|||||||
this.sprintTimeSpend = this.sprintTimeSpend + (System.nanoTime() - this.sprintTickStartTime);
|
this.sprintTimeSpend = this.sprintTimeSpend + (System.nanoTime() - this.sprintTickStartTime);
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/commands/TickCommand.java b/net/minecraft/server/commands/TickCommand.java
|
diff --git a/net/minecraft/server/commands/TickCommand.java b/net/minecraft/server/commands/TickCommand.java
|
||||||
index cae943bae4701f74b46a49d68da83ae797841590..d8f5f1b2f75a4e23556fb016ad47f2cefe1309ce 100644
|
index cae943bae4701f74b46a49d68da83ae797841590..9f43eff6160ac6855c2e5dd9c23c384b03b7e96c 100644
|
||||||
--- a/net/minecraft/server/commands/TickCommand.java
|
--- a/net/minecraft/server/commands/TickCommand.java
|
||||||
+++ b/net/minecraft/server/commands/TickCommand.java
|
+++ b/net/minecraft/server/commands/TickCommand.java
|
||||||
@@ -14,7 +14,7 @@ import net.minecraft.server.ServerTickRateManager;
|
@@ -14,7 +14,7 @@ import net.minecraft.server.ServerTickRateManager;
|
||||||
@@ -109,7 +109,7 @@ index cae943bae4701f74b46a49d68da83ae797841590..d8f5f1b2f75a4e23556fb016ad47f2ce
|
|||||||
.requires(Commands.hasPermission(Commands.LEVEL_ADMINS))
|
.requires(Commands.hasPermission(Commands.LEVEL_ADMINS))
|
||||||
.then(Commands.literal("query").executes(c -> tickQuery(c.getSource())))
|
.then(Commands.literal("query").executes(c -> tickQuery(c.getSource())))
|
||||||
-/* .then(
|
-/* .then(
|
||||||
+ .then(
|
+ .then( // Lophine - Add tick rate support
|
||||||
Commands.literal("rate")
|
Commands.literal("rate")
|
||||||
.then(
|
.then(
|
||||||
Commands.argument("rate", FloatArgumentType.floatArg(1.0F, 10000.0F))
|
Commands.argument("rate", FloatArgumentType.floatArg(1.0F, 10000.0F))
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ index ebd2f2887780d9c6c3c44983bac23eab732cf43f..14be3d21cc1a613b1d9164ecc699073f
|
|||||||
|
|
||||||
public @Nullable ServerPlayer getPlayer(final String playerName) {
|
public @Nullable ServerPlayer getPlayer(final String playerName) {
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 6f7e5d62901733df08c6beafbda2e54bc1c5f917..07c5fed7b0bf3ecefb54ccb0bfb922c2f11f7939 100644
|
index f090b8d77bd2731debfc61c263bd77550f52212b..03c155140da7300f6f934aff323e0daed1b63366 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1257,7 +1257,7 @@ public abstract class Entity
|
@@ -1257,7 +1257,7 @@ public abstract class Entity
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ index 8d6a5d2ab4589f81abdd4ae939f197051e9523fc..54011666a2f358fe38ca03bc39d68d12
|
|||||||
final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle foliaProfiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler(); // Folia - profiler
|
final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle foliaProfiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler(); // Folia - profiler
|
||||||
ProfilerFiller profiler = Profiler.get();
|
ProfilerFiller profiler = Profiler.get();
|
||||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||||
index fc29654dd7ee3329edf1ccf705f45631d0ecc079..5cad076041ed008670cfd8e51a3601c2ef972ad1 100644
|
index fc29654dd7ee3329edf1ccf705f45631d0ecc079..9b8ee2df5a0b6d76d9bfc747187f6cd51bb4a520 100644
|
||||||
--- a/net/minecraft/world/entity/Mob.java
|
--- a/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/net/minecraft/world/entity/Mob.java
|
+++ b/net/minecraft/world/entity/Mob.java
|
||||||
@@ -813,6 +813,44 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
|
@@ -813,6 +813,44 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
|
||||||
@@ -158,7 +158,7 @@ index fc29654dd7ee3329edf1ccf705f45631d0ecc079..5cad076041ed008670cfd8e51a3601c2
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Lophine end
|
+ // Lophine end - fix some bug if player is cross scheduler >> to remove monster if the region don't have any valid player
|
||||||
this.noActionTime = 0;
|
this.noActionTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-19
@@ -8,19 +8,22 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/network/PacketProcessor.java b/net/minecraft/network/PacketProcessor.java
|
diff --git a/net/minecraft/network/PacketProcessor.java b/net/minecraft/network/PacketProcessor.java
|
||||||
index 24f5b890b0126fc817863f99b676da1a548f7608..78bea975c15130c91c90f48c868ac32e2db7433f 100644
|
index 24f5b890b0126fc817863f99b676da1a548f7608..a25bc31c04778bf12e3b6301ffcfb2275fcc2d90 100644
|
||||||
--- a/net/minecraft/network/PacketProcessor.java
|
--- a/net/minecraft/network/PacketProcessor.java
|
||||||
+++ b/net/minecraft/network/PacketProcessor.java
|
+++ b/net/minecraft/network/PacketProcessor.java
|
||||||
@@ -106,7 +106,19 @@ public class PacketProcessor implements AutoCloseable {
|
@@ -106,7 +106,23 @@ public class PacketProcessor implements AutoCloseable {
|
||||||
final int packetTimerId = profiler.getOrCreateTimerAndStart(() -> "Packet Handler: ".concat(ListenerAndPacket.this.packet.getClass().getName())); try { // Folia - profiler
|
final int packetTimerId = profiler.getOrCreateTimerAndStart(() -> "Packet Handler: ".concat(ListenerAndPacket.this.packet.getClass().getName())); try { // Folia - profiler
|
||||||
this.packet.handle(this.listener);
|
this.packet.handle(this.listener);
|
||||||
} finally { profiler.stopTimer(packetTimerId); } // Folia - profiler
|
} finally { profiler.stopTimer(packetTimerId); } // Folia - profiler
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ if (this.listener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl gamePacketListener) {
|
+ if (this.listener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl gamePacketListener) {
|
||||||
+ exception.providePlayer(gamePacketListener.player);
|
+ exception.providePlayer(gamePacketListener.player);
|
||||||
+ }
|
+ }
|
||||||
+ exception.consume();
|
+ exception.consume();
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
} catch (Exception var3) {
|
} catch (Exception var3) {
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ if (var3.getCause() instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ if (var3.getCause() instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ if (this.listener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl gamePacketListener) {
|
+ if (this.listener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl gamePacketListener) {
|
||||||
+ exception.providePlayer(gamePacketListener.player);
|
+ exception.providePlayer(gamePacketListener.player);
|
||||||
@@ -28,25 +31,29 @@ index 24f5b890b0126fc817863f99b676da1a548f7608..78bea975c15130c91c90f48c868ac32e
|
|||||||
+ exception.consume();
|
+ exception.consume();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
if (var3 instanceof ReportedException re && re.getCause() instanceof OutOfMemoryError) {
|
if (var3 instanceof ReportedException re && re.getCause() instanceof OutOfMemoryError) {
|
||||||
throw PacketUtils.makeReportedException(var3, this.packet, this.listener);
|
throw PacketUtils.makeReportedException(var3, this.packet, this.listener);
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||||
index 3b9a4f4b5794faa4955018858c94fd5c2d6ada3d..19bef18e606d873308d08987d90e298703efb574 100644
|
index 3b9a4f4b5794faa4955018858c94fd5c2d6ada3d..0b7e704210c4bc01797a33a9c0da609a844d8489 100644
|
||||||
--- a/net/minecraft/server/MinecraftServer.java
|
--- a/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/net/minecraft/server/MinecraftServer.java
|
+++ b/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -2019,11 +2019,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2019,11 +2019,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
try {
|
try {
|
||||||
foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler
|
foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler
|
||||||
level.tick(haveTime, region); // Folia - region threading
|
level.tick(haveTime, region); // Folia - region threading
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ exception.provideLevel(level);
|
+ exception.provideLevel(level);
|
||||||
+ exception.consume();
|
+ exception.consume();
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
} finally { foliaProfiler.stopTimer(level.tickTimerId); } // Folia - profiler
|
} finally { foliaProfiler.stopTimer(level.tickTimerId); } // Folia - profiler
|
||||||
} catch (Throwable var7) {
|
} catch (Throwable var7) {
|
||||||
- CrashReport report = CrashReport.forThrowable(var7, "Exception ticking world");
|
- CrashReport report = CrashReport.forThrowable(var7, "Exception ticking world");
|
||||||
- level.fillReportDetails(report);
|
- level.fillReportDetails(report);
|
||||||
- throw new ReportedException(report);
|
- throw new ReportedException(report);
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ org.leavesmc.leaves.util.UpdateSuppressionException updateSuppressionException = null;
|
+ org.leavesmc.leaves.util.UpdateSuppressionException updateSuppressionException = null;
|
||||||
+ if (var7 instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ if (var7 instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ updateSuppressionException = exception;
|
+ updateSuppressionException = exception;
|
||||||
@@ -62,18 +69,20 @@ index 3b9a4f4b5794faa4955018858c94fd5c2d6ada3d..19bef18e606d873308d08987d90e2987
|
|||||||
+ level.fillReportDetails(report);
|
+ level.fillReportDetails(report);
|
||||||
+ throw new ReportedException(report);
|
+ throw new ReportedException(report);
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
}
|
}
|
||||||
|
|
||||||
profiler.pop();
|
profiler.pop();
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 54011666a2f358fe38ca03bc39d68d122011c796..3496696c6b023e7df95027917b3391557dddd8d0 100644
|
index 54011666a2f358fe38ca03bc39d68d122011c796..3f7b3a07a6f65b231de16d5bc1e68d5b90f41311 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -967,7 +967,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
@@ -967,7 +967,18 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||||
// Kaiiju end
|
// Kaiiju end
|
||||||
|
|
||||||
profiler.push("tick");
|
profiler.push("tick");
|
||||||
- this.guardEntityTick(this::tickNonPassenger, entity);
|
- this.guardEntityTick(this::tickNonPassenger, entity);
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
||||||
+ try {
|
+ try {
|
||||||
+ this.guardEntityTick(this::tickNonPassenger, entity);
|
+ this.guardEntityTick(this::tickNonPassenger, entity);
|
||||||
@@ -84,33 +93,37 @@ index 54011666a2f358fe38ca03bc39d68d122011c796..3496696c6b023e7df95027917b339155
|
|||||||
+ } else {
|
+ } else {
|
||||||
+ this.guardEntityTick(this::tickNonPassenger, entity);
|
+ this.guardEntityTick(this::tickNonPassenger, entity);
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
profiler.pop();
|
profiler.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||||
index c38c098bf4db3d8fb09ba9f102dbddfb57faca06..83e14731a591063a38b14a7d7490efb56dda5403 100644
|
index c38c098bf4db3d8fb09ba9f102dbddfb57faca06..627af751fcd905c60f2d09eb066ac53dba607d85 100644
|
||||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1130,6 +1130,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
@@ -1130,6 +1130,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||||
|
|
||||||
// Folia - region threading - move to main tick loop where we can detect duplicates
|
// Folia - region threading - move to main tick loop where we can detect duplicates
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ exception.providePlayer(this);
|
+ exception.providePlayer(this);
|
||||||
+ exception.provideLevel(this.level());
|
+ exception.provideLevel(this.level());
|
||||||
+ exception.consume();
|
+ exception.consume();
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
} catch (Throwable var4) {
|
} catch (Throwable var4) {
|
||||||
CrashReport report = CrashReport.forThrowable(var4, "Ticking player");
|
CrashReport report = CrashReport.forThrowable(var4, "Ticking player");
|
||||||
CrashReportCategory category = report.addCategory("Player being ticked");
|
CrashReportCategory category = report.addCategory("Player being ticked");
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 07c5fed7b0bf3ecefb54ccb0bfb922c2f11f7939..8a92d1748464ef8d1d33e51163a3e0d74120e5a7 100644
|
index 03c155140da7300f6f934aff323e0daed1b63366..ee84484ca5aac03b9f321398c4d85311632b5697 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1459,7 +1459,15 @@ public abstract class Entity
|
@@ -1459,7 +1459,17 @@ public abstract class Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldVibrate) {
|
if (shouldVibrate) {
|
||||||
- this.level().gameEvent(GameEvent.STEP, this.position(), GameEvent.Context.of(this, blockState));
|
- this.level().gameEvent(GameEvent.STEP, this.position(), GameEvent.Context.of(this, blockState));
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ try {
|
+ try {
|
||||||
+ this.level().gameEvent(GameEvent.STEP, this.position(), GameEvent.Context.of(this, blockState));
|
+ this.level().gameEvent(GameEvent.STEP, this.position(), GameEvent.Context.of(this, blockState));
|
||||||
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ } catch (org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
@@ -120,18 +133,20 @@ index 07c5fed7b0bf3ecefb54ccb0bfb922c2f11f7939..8a92d1748464ef8d1d33e51163a3e0d7
|
|||||||
+ }
|
+ }
|
||||||
+ exception.consume();
|
+ exception.consume();
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
index 08ad9f418fbe733b788ec27e13b61994c3a5f09d..c0b086fd5084fc0e39b91d3f6bd6904ef19f4157 100644
|
index 08ad9f418fbe733b788ec27e13b61994c3a5f09d..f9dacc278200b05acb385e1f1cbf858e43d0d9f4 100644
|
||||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
@@ -181,7 +181,14 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
@@ -181,7 +181,16 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getAnalogOutputSignal(final BlockState state, final Level level, final BlockPos pos, final Direction direction) {
|
protected int getAnalogOutputSignal(final BlockState state, final Level level, final BlockPos pos, final Direction direction) {
|
||||||
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ try {
|
+ try {
|
||||||
+ return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
+ return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
||||||
+ } catch (ClassCastException ex) {
|
+ } catch (ClassCastException ex) {
|
||||||
@@ -140,18 +155,20 @@ index 08ad9f418fbe733b788ec27e13b61994c3a5f09d..c0b086fd5084fc0e39b91d3f6bd6904e
|
|||||||
+ }
|
+ }
|
||||||
+ throw ex;
|
+ throw ex;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable DyeColor getColor() {
|
public @Nullable DyeColor getColor() {
|
||||||
diff --git a/net/minecraft/world/level/block/state/StateHolder.java b/net/minecraft/world/level/block/state/StateHolder.java
|
diff --git a/net/minecraft/world/level/block/state/StateHolder.java b/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
index b72861c0164ebb13b6fc3e78cd7ce0a2c484f22d..6d3af2481e81795771ac8f82d984681ec8c9e0b9 100644
|
index b72861c0164ebb13b6fc3e78cd7ce0a2c484f22d..5bf43973c8de8c2f33d384f28fdd06864cdf9319 100644
|
||||||
--- a/net/minecraft/world/level/block/state/StateHolder.java
|
--- a/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
+++ b/net/minecraft/world/level/block/state/StateHolder.java
|
+++ b/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
@@ -118,7 +118,14 @@ public abstract class StateHolder<O, S> implements ca.spottedleaf.moonrise.patch
|
@@ -118,7 +118,16 @@ public abstract class StateHolder<O, S> implements ca.spottedleaf.moonrise.patch
|
||||||
if (ret != null) {
|
if (ret != null) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
- throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
- throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ IllegalArgumentException iae = new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
+ IllegalArgumentException iae = new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
||||||
+ org.leavesmc.leaves.util.UpdateSuppressionException exception = new org.leavesmc.leaves.util.UpdateSuppressionException(null, null, null, null, iae);
|
+ org.leavesmc.leaves.util.UpdateSuppressionException exception = new org.leavesmc.leaves.util.UpdateSuppressionException(null, null, null, null, iae);
|
||||||
@@ -160,22 +177,24 @@ index b72861c0164ebb13b6fc3e78cd7ce0a2c484f22d..6d3af2481e81795771ac8f82d984681e
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ throw iae;
|
+ throw iae;
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
// Paper end - optimise blockstate property access
|
// Paper end - optimise blockstate property access
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 3708f9ffc46a5b1c038c0e7b2ce84802e2b22397..7760a711f4c49fc3499bf71fabb59ee8b4c85083 100644
|
index 3708f9ffc46a5b1c038c0e7b2ce84802e2b22397..241c43170b5020c1521f43d349813586ba1f69a5 100644
|
||||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -400,6 +400,7 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
@@ -400,6 +400,8 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
Block newBlock = state.getBlock();
|
Block newBlock = state.getBlock();
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ try {
|
+ try {
|
||||||
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING).update(localX, y, localZ, state);
|
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING).update(localX, y, localZ, state);
|
||||||
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES).update(localX, y, localZ, state);
|
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES).update(localX, y, localZ, state);
|
||||||
this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR).update(localX, y, localZ, state);
|
this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR).update(localX, y, localZ, state);
|
||||||
@@ -468,6 +469,10 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
@@ -468,6 +470,11 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||||
this.markUnsaved();
|
this.markUnsaved();
|
||||||
return oldState;
|
return oldState;
|
||||||
}
|
}
|
||||||
@@ -183,23 +202,27 @@ index 3708f9ffc46a5b1c038c0e7b2ce84802e2b22397..7760a711f4c49fc3499bf71fabb59ee8
|
|||||||
+ exception.provideBlock(this.level, pos, newBlock);
|
+ exception.provideBlock(this.level, pos, newBlock);
|
||||||
+ throw exception;
|
+ throw exception;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||||
index 9b8d63f69ed1101f1b7b2728690e35165b9aeb99..6d25139a94df7c0442cc9fea96d5839ce8a23d54 100644
|
index 9b8d63f69ed1101f1b7b2728690e35165b9aeb99..6358787f3c7dcfa599b2949613236fa8de025096 100644
|
||||||
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
|
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||||
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||||
@@ -87,9 +87,20 @@ public interface NeighborUpdater {
|
@@ -87,9 +87,24 @@ public interface NeighborUpdater {
|
||||||
} finally { if (levelChunk != null) levelChunk.getChunkHot().stopTickingAndCount(); } // KioCG
|
} finally { if (levelChunk != null) levelChunk.getChunkHot().stopTickingAndCount(); } // KioCG
|
||||||
// Spigot start
|
// Spigot start
|
||||||
} catch (StackOverflowError ex) {
|
} catch (StackOverflowError ex) {
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
||||||
+ throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, level, changedBlock, null, ex);
|
+ throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, level, changedBlock, null, ex);
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
level.lastPhysicsProblem = pos.immutable();
|
level.lastPhysicsProblem = pos.immutable();
|
||||||
// Spigot end
|
// Spigot end
|
||||||
} catch (Throwable var9) {
|
} catch (Throwable var9) {
|
||||||
|
+ // Lophine start - catch update suppression crash
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
||||||
+ if (var9 instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
+ if (var9 instanceof org.leavesmc.leaves.util.UpdateSuppressionException exception) {
|
||||||
+ exception.provideBlock(level, pos, changedBlock);
|
+ exception.provideBlock(level, pos, changedBlock);
|
||||||
@@ -208,6 +231,7 @@ index 9b8d63f69ed1101f1b7b2728690e35165b9aeb99..6d25139a94df7c0442cc9fea96d5839c
|
|||||||
+ throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, level, changedBlock, null, var9);
|
+ throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, level, changedBlock, null, var9);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ // Lophine end - catch update suppression crash
|
||||||
CrashReport report = CrashReport.forThrowable(var9, "Exception while updating neighbours");
|
CrashReport report = CrashReport.forThrowable(var9, "Exception while updating neighbours");
|
||||||
CrashReportCategory category = report.addCategory("Block being updated");
|
CrashReportCategory category = report.addCategory("Block being updated");
|
||||||
category.setDetail(
|
category.setDetail(
|
||||||
|
|||||||
@@ -8,17 +8,19 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
index c0b086fd5084fc0e39b91d3f6bd6904ef19f4157..8259f530ec50554906c254b60f1e964b52c02852 100644
|
index f9dacc278200b05acb385e1f1cbf858e43d0d9f4..722ce78461b2303f99493c309345697cfc98fb99 100644
|
||||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
@@ -182,7 +182,9 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
@@ -183,7 +183,11 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||||
@Override
|
|
||||||
protected int getAnalogOutputSignal(final BlockState state, final Level level, final BlockPos pos, final Direction direction) {
|
protected int getAnalogOutputSignal(final BlockState state, final Level level, final BlockPos pos, final Direction direction) {
|
||||||
|
// Lophine start - catch update suppression crash
|
||||||
try {
|
try {
|
||||||
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
||||||
|
+ // Lophine start - configurable shulker CCE
|
||||||
+ return fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.shulkerBoxCCEReintroduced
|
+ return fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.shulkerBoxCCEReintroduced
|
||||||
+ ? AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container)level.getBlockEntity(pos))
|
+ ? AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container)level.getBlockEntity(pos))
|
||||||
+ : AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
+ : AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
||||||
|
+ // Lophine end - configurable shulker CCE
|
||||||
} catch (ClassCastException ex) {
|
} catch (ClassCastException ex) {
|
||||||
if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.mergedUpdateSuppressionCrashEnabled()) {
|
||||||
throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, null, this, null, ex);
|
throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, null, this, null, ex);
|
||||||
|
|||||||
+15
-7
@@ -10,55 +10,63 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/block/ComparatorBlock.java b/net/minecraft/world/level/block/ComparatorBlock.java
|
diff --git a/net/minecraft/world/level/block/ComparatorBlock.java b/net/minecraft/world/level/block/ComparatorBlock.java
|
||||||
index 45e11737bc2558a4ebfffe133d43111f45dd7d16..d3bcef3fa3228c3869041754b2c18dfc987aac35 100644
|
index 45e11737bc2558a4ebfffe133d43111f45dd7d16..db80f0b400c7356c5524ea799354e6c44de14700 100644
|
||||||
--- a/net/minecraft/world/level/block/ComparatorBlock.java
|
--- a/net/minecraft/world/level/block/ComparatorBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/ComparatorBlock.java
|
+++ b/net/minecraft/world/level/block/ComparatorBlock.java
|
||||||
@@ -59,6 +59,9 @@ public class ComparatorBlock extends DiodeBlock implements EntityBlock {
|
@@ -59,6 +59,11 @@ public class ComparatorBlock extends DiodeBlock implements EntityBlock {
|
||||||
final BlockState neighbourState,
|
final BlockState neighbourState,
|
||||||
final RandomSource random
|
final RandomSource random
|
||||||
) {
|
) {
|
||||||
|
+ // Lophine start - redstone ignore upwards update
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && directionToNeighbour == Direction.DOWN) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && directionToNeighbour == Direction.DOWN) {
|
||||||
+ return state;
|
+ return state;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - redstone ignore upwards update
|
||||||
return directionToNeighbour == Direction.DOWN && !this.canSurviveOn(level, neighbourPos, neighbourState)
|
return directionToNeighbour == Direction.DOWN && !this.canSurviveOn(level, neighbourPos, neighbourState)
|
||||||
? Blocks.AIR.defaultBlockState()
|
? Blocks.AIR.defaultBlockState()
|
||||||
: super.updateShape(state, level, ticks, pos, directionToNeighbour, neighbourPos, neighbourState, random);
|
: super.updateShape(state, level, ticks, pos, directionToNeighbour, neighbourPos, neighbourState, random);
|
||||||
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
index 759eb347299813c20226cc2fc5dc7718d12b7f56..619f5e37919693fc5976aedefed3bb5428395439 100644
|
index 759eb347299813c20226cc2fc5dc7718d12b7f56..30a7208a698a8bd3ba8a08ace6f23b206d90f6a3 100644
|
||||||
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
|
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
@@ -179,7 +179,9 @@ public class RedStoneWireBlock extends Block {
|
@@ -179,7 +179,11 @@ public class RedStoneWireBlock extends Block {
|
||||||
final RandomSource random
|
final RandomSource random
|
||||||
) {
|
) {
|
||||||
if (directionToNeighbour == Direction.DOWN) {
|
if (directionToNeighbour == Direction.DOWN) {
|
||||||
- return !this.canSurviveOn(level, neighbourPos, neighbourState) ? Blocks.AIR.defaultBlockState() : state;
|
- return !this.canSurviveOn(level, neighbourPos, neighbourState) ? Blocks.AIR.defaultBlockState() : state;
|
||||||
|
+ // Lophine start - redstone ignore upwards update
|
||||||
+ return fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced
|
+ return fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced
|
||||||
+ ? state
|
+ ? state
|
||||||
+ : !this.canSurviveOn(level, neighbourPos, neighbourState) ? Blocks.AIR.defaultBlockState() : state;
|
+ : !this.canSurviveOn(level, neighbourPos, neighbourState) ? Blocks.AIR.defaultBlockState() : state;
|
||||||
|
+ // Lophine end - redstone ignore upwards update
|
||||||
} else if (directionToNeighbour == Direction.UP) {
|
} else if (directionToNeighbour == Direction.UP) {
|
||||||
return this.getConnectionState(level, state, pos);
|
return this.getConnectionState(level, state, pos);
|
||||||
} else {
|
} else {
|
||||||
@@ -243,7 +245,8 @@ public class RedStoneWireBlock extends Block {
|
@@ -243,7 +247,10 @@ public class RedStoneWireBlock extends Block {
|
||||||
BlockPos relativePos = pos.relative(direction);
|
BlockPos relativePos = pos.relative(direction);
|
||||||
BlockState relativeState = level.getBlockState(relativePos);
|
BlockState relativeState = level.getBlockState(relativePos);
|
||||||
if (canConnectUp) {
|
if (canConnectUp) {
|
||||||
- boolean isPlaceableAbove = relativeState.getBlock() instanceof TrapDoorBlock || this.canSurviveOn(level, relativePos, relativeState);
|
- boolean isPlaceableAbove = relativeState.getBlock() instanceof TrapDoorBlock || this.canSurviveOn(level, relativePos, relativeState);
|
||||||
|
+ // Lophine start - redstone ignore upwards update
|
||||||
+ boolean isPlaceableAbove = (!fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && relativeState.getBlock() instanceof TrapDoorBlock)
|
+ boolean isPlaceableAbove = (!fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && relativeState.getBlock() instanceof TrapDoorBlock)
|
||||||
+ || this.canSurviveOn(level, relativePos, relativeState);
|
+ || this.canSurviveOn(level, relativePos, relativeState);
|
||||||
|
+ // Lophine end - redstone ignore upwards update
|
||||||
if (isPlaceableAbove && shouldConnectTo(level.getBlockState(relativePos.above()))) {
|
if (isPlaceableAbove && shouldConnectTo(level.getBlockState(relativePos.above()))) {
|
||||||
if (relativeState.isFaceSturdy(level, relativePos, direction.getOpposite())) {
|
if (relativeState.isFaceSturdy(level, relativePos, direction.getOpposite())) {
|
||||||
return RedstoneSide.UP;
|
return RedstoneSide.UP;
|
||||||
diff --git a/net/minecraft/world/level/block/RepeaterBlock.java b/net/minecraft/world/level/block/RepeaterBlock.java
|
diff --git a/net/minecraft/world/level/block/RepeaterBlock.java b/net/minecraft/world/level/block/RepeaterBlock.java
|
||||||
index d301ca4c91e75d715998aa7ed155fd44ccd64785..cc2694d0fc3c9bbe5e91771b3aef8ffb749515b4 100644
|
index d301ca4c91e75d715998aa7ed155fd44ccd64785..1985602b11a584fc70b1bb9ca4c643757d4c0ed3 100644
|
||||||
--- a/net/minecraft/world/level/block/RepeaterBlock.java
|
--- a/net/minecraft/world/level/block/RepeaterBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/RepeaterBlock.java
|
+++ b/net/minecraft/world/level/block/RepeaterBlock.java
|
||||||
@@ -70,6 +70,9 @@ public class RepeaterBlock extends DiodeBlock {
|
@@ -70,6 +70,11 @@ public class RepeaterBlock extends DiodeBlock {
|
||||||
final BlockState neighbourState,
|
final BlockState neighbourState,
|
||||||
final RandomSource random
|
final RandomSource random
|
||||||
) {
|
) {
|
||||||
|
+ // Lophine start - redstone ignore upwards update
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && directionToNeighbour == Direction.DOWN) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.dustTrapdoorReintroduced && directionToNeighbour == Direction.DOWN) {
|
||||||
+ return state;
|
+ return state;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - redstone ignore upwards update
|
||||||
if (directionToNeighbour == Direction.DOWN && !this.canSurviveOn(level, neighbourPos, neighbourState)) {
|
if (directionToNeighbour == Direction.DOWN && !this.canSurviveOn(level, neighbourPos, neighbourState)) {
|
||||||
return Blocks.AIR.defaultBlockState();
|
return Blocks.AIR.defaultBlockState();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Instant Block Updater
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||||
index 64d407c5a6140a7e5dc47a8e304b4c00602e2bdd..1a426e1aa456a8ea432f62483c3be5c328b97953 100644
|
index 64d407c5a6140a7e5dc47a8e304b4c00602e2bdd..9911c70d89cfb43b803cab9bbe6eedd1142f59d6 100644
|
||||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||||
@@ -506,7 +506,7 @@ public final class RegionizedWorldData {
|
@@ -506,7 +506,7 @@ public final class RegionizedWorldData {
|
||||||
@@ -13,22 +13,24 @@ index 64d407c5a6140a7e5dc47a8e304b4c00602e2bdd..1a426e1aa456a8ea432f62483c3be5c3
|
|||||||
// From Level
|
// From Level
|
||||||
public boolean populating;
|
public boolean populating;
|
||||||
- public final CollectingNeighborUpdater neighborUpdater;
|
- public final CollectingNeighborUpdater neighborUpdater;
|
||||||
+ public final net.minecraft.world.level.redstone.NeighborUpdater neighborUpdater;
|
+ public final net.minecraft.world.level.redstone.NeighborUpdater neighborUpdater; // Lophine - Instant Block Updater
|
||||||
public boolean captureBlockStates = false;
|
public boolean captureBlockStates = false;
|
||||||
public boolean captureTreeGeneration = false;
|
public boolean captureTreeGeneration = false;
|
||||||
public final Map<BlockPos, CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper
|
public final Map<BlockPos, CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper
|
||||||
@@ -567,7 +567,9 @@ public final class RegionizedWorldData {
|
@@ -567,7 +567,11 @@ public final class RegionizedWorldData {
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.blockLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, true);
|
this.blockLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, true);
|
||||||
this.fluidLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, false);
|
this.fluidLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, false);
|
||||||
- this.neighborUpdater = new CollectingNeighborUpdater(world, world.neighbourUpdateMax);
|
- this.neighborUpdater = new CollectingNeighborUpdater(world, world.neighbourUpdateMax);
|
||||||
|
+ // Lophine start - Instant Block Updater
|
||||||
+ this.neighborUpdater = fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.instantBlockUpdaterReintroduced
|
+ this.neighborUpdater = fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.instantBlockUpdaterReintroduced
|
||||||
+ ? new net.minecraft.world.level.redstone.InstantNeighborUpdater(world)
|
+ ? new net.minecraft.world.level.redstone.InstantNeighborUpdater(world)
|
||||||
+ : new CollectingNeighborUpdater(world, world.neighbourUpdateMax);
|
+ : new CollectingNeighborUpdater(world, world.neighbourUpdateMax);
|
||||||
|
+ // Lophine end - Instant Block Updater
|
||||||
this.nearbyPlayers = new NearbyPlayers(world);
|
this.nearbyPlayers = new NearbyPlayers(world);
|
||||||
this.wireHandler = new alternate.current.wire.WireHandler(world);
|
this.wireHandler = new alternate.current.wire.WireHandler(world);
|
||||||
this.turbo = new io.papermc.paper.redstone.RedstoneWireTurbo((RedStoneWireBlock)Blocks.REDSTONE_WIRE);
|
this.turbo = new io.papermc.paper.redstone.RedstoneWireTurbo((RedStoneWireBlock)Blocks.REDSTONE_WIRE);
|
||||||
@@ -896,4 +898,4 @@ public final class RegionizedWorldData {
|
@@ -896,4 +900,4 @@ public final class RegionizedWorldData {
|
||||||
public int getChunkCount() {
|
public int getChunkCount() {
|
||||||
return this.chunks.size();
|
return this.chunks.size();
|
||||||
}
|
}
|
||||||
@@ -36,10 +38,10 @@ index 64d407c5a6140a7e5dc47a8e304b4c00602e2bdd..1a426e1aa456a8ea432f62483c3be5c3
|
|||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
+}
|
+}
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 3496696c6b023e7df95027917b3391557dddd8d0..d8718805a965db11dfce8ed7f5ea65a638cc4510 100644
|
index 3f7b3a07a6f65b231de16d5bc1e68d5b90f41311..ad36f4bace2bf6eaf28f3ca26bf07369eddbfe38 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -999,11 +999,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
@@ -1001,11 +1001,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
profiler.pop();
|
profiler.pop();
|
||||||
profiler.push("debugSynchronizers");
|
profiler.push("debugSynchronizers");
|
||||||
@@ -48,6 +50,7 @@ index 3496696c6b023e7df95027917b3391557dddd8d0..d8718805a965db11dfce8ed7f5ea65a6
|
|||||||
- .setDebugListener(blockPos -> this.debugSynchronizers.broadcastEventToTracking(blockPos, DebugSubscriptions.NEIGHBOR_UPDATES, blockPos));
|
- .setDebugListener(blockPos -> this.debugSynchronizers.broadcastEventToTracking(blockPos, DebugSubscriptions.NEIGHBOR_UPDATES, blockPos));
|
||||||
- } else {
|
- } else {
|
||||||
- regionizedWorldData.neighborUpdater.setDebugListener(null); // Folia - region threading
|
- regionizedWorldData.neighborUpdater.setDebugListener(null); // Folia - region threading
|
||||||
|
+ // Lophine start - Instant Block Updater
|
||||||
+ if (regionizedWorldData.neighborUpdater instanceof net.minecraft.world.level.redstone.CollectingNeighborUpdater neighborUpdater) {
|
+ if (regionizedWorldData.neighborUpdater instanceof net.minecraft.world.level.redstone.CollectingNeighborUpdater neighborUpdater) {
|
||||||
+ if (this.debugSynchronizers.hasAnySubscriberFor(DebugSubscriptions.NEIGHBOR_UPDATES)) {
|
+ if (this.debugSynchronizers.hasAnySubscriberFor(DebugSubscriptions.NEIGHBOR_UPDATES)) {
|
||||||
+ neighborUpdater // Folia - region threading
|
+ neighborUpdater // Folia - region threading
|
||||||
@@ -55,6 +58,7 @@ index 3496696c6b023e7df95027917b3391557dddd8d0..d8718805a965db11dfce8ed7f5ea65a6
|
|||||||
+ } else {
|
+ } else {
|
||||||
+ neighborUpdater.setDebugListener(null); // Folia - region threading
|
+ neighborUpdater.setDebugListener(null); // Folia - region threading
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - Instant Block Updater
|
||||||
}
|
}
|
||||||
|
|
||||||
this.debugSynchronizers.tick(this.server.debugSubscribers());
|
this.debugSynchronizers.tick(this.server.debugSubscribers());
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@ Subject: [PATCH] Revert TrapDoorBlock changes form Paper
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/block/TrapDoorBlock.java b/net/minecraft/world/level/block/TrapDoorBlock.java
|
diff --git a/net/minecraft/world/level/block/TrapDoorBlock.java b/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||||
index cfc8b668980e0cba74b3f0d42c4902eb6aa8b01e..da4a39e3e8bf9672614a04fae9834a54555cc9f1 100644
|
index cfc8b668980e0cba74b3f0d42c4902eb6aa8b01e..f01894c230b1ae4add3e20329e8dc87571d2c793 100644
|
||||||
--- a/net/minecraft/world/level/block/TrapDoorBlock.java
|
--- a/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/TrapDoorBlock.java
|
+++ b/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||||
@@ -133,31 +133,7 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
@@ -133,31 +133,7 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
||||||
@@ -37,7 +37,7 @@ index cfc8b668980e0cba74b3f0d42c4902eb6aa8b01e..da4a39e3e8bf9672614a04fae9834a54
|
|||||||
- }
|
- }
|
||||||
- if (open) {
|
- if (open) {
|
||||||
- // Paper end - break redstone on trapdoors early
|
- // Paper end - break redstone on trapdoors early
|
||||||
+ if (state.getValue(OPEN) != signal) {
|
+ if (state.getValue(OPEN) != signal) { // Lophine - revert Paper trapdoor redstone handling
|
||||||
state = state.setValue(OPEN, signal);
|
state = state.setValue(OPEN, signal);
|
||||||
this.playSound(null, level, pos, signal);
|
this.playSound(null, level, pos, signal);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -9,14 +9,15 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/ea91106ae57fc4cc1
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
|
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
index e1de10e1a0ec221a1109a03d86fddf47b1c06a5f..d8cba057be61005d75b8c66910096aec148e2e2a 100644
|
index e1de10e1a0ec221a1109a03d86fddf47b1c06a5f..71cc37515c268abd698896d514b66cb49859691c 100644
|
||||||
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
|
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
|
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
@@ -392,7 +392,16 @@ public class ServerPlayerGameMode {
|
@@ -392,7 +392,18 @@ public class ServerPlayerGameMode {
|
||||||
this.level.getCurrentWorldData().captureDrops = new java.util.ArrayList<>(); // Folia - region threading
|
this.level.getCurrentWorldData().captureDrops = new java.util.ArrayList<>(); // Folia - region threading
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
BlockState adjustedState = block.playerWillDestroy(this.level, pos, state, this.player);
|
BlockState adjustedState = block.playerWillDestroy(this.level, pos, state, this.player);
|
||||||
- boolean changed = this.level.removeBlock(pos, false);
|
- boolean changed = this.level.removeBlock(pos, false);
|
||||||
|
+ // Lophine start - preserve drops before update suppression
|
||||||
+ boolean changed;
|
+ boolean changed;
|
||||||
+ org.leavesmc.leaves.util.UpdateSuppressionException updateSuppressionException = null;
|
+ org.leavesmc.leaves.util.UpdateSuppressionException updateSuppressionException = null;
|
||||||
+ try {
|
+ try {
|
||||||
@@ -27,16 +28,19 @@ index e1de10e1a0ec221a1109a03d86fddf47b1c06a5f..d8cba057be61005d75b8c66910096aec
|
|||||||
+ updateSuppressionException.providePlayer(this.player);
|
+ updateSuppressionException.providePlayer(this.player);
|
||||||
+ changed = false;
|
+ changed = false;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - preserve drops before update suppression
|
||||||
if (SharedConstants.DEBUG_BLOCK_BREAK) {
|
if (SharedConstants.DEBUG_BLOCK_BREAK) {
|
||||||
LOGGER.info("server broke {} {} -> {}", pos, adjustedState, this.level.getBlockState(pos));
|
LOGGER.info("server broke {} {} -> {}", pos, adjustedState, this.level.getBlockState(pos));
|
||||||
}
|
}
|
||||||
@@ -424,6 +433,9 @@ public class ServerPlayerGameMode {
|
@@ -424,6 +435,11 @@ public class ServerPlayerGameMode {
|
||||||
if (event.isDropItems()) {
|
if (event.isDropItems()) {
|
||||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, bState, this.player, itemsToDrop); // Paper - capture all item additions to the world
|
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, bState, this.player, itemsToDrop); // Paper - capture all item additions to the world
|
||||||
}
|
}
|
||||||
|
+ // Lophine start - preserve drops before update suppression
|
||||||
+ if (updateSuppressionException != null) {
|
+ if (updateSuppressionException != null) {
|
||||||
+ throw updateSuppressionException;
|
+ throw updateSuppressionException;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Lophine end - preserve drops before update suppression
|
||||||
|
|
||||||
// Drop event experience
|
// Drop event experience
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
|||||||
+2
-2
@@ -34,10 +34,10 @@ index 07b84bd0144e133d13e8e033a8998f3cf674f746..9c016e7d93e4c44ddf2df520e5c57d92
|
|||||||
// CraftBukkit start - special case for handling block placement with water lilies, frog spawn and snow buckets
|
// CraftBukkit start - special case for handling block placement with water lilies, frog spawn and snow buckets
|
||||||
if (player != null && (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem)) {
|
if (player != null && (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem)) {
|
||||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 7760a711f4c49fc3499bf71fabb59ee8b4c85083..ef3508dc4c8b3a9c8a6c7ff520cf51a68d6a13d9 100644
|
index 241c43170b5020c1521f43d349813586ba1f69a5..316b8d45b0902b1bf01a77307e24fc9a47d1283b 100644
|
||||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -1015,12 +1015,6 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
@@ -1017,12 +1017,6 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||||
|
|
||||||
profiler.pop();
|
profiler.pop();
|
||||||
} catch (Throwable var5) {
|
} catch (Throwable var5) {
|
||||||
|
|||||||
+5
-5
@@ -522,10 +522,10 @@ index 6a3413ca875ce78f48cd8d3ce2cfe7798be1a19e..be572eff561ffdd961a9602eaa613676
|
|||||||
protected void affectNeighborsAfterRemoval(final BlockState state, final ServerLevel level, final BlockPos pos, final boolean movedByPiston) {
|
protected void affectNeighborsAfterRemoval(final BlockState state, final ServerLevel level, final BlockPos pos, final boolean movedByPiston) {
|
||||||
if (state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) {
|
if (state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) {
|
||||||
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
index 619f5e37919693fc5976aedefed3bb5428395439..ed190e16df7c6b80fd90561e7c2fdd53c745e54a 100644
|
index 30a7208a698a8bd3ba8a08ace6f23b206d90f6a3..7f5b77cd9cb78e693bbe1efd3d5fd7256d7700c5 100644
|
||||||
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
|
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||||
@@ -378,6 +378,28 @@ public class RedStoneWireBlock extends Block {
|
@@ -382,6 +382,28 @@ public class RedStoneWireBlock extends Block {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -622,7 +622,7 @@ index d7e5ec23c64b60c47ab6b54cbf282e88c3a4a045..037aa3592a963bbb142465d31040f60e
|
|||||||
protected void tick(final BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random) {
|
protected void tick(final BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random) {
|
||||||
if (state.getValue(SHRIEKING)) {
|
if (state.getValue(SHRIEKING)) {
|
||||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
index 8259f530ec50554906c254b60f1e964b52c02852..59ad645785bc99758f4bc124c56e39d87c4b75c2 100644
|
index 722ce78461b2303f99493c309345697cfc98fb99..45dc3e8484842265b26d387d518831ff23da4b5e 100644
|
||||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||||
@@ -150,6 +150,20 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
@@ -150,6 +150,20 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||||
@@ -797,10 +797,10 @@ index 0fbdf810c785c8a596d461e7651361fdedbb6217..ff1471f40b73582df68efbf2996a854c
|
|||||||
this.getBlock().affectNeighborsAfterRemoval(this.asState(), level, pos, movedByPiston);
|
this.getBlock().affectNeighborsAfterRemoval(this.asState(), level, pos, movedByPiston);
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index ef3508dc4c8b3a9c8a6c7ff520cf51a68d6a13d9..11f0f5e1b8ee9ce7e6833d46ccb557d896674431 100644
|
index 316b8d45b0902b1bf01a77307e24fc9a47d1283b..9b3775b0cbca782964e03935331d1bfdd1af140d 100644
|
||||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -423,22 +423,28 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
@@ -424,22 +424,28 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||||
boolean blockChanged = !oldState.is(newBlock);
|
boolean blockChanged = !oldState.is(newBlock);
|
||||||
boolean movedByPiston = (flags & Block.UPDATE_MOVE_BY_PISTON) != 0;
|
boolean movedByPiston = (flags & Block.UPDATE_MOVE_BY_PISTON) != 0;
|
||||||
boolean sideEffects = (flags & Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS) == 0;
|
boolean sideEffects = (flags & Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS) == 0;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -5,11 +5,11 @@ Subject: [PATCH] Carpet Features Compatible
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||||
index 8b05860d2787a40495f8a025bc0bc43789d6a6af..2ef6a7fb5a9c3452dfff70a67542e2ca2531c897 100644
|
index 4bd923b42d1c98ce7178e05f9324f46d99ffc933..55bd9581c8c4bd3b1b7ba75cc80c94cf7548638a 100644
|
||||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||||
@@ -340,7 +340,7 @@ public final class RegionizedServer {
|
@@ -340,7 +340,7 @@ public final class RegionizedServer {
|
||||||
final long tickStartNanos = System.nanoTime();
|
final long tickStartNanos = System.nanoTime(); // Lophine - Carpet features
|
||||||
++this.tickCount;
|
++this.tickCount;
|
||||||
// Luminol start - Add a config to enable tick command
|
// Luminol start - Add a config to enable tick command
|
||||||
- if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
- if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||||
@@ -17,7 +17,7 @@ index 8b05860d2787a40495f8a025bc0bc43789d6a6af..2ef6a7fb5a9c3452dfff70a67542e2ca
|
|||||||
MinecraftServer.getServer().tickRateManager().tick();
|
MinecraftServer.getServer().tickRateManager().tick();
|
||||||
}
|
}
|
||||||
// Luminol end - Add a config to enable tick command
|
// Luminol end - Add a config to enable tick command
|
||||||
@@ -529,7 +529,7 @@ public final class RegionizedServer {
|
@@ -531,7 +531,7 @@ public final class RegionizedServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||||
@@ -27,7 +27,7 @@ index 8b05860d2787a40495f8a025bc0bc43789d6a6af..2ef6a7fb5a9c3452dfff70a67542e2ca
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
index 6fe5107751fe448ab374bf57b1ef6859f481f17e..b8d01d95bc44bd70f2c85ca2b923d16dc705161f 100644
|
index a37f392146ccc0319cf56ee0058ae8782b598fe3..2223f0b38e8f628af64d1c916fb2310c4704a407 100644
|
||||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
@@ -576,7 +576,7 @@ public final class TickRegionScheduler {
|
@@ -576,7 +576,7 @@ public final class TickRegionScheduler {
|
||||||
@@ -40,10 +40,10 @@ index 6fe5107751fe448ab374bf57b1ef6859f481f17e..b8d01d95bc44bd70f2c85ca2b923d16d
|
|||||||
}
|
}
|
||||||
// Luminol end - Add a config to enable tick command
|
// Luminol end - Add a config to enable tick command
|
||||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||||
index bb5059a77741bf1d9e73bd8c7f0da6681ec63f67..270ee3c01ad0b351bee068a507b09a9d0041ae9c 100644
|
index 74ef76058e5a410d12f88aa09450e7d90f63b5e6..1761167da363cd074a26499caadeaeb916461706 100644
|
||||||
--- a/net/minecraft/commands/Commands.java
|
--- a/net/minecraft/commands/Commands.java
|
||||||
+++ b/net/minecraft/commands/Commands.java
|
+++ b/net/minecraft/commands/Commands.java
|
||||||
@@ -266,7 +266,7 @@ public class Commands {
|
@@ -268,7 +268,7 @@ public class Commands {
|
||||||
TellRawCommand.register(this.dispatcher, context);
|
TellRawCommand.register(this.dispatcher, context);
|
||||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||||
// Luminol start - Add a config to enable tick command
|
// Luminol start - Add a config to enable tick command
|
||||||
@@ -53,10 +53,10 @@ index bb5059a77741bf1d9e73bd8c7f0da6681ec63f67..270ee3c01ad0b351bee068a507b09a9d
|
|||||||
}
|
}
|
||||||
// Luminol end - Add a config to enable tick command
|
// Luminol end - Add a config to enable tick command
|
||||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 3e4d035890b24483aefe664efff92f23b7c537b7..7cb190b61661c31e6fd5c0a6fbec98f55ef94f12 100644
|
index be948a57431dcd4bb3b23a742e71957be58cee2d..d3b24d2f94b1edeb02a4bd4fb2271093c7597a09 100644
|
||||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -2186,7 +2186,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
@@ -2188,7 +2188,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||||
this.lastSentFood = -1;
|
this.lastSentFood = -1;
|
||||||
this.teleportSpectators(transition, oldLevel);
|
this.teleportSpectators(transition, oldLevel);
|
||||||
// Leaves start - bot support
|
// Leaves start - bot support
|
||||||
@@ -97,7 +97,7 @@ index baa295f3dd8cf10bf7347ee4d1c249b1f82c9279..1d5376650d0f5eeb23fde8d7116b47cf
|
|||||||
}
|
}
|
||||||
// Leaves end - bot support
|
// Leaves end - bot support
|
||||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
index 3e4fae7a5ae7f8a26bf78727e81c4a87e8fed332..1340ef0ba7660a0e3c4cce105a90fcc4eadcf559 100644
|
index ac5b419169f8574f92ff7195bfa76c9978bc8a63..8066cdcaba8d2fcfa2e9ba3b040a2867dbbc6978 100644
|
||||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -240,7 +240,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -240,7 +240,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
@@ -118,7 +118,7 @@ index 3e4fae7a5ae7f8a26bf78727e81c4a87e8fed332..1340ef0ba7660a0e3c4cce105a90fcc4
|
|||||||
entity.setCooldown(0);
|
entity.setCooldown(0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -664,7 +664,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -668,7 +668,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean addItem(final Container container, final ItemEntity entity) {
|
public static boolean addItem(final Container container, final ItemEntity entity) {
|
||||||
@@ -128,7 +128,7 @@ index 3e4fae7a5ae7f8a26bf78727e81c4a87e8fed332..1340ef0ba7660a0e3c4cce105a90fcc4
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (org.bukkit.event.inventory.InventoryPickupItemEvent.getHandlerList().getRegisteredListeners().length > 0) { // Paper - optimize hoppers
|
if (org.bukkit.event.inventory.InventoryPickupItemEvent.getHandlerList().getRegisteredListeners().length > 0) { // Paper - optimize hoppers
|
||||||
diff --git a/net/minecraft/world/level/dimension/end/EnderDragonFight.java b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
diff --git a/net/minecraft/world/level/dimension/end/EnderDragonFight.java b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||||
index 5ca008b3dca83c00f2ae86a608d726972a8d9f9d..4274f22710035b547f5aca617c80c5c99f3a4dc8 100644
|
index 5ca008b3dca83c00f2ae86a608d726972a8d9f9d..125d5f59bdfdee5aa4bae2aa4756db363ee17f4b 100644
|
||||||
--- a/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
--- a/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||||
+++ b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
+++ b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||||
@@ -323,7 +323,7 @@ public class EnderDragonFight extends SavedData {
|
@@ -323,7 +323,7 @@ public class EnderDragonFight extends SavedData {
|
||||||
@@ -136,7 +136,7 @@ index 5ca008b3dca83c00f2ae86a608d726972a8d9f9d..4274f22710035b547f5aca617c80c5c9
|
|||||||
|
|
||||||
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
||||||
- if (me.earthme.luminol.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
- if (me.earthme.luminol.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
||||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.optimizedDragonRespawn) {
|
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.optimizedDragonRespawn) { // Lophine - Carpet Features Compatible
|
||||||
int i, j;
|
int i, j;
|
||||||
for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
||||||
for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ index a5f2e4454258886536251288c3694f58386c7420..28371ecf31d5fc280aaa03ed9a86f5b5
|
|||||||
private static final String USER_AGENT = BUILD_INFO.brandName() + "/" + BUILD_INFO.asString(VERSION_SIMPLE) + " (https://papermc.io)";
|
private static final String USER_AGENT = BUILD_INFO.brandName() + "/" + BUILD_INFO.asString(VERSION_SIMPLE) + " (https://papermc.io)";
|
||||||
private static final Gson GSON = new Gson();
|
private static final Gson GSON = new Gson();
|
||||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||||
index 4ada790812957657d580cb748077c4961987d0cb..3a539df860305e777e85ed6dc72b5effe76734b4 100644
|
index 4ada790812957657d580cb748077c4961987d0cb..ddf3ad20e7ce967d9e096345f99c55abf066c3b3 100644
|
||||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||||
@@ -31,7 +31,7 @@ public record ServerBuildInfoImpl(
|
@@ -31,7 +31,7 @@ public record ServerBuildInfoImpl(
|
||||||
@@ -58,7 +58,7 @@ index 4ada790812957657d580cb748077c4961987d0cb..3a539df860305e777e85ed6dc72b5eff
|
|||||||
|
|
||||||
private static final String BRAND_PAPER_NAME = "Paper";
|
private static final String BRAND_PAPER_NAME = "Paper";
|
||||||
- private static final String BRAND_LUMINOL_NAME = "Luminol";
|
- private static final String BRAND_LUMINOL_NAME = "Luminol";
|
||||||
+ private static final String BRAND_LOPHINE_NAME = "Lophine";
|
+ private static final String BRAND_LOPHINE_NAME = "Lophine"; // Lophine - Rebrand to Lophine
|
||||||
|
|
||||||
private static final String BUILD_DEV = "DEV";
|
private static final String BUILD_DEV = "DEV";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user