Update upstream(Luminol) & rename config names

This commit is contained in:
Helvetica Volubi
2025-08-27 00:22:16 +08:00
parent fc50c2ac44
commit b830c66be7
43 changed files with 151 additions and 122 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ mcVersion=1.21.8
release=2 release=2
# 0 for skip release, 1 for pre-release, 2 for release # 0 for skip release, 1 for pre-release, 2 for release
luminolRef=50f7c765e4dbd4abc6eac48fe3d5eaba372bfe98 luminolRef=122e2025c83d4ff734f9c1923fa902191a400b84
org.gradle.configuration-cache=true org.gradle.configuration-cache=true
org.gradle.caching=true org.gradle.caching=true
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand to Lophine
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 136b9e9c3bcb43698c653060665dc82444e09768..cc2b7b8f897570e5d079f80375c93cf2550df6af 100644 index 4be82092886728b7862b6e8951cf1c8ab917ca55..1b822e9576573c360b997e5cb4fa02278c88b74f 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
@@ -21,6 +21,7 @@ public class ConfigManager { @@ -21,6 +21,7 @@ public class ConfigManager {
@@ -17,10 +17,10 @@ index 136b9e9c3bcb43698c653060665dc82444e09768..cc2b7b8f897570e5d079f80375c93cf2
} }
diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java
index 997bc00dffbf5c15fde610c95527e8013ae57660..d94e11eb9f10c9622052c7b327ccfdf24de6ae73 100644 index f164e41975adee8b68dbcb400007681c0b66a4f8..4e76fb3b1274f2fde734089b20458f6561c39700 100644
--- a/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java --- a/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java +++ b/src/main/java/me/earthme/luminol/config/modules/misc/ServerModNameConfig.java
@@ -8,7 +8,7 @@ import me.earthme.luminol.config.flags.ConfigInfo; @@ -8,7 +8,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "server_mod_name") @ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "server_mod_name")
public class ServerModNameConfig implements IConfigModule { public class ServerModNameConfig implements IConfigModule {
@ConfigInfo(baseName = "name") @ConfigInfo(baseName = "name")
@@ -1,30 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun> From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Mon, 28 Jul 2025 23:02:47 +0800 Date: Tue, 26 Aug 2025 22:08:54 +0800
Subject: [PATCH] Transformed Configs Subject: [PATCH] Transformed Configs
diff --git a/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockExecutionConfig.java b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockExecutionConfig.java diff --git a/src/main/java/me/earthme/luminol/config/modules/experiment/CommandConfig.java b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandConfig.java
index 83d803d7d7f3cecdbcb593da70234aa9dd81a1ff..00ad1597bdb20118d756d9371c0d50890d0a5e8c 100644 index 4e906e8e0ebd57b9f7000e4194280e3e3636e52c..14eefd162c9facd54a53718a7a0b1b0266e1ada8 100644
--- a/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockExecutionConfig.java --- a/src/main/java/me/earthme/luminol/config/modules/experiment/CommandConfig.java
+++ b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandBlockExecutionConfig.java +++ b/src/main/java/me/earthme/luminol/config/modules/experiment/CommandConfig.java
@@ -7,6 +7,7 @@ import me.earthme.luminol.config.flags.ConfigInfo; @@ -11,6 +11,7 @@ public class CommandConfig implements IConfigModule {
@TransformedConfig(name = "enable", category = {"experiment", "force_the_data_command_to_be_enabled"})
@ConfigInfo(baseName = "enable_data_command")
public static boolean data = false;
+ @TransformedConfig(name = "command_block_enabled", category = {"experiment", "command"}, originInstance = "lophine")
@TransformedConfig(name = "enabled", category = {"experiment", "force_enable_command_block_command_execution"})
@ConfigInfo(baseName = "enable_command_block")
public static boolean commandBlock = false;
diff --git a/src/main/java/me/earthme/luminol/config/modules/optimizations/PaperPacketLimiterConfig.java b/src/main/java/me/earthme/luminol/config/modules/optimizations/PaperPacketLimiterConfig.java
index 192a67360db810934d02a15c955af3579e6f6b20..fbafc5a8aa2581301e62e12adb22169ab7fd8e19 100644
--- a/src/main/java/me/earthme/luminol/config/modules/optimizations/PaperPacketLimiterConfig.java
+++ b/src/main/java/me/earthme/luminol/config/modules/optimizations/PaperPacketLimiterConfig.java
@@ -8,6 +8,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "force_enable_command_block_command_execution") @ConfigClassInfo(configAttribution = EnumConfigCategory.OPTIMIZATIONS, mainName = "force_disable_packet_limiter_of_paper")
public class CommandBlockExecutionConfig implements IConfigModule {
+ @me.earthme.luminol.config.flags.TransformedConfig(name = "command_block_enabled", category = {"experiment", "command"}, originInstance = "lophine")
@ConfigInfo(baseName = "enabled")
public static boolean enabled = false;
}
diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/PaperPacketLimiterConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/PaperPacketLimiterConfig.java
index 385612dd2e3bd2b4651ccfda41986ff7047067e4..4450ba56a491c15aea6ea9e1fed0e379660fbec5 100644
--- a/src/main/java/me/earthme/luminol/config/modules/misc/PaperPacketLimiterConfig.java
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/PaperPacketLimiterConfig.java
@@ -7,6 +7,7 @@ import me.earthme.luminol.config.flags.ConfigInfo;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "force_disable_packet_limiter_of_paper")
public class PaperPacketLimiterConfig implements IConfigModule { public class PaperPacketLimiterConfig implements IConfigModule {
+ @me.earthme.luminol.config.flags.TransformedConfig(name = "unlimit-packet", category = {"misc", "network"}, originInstance = "lophine") + @TransformedConfig(name = "unlimit-packet", category = {"misc", "network"}, originInstance = "lophine")
@TransformedConfig(name = "force_disable", category = {"misc", "force_disable_packet_limiter_of_paper"})
@ConfigInfo(baseName = "force_disable") @ConfigInfo(baseName = "force_disable")
public static boolean forceDisable = false; public static boolean forceDisable = false;
}
@@ -8,14 +8,14 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/d93e9766d3797d130
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/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java b/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java diff --git a/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java b/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java
index 102de78be0eb82d6898b4104fad1bf5e8366f993..11891a66fe3232287238ea87289444586fbc9717 100644 index 102de78be0eb82d6898b4104fad1bf5e8366f993..0f8c9d4932c8bbd619f21d4aa28b890e14439b46 100644
--- a/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java --- a/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java
+++ b/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java +++ b/src/main/java/org/leavesmc/leaves/util/ItemOverstackUtils.java
@@ -17,12 +17,173 @@ @@ -17,12 +17,173 @@
package org.leavesmc.leaves.util; package org.leavesmc.leaves.util;
+import fun.bm.lophine.config.modules.misc.ContainerExpansionConfig; +import fun.bm.lophine.config.modules.function.ContainerExpansionConfig;
+import net.minecraft.core.component.DataComponents; +import net.minecraft.core.component.DataComponents;
+import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.CompoundTag;
+import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.item.ItemEntity;
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to allow infinite trade
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
index 79242037e868a140513f032e74e8594c0c6ff41c..8570c5089b605125680f8558ae201550df2d0a47 100644 index 79242037e868a140513f032e74e8594c0c6ff41c..050e89c3e95c7c3ef7ad98f8ef03ab206241a7e2 100644
--- a/net/minecraft/world/entity/npc/Villager.java --- a/net/minecraft/world/entity/npc/Villager.java
+++ b/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java
@@ -490,8 +490,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -490,8 +490,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -16,7 +16,7 @@ index 79242037e868a140513f032e74e8594c0c6ff41c..8570c5089b605125680f8558ae201550
+ // Lophine start - infinite trade + // Lophine start - infinite trade
+ MerchantOffers offers = this.getOffers().copy(); + MerchantOffers offers = this.getOffers().copy();
Player tradingPlayer = this.getTradingPlayer(); Player tradingPlayer = this.getTradingPlayer();
+ if (fun.bm.lophine.config.modules.misc.VillagerConfig.villagerInfiniteTrade) { + if (fun.bm.lophine.config.modules.function.VillagerConfig.villagerInfiniteTrade) {
+ for (MerchantOffer merchantOffer : offers) { + for (MerchantOffer merchantOffer : offers) {
+ merchantOffer.maxUses = 524288; + merchantOffer.maxUses = 524288;
+ } + }
@@ -26,7 +26,7 @@ index 79242037e868a140513f032e74e8594c0c6ff41c..8570c5089b605125680f8558ae201550
tradingPlayer.sendMerchantOffers( tradingPlayer.sendMerchantOffers(
tradingPlayer.containerMenu.containerId, tradingPlayer.containerMenu.containerId,
diff --git a/net/minecraft/world/item/trading/Merchant.java b/net/minecraft/world/item/trading/Merchant.java diff --git a/net/minecraft/world/item/trading/Merchant.java b/net/minecraft/world/item/trading/Merchant.java
index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..28d743cc7beeb92a33683b8eea84096f94d90fb2 100644 index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..0c7318a0ed214204f5493576c8a7b02fbe51c00b 100644
--- a/net/minecraft/world/item/trading/Merchant.java --- a/net/minecraft/world/item/trading/Merchant.java
+++ b/net/minecraft/world/item/trading/Merchant.java +++ b/net/minecraft/world/item/trading/Merchant.java
@@ -42,7 +42,14 @@ public interface Merchant { @@ -42,7 +42,14 @@ public interface Merchant {
@@ -36,7 +36,7 @@ index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..28d743cc7beeb92a33683b8eea84096f
- MerchantOffers offers = this.getOffers(); - MerchantOffers offers = this.getOffers();
+ // Lophine start - infinite trade + // Lophine start - infinite trade
+ MerchantOffers offers = this.getOffers().copy(); + MerchantOffers offers = this.getOffers().copy();
+ if (fun.bm.lophine.config.modules.misc.VillagerConfig.villagerInfiniteTrade) { + if (fun.bm.lophine.config.modules.function.VillagerConfig.villagerInfiniteTrade) {
+ for (MerchantOffer merchantOffer : offers) { + for (MerchantOffer merchantOffer : offers) {
+ merchantOffer.maxUses = 5242884; + merchantOffer.maxUses = 5242884;
+ } + }
@@ -46,7 +46,7 @@ index 6e2fa442ddcd4ef3c4fe789b9ebac9dd409c9de7..28d743cc7beeb92a33683b8eea84096f
player.sendMerchantOffers(optionalInt.getAsInt(), offers, level, this.getVillagerXp(), this.showProgressBar(), this.canRestock()); player.sendMerchantOffers(optionalInt.getAsInt(), offers, level, this.getVillagerXp(), this.showProgressBar(), this.canRestock());
} }
diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java
index 64c99df8ff305fa28c75dc03fc5ef8c61634ad84..21ec77d5167cfdf05043ea474165148fb2b0c2d9 100644 index 64c99df8ff305fa28c75dc03fc5ef8c61634ad84..770f37d7158c7b4cec62783025f623a68c1f2457 100644
--- a/net/minecraft/world/item/trading/MerchantOffer.java --- a/net/minecraft/world/item/trading/MerchantOffer.java
+++ b/net/minecraft/world/item/trading/MerchantOffer.java +++ b/net/minecraft/world/item/trading/MerchantOffer.java
@@ -196,7 +196,7 @@ public class MerchantOffer { @@ -196,7 +196,7 @@ public class MerchantOffer {
@@ -54,7 +54,7 @@ index 64c99df8ff305fa28c75dc03fc5ef8c61634ad84..21ec77d5167cfdf05043ea474165148f
public boolean isOutOfStock() { public boolean isOutOfStock() {
- return this.uses >= this.maxUses; - return this.uses >= this.maxUses;
+ return (this.uses >= this.maxUses && !fun.bm.lophine.config.modules.misc.VillagerConfig.villagerInfiniteTrade); // Lophine - infinite trade + return (this.uses >= this.maxUses && !fun.bm.lophine.config.modules.function.VillagerConfig.villagerInfiniteTrade); // Lophine - infinite trade
} }
public void setToOutOfStock() { public void setToOutOfStock() {
@@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun> From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Tue, 26 Aug 2025 02:55:23 +0800 Date: Tue, 26 Aug 2025 02:55:23 +0800
Subject: [PATCH] Add config to allow to generate end void rings Subject: [PATCH] Add config to allow generation of end void rings
diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java
index 04527a5c65ad630f794fed9071d485aedd02257a..ed4408e6a98b12b91382d23fdfeeb69c6926d038 100644 index 04527a5c65ad630f794fed9071d485aedd02257a..b63661b313c04e2bd8981920972339470148a847 100644
--- a/net/minecraft/world/level/levelgen/DensityFunctions.java --- a/net/minecraft/world/level/levelgen/DensityFunctions.java
+++ b/net/minecraft/world/level/levelgen/DensityFunctions.java +++ b/net/minecraft/world/level/levelgen/DensityFunctions.java
@@ -528,7 +528,7 @@ public final class DensityFunctions { @@ -528,7 +528,7 @@ public final class DensityFunctions {
@@ -13,7 +13,7 @@ index 04527a5c65ad630f794fed9071d485aedd02257a..ed4408e6a98b12b91382d23fdfeeb69c
int i2 = x % 2; int i2 = x % 2;
int i3 = z % 2; int i3 = z % 2;
- float f = 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow - float f = 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow
+ float f = fun.bm.lophine.config.modules.gameplay.EndVoidRingsConfig.enabled ? 100.0F - Mth.sqrt(x * x + z * z) * 8.0F : 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow // Lophine - optimize end void rings generation + float f = fun.bm.lophine.config.modules.fixes.EndVoidRingsConfig.enabled ? 100.0F - Mth.sqrt(x * x + z * z) * 8.0F : 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow // Lophine - optimize end void rings generation
f = Mth.clamp(f, -100.0F, 80.0F); f = Mth.clamp(f, -100.0F, 80.0F);
NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation
@@ -5,11 +5,11 @@ Subject: [PATCH] Add config to enable datapack 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 8a90aa5c145f53afbb3f2371f97cb09974f30bbb..b6e10157c572dadb1bff18f8431166966eed46d9 100644 index e05f75b6bbd48d6fb7379926d68d5f8ed6014be9..af895859057ca303177ec3c8a07cf7534e62cca6 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
@@ -192,7 +192,9 @@ public class Commands { @@ -192,7 +192,9 @@ public class Commands {
if(me.earthme.luminol.config.modules.experiment.CommandDataConfig.enabled) { if(me.earthme.luminol.config.modules.experiment.CommandConfig.data) {
DataCommands.register(this.dispatcher); // Folia - region threading - TODO DataCommands.register(this.dispatcher); // Folia - region threading - TODO
} }
- //DataPackCommand.register(this.dispatcher, context); // Folia - region threading - TODO - //DataPackCommand.register(this.dispatcher, context); // Folia - region threading - TODO
@@ -18,7 +18,7 @@ index 6868b915bf3deb85783a638d4441a15fea6da2dc..70740381c6501c1a518c52b24381edd1
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 125412d16d1a66dadfe4bbf64629c4052e0c7647..ccb05b6e328a29eea4761721b496ab36ba362361 100644 index 8ec753fe9c84ffe1188f7e7ebb6895cf4bba9e39..ee4a459700d75676eae3422d4a0e10be73c45871 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
@@ -147,7 +147,7 @@ import net.minecraft.world.waypoints.WaypointTransmitter; @@ -147,7 +147,7 @@ import net.minecraft.world.waypoints.WaypointTransmitter;
@@ -44,7 +44,7 @@ index e1842ab8f20271a8b20ab8462b09a4745a612a9a..8405157ec35a443e238fa6866772c839
world.setDayTime(world.levelData.getDayTime() + (long)tickCount); world.setDayTime(world.levelData.getDayTime() + (long)tickCount);
} }
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 0357792de0ed8ec9058d1847c8b45c33ff365af6..4945c11f573a53df2f5be4beb7af6a3f4d32f7d4 100644 index c485d5b3ba95f2a969bdf0dab9654ac284976f8d..b957585cf7cf7f845e20f59c7b355722880f3b4e 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
@@ -31,8 +31,8 @@ public final class TickRegionScheduler { @@ -31,8 +31,8 @@ public final class TickRegionScheduler {
@@ -97,7 +97,7 @@ index 0357792de0ed8ec9058d1847c8b45c33ff365af6..4945c11f573a53df2f5be4beb7af6a3f
this.scheduler.regionFailed(this, false, thr); this.scheduler.regionFailed(this, false, thr);
// regionFailed will schedule a shutdown, so we should avoid letting this region tick further // regionFailed will schedule a shutdown, so we should avoid letting this region tick further
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 b6e10157c572dadb1bff18f8431166966eed46d9..e2fc15d84fafde6847ecead23c55169449275e1b 100644 index af895859057ca303177ec3c8a07cf7534e62cca6..94a3cea5d42b1f98bbde22ef514f8f7dbd64ba58 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
@@ -245,7 +245,11 @@ public class Commands { @@ -245,7 +245,11 @@ public class Commands {
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable unsafe waypoint bar
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 e2fc15d84fafde6847ecead23c55169449275e1b..b0a06cdfaa49237f372ecd131d47289160476b07 100644 index 94a3cea5d42b1f98bbde22ef514f8f7dbd64ba58..e311977fca4d0ba6e3efd4a41b2732cf5e7b4b9c 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
@@ -253,7 +253,11 @@ public class Commands { @@ -253,7 +253,11 @@ public class Commands {
@@ -28,7 +28,7 @@ index 643797124fe5a4489d0b7419b7e600c04f283ef2..04b4100da96aad50f08e8c59200eec93
public String serialize(HolderLookup.Provider levelRegistry) { public String serialize(HolderLookup.Provider levelRegistry) {
diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java
index f7002d6752aa03603eb06e298ba1d7130cf13826..72c87f7c0392d087440db9d267a608598f6feb6d 100644 index 7ef109cb9921c25987905149616eddbd0b2f9b9c..70fc9d6c5b226211ff5964464c37e11695d5f745 100644
--- a/net/minecraft/server/commands/GiveCommand.java --- a/net/minecraft/server/commands/GiveCommand.java
+++ b/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java
@@ -55,7 +55,7 @@ public class GiveCommand { @@ -55,7 +55,7 @@ public class GiveCommand {
@@ -41,7 +41,7 @@ index f7002d6752aa03603eb06e298ba1d7130cf13826..72c87f7c0392d087440db9d267a60859
if (count > i) { if (count > i) {
source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", i, itemStack.getDisplayName())); source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", i, itemStack.getDisplayName()));
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d74a05822c6c145971dc526a62d652d35b4f5d9d..d63d8f7523938088bf9efc1c1b8ad9f0583338bb 100644 index 74ec003486f9362d2bafbad8392b9bbdf0c15882..f06b9d8ad9512d35f3f460eb77c869690321c67f 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3079,7 +3079,7 @@ public class ServerGamePacketListenerImpl @@ -3079,7 +3079,7 @@ public class ServerGamePacketListenerImpl
@@ -229,7 +229,7 @@ index 02d2efef2dc0f0e12eac0c71fa290af706f7694d..99f109e2653eff10c011f380694bd77a
default SlotAccess getChestVehicleSlot(final int index) { default SlotAccess getChestVehicleSlot(final int index) {
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d96c1f4fa9 100644 index 2d6acceffb2cb7e55dd504018a70b05afccd9c11..bdc0ca1f625dc264bef6e5722ec66121ba48625a 100644
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -295,6 +295,13 @@ public abstract class AbstractContainerMenu { @@ -295,6 +295,13 @@ public abstract class AbstractContainerMenu {
@@ -273,7 +273,7 @@ index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d9
} }
} else if (clickType == ClickType.THROW && this.getCarried().isEmpty() && slotId >= 0) { } else if (clickType == ClickType.THROW && this.getCarried().isEmpty() && slotId >= 0) {
Slot slot2 = this.slots.get(slotId); Slot slot2 = this.slots.get(slotId);
@@ -656,15 +663,15 @@ public abstract class AbstractContainerMenu { @@ -660,15 +667,15 @@ public abstract class AbstractContainerMenu {
int maxStackSize = button == 0 ? 1 : -1; int maxStackSize = button == 0 ? 1 : -1;
for (int i3 = 0; i3 < 2; i3++) { for (int i3 = 0; i3 < 2; i3++) {
@@ -292,7 +292,7 @@ index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d9
itemStack.grow(itemStack1.getCount()); itemStack.grow(itemStack1.getCount());
} }
} }
@@ -766,7 +773,7 @@ public abstract class AbstractContainerMenu { @@ -770,7 +777,7 @@ public abstract class AbstractContainerMenu {
i = endIndex - 1; i = endIndex - 1;
} }
@@ -301,7 +301,7 @@ index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d9
while (!stack.isEmpty() && (reverseDirection ? i >= startIndex : i < endIndex)) { while (!stack.isEmpty() && (reverseDirection ? i >= startIndex : i < endIndex)) {
Slot slot = this.slots.get(i); Slot slot = this.slots.get(i);
ItemStack item = slot.getItem(); ItemStack item = slot.getItem();
@@ -867,7 +874,7 @@ public abstract class AbstractContainerMenu { @@ -871,7 +878,7 @@ public abstract class AbstractContainerMenu {
public static boolean canItemQuickReplace(@Nullable Slot slot, ItemStack stack, boolean stackSizeMatters) { public static boolean canItemQuickReplace(@Nullable Slot slot, ItemStack stack, boolean stackSizeMatters) {
boolean flag = slot == null || !slot.hasItem(); boolean flag = slot == null || !slot.hasItem();
return !flag && ItemStack.isSameItemSameComponents(stack, slot.getItem()) return !flag && ItemStack.isSameItemSameComponents(stack, slot.getItem())
@@ -310,7 +310,7 @@ index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d9
: flag; : flag;
} }
@@ -875,7 +882,7 @@ public abstract class AbstractContainerMenu { @@ -879,7 +886,7 @@ public abstract class AbstractContainerMenu {
return switch (type) { return switch (type) {
case 0 -> Mth.floor((float)stack.getCount() / slots.size()); case 0 -> Mth.floor((float)stack.getCount() / slots.size());
case 1 -> 1; case 1 -> 1;
@@ -319,7 +319,7 @@ index fcb2e0a722ed94acf08da06f06b20f42652896bc..9489a50df2de3d641235153c5a0217d9
default -> stack.getCount(); default -> stack.getCount();
}; };
} }
@@ -898,7 +905,7 @@ public abstract class AbstractContainerMenu { @@ -902,7 +909,7 @@ public abstract class AbstractContainerMenu {
for (int i = 0; i < container.getContainerSize(); i++) { for (int i = 0; i < container.getContainerSize(); i++) {
ItemStack item = container.getItem(i); ItemStack item = container.getItem(i);
if (!item.isEmpty()) { if (!item.isEmpty()) {
@@ -446,7 +446,7 @@ index 10b2cc20bbf3b70e4e09dbbe14b90506e6366158..1535bb8cec8692e8d26eaff090288f1b
} }
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 b78d23ab22a74db2e16707424ed14f5760edf5b4..486181bf59f0863a7b60749a0b75b5ac79e2e470 100644 index b939c04e954e873cbf60fbe104a3b1ec963d1534..11519e11ffc8268ecd059bb8077600be8537a8e0 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
@@ -145,7 +145,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -145,7 +145,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -458,7 +458,7 @@ index b78d23ab22a74db2e16707424ed14f5760edf5b4..486181bf59f0863a7b60749a0b75b5ac
} }
@Override @Override
@@ -742,9 +742,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -743,9 +743,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (item.isEmpty()) { if (item.isEmpty()) {
// Spigot start - SPIGOT-6693, SimpleContainer#setItem // Spigot start - SPIGOT-6693, SimpleContainer#setItem
ItemStack leftover = ItemStack.EMPTY; // Paper - Make hoppers respect inventory max stack size ItemStack leftover = ItemStack.EMPTY; // Paper - Make hoppers respect inventory max stack size
@@ -8,14 +8,14 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/3e96b237749a960f2
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/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
index b3e897a4afee742b5055d652ad7047a660d8ea04..cf8869fac003c73024634078b2f7b36cddda640e 100644 index b3e897a4afee742b5055d652ad7047a660d8ea04..33471f3d0e2cbd54eaf095c19555f8fdaeb55878 100644
--- a/net/minecraft/world/level/ServerExplosion.java --- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java
@@ -729,6 +729,7 @@ public class ServerExplosion implements Explosion { @@ -729,6 +729,7 @@ public class ServerExplosion implements Explosion {
public boolean shouldAffectBlocklikeEntities() { public boolean shouldAffectBlocklikeEntities() {
boolean _boolean = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); boolean _boolean = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
boolean flag = this.source == null || this.source.getType() != EntityType.BREEZE_WIND_CHARGE && this.source.getType() != EntityType.WIND_CHARGE; boolean flag = this.source == null || this.source.getType() != EntityType.BREEZE_WIND_CHARGE && this.source.getType() != EntityType.WIND_CHARGE;
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldExplosionDamageCalculator) flag = flag && (this.source == null || !this.source.isInWater()); // Leaves - Old MC TNT wet explosion no item damage + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldExplosionDamageCalculator) flag = flag && (this.source == null || !this.source.isInWater()); // Leaves - Old MC TNT wet explosion no item damage
return _boolean ? flag : this.blockInteraction.shouldAffectBlocklikeEntities() && flag; return _boolean ? flag : this.blockInteraction.shouldAffectBlocklikeEntities() && flag;
} }
@@ -8,7 +8,7 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/79d9ef74c2684eb49
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/effect/BadOmenMobEffect.java b/net/minecraft/world/effect/BadOmenMobEffect.java diff --git a/net/minecraft/world/effect/BadOmenMobEffect.java b/net/minecraft/world/effect/BadOmenMobEffect.java
index 80f17f33f670018240c854df589cf90cdeab6e70..cbfb4ae2dc30c2ee98ef37f44a95434a7968e320 100644 index 80f17f33f670018240c854df589cf90cdeab6e70..c9af615ff9120c07787f436dbb6024e54e3a498b 100644
--- a/net/minecraft/world/effect/BadOmenMobEffect.java --- a/net/minecraft/world/effect/BadOmenMobEffect.java
+++ b/net/minecraft/world/effect/BadOmenMobEffect.java +++ b/net/minecraft/world/effect/BadOmenMobEffect.java
@@ -22,6 +22,11 @@ class BadOmenMobEffect extends MobEffect { @@ -22,6 +22,11 @@ class BadOmenMobEffect extends MobEffect {
@@ -16,7 +16,7 @@ index 80f17f33f670018240c854df589cf90cdeab6e70..cbfb4ae2dc30c2ee98ef37f44a95434a
&& level.getDifficulty() != Difficulty.PEACEFUL && level.getDifficulty() != Difficulty.PEACEFUL
&& level.isVillage(serverPlayer.blockPosition())) { && level.isVillage(serverPlayer.blockPosition())) {
+ // Leaves start - Revert raid changes + // Leaves start - Revert raid changes
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior) { + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior) {
+ return level.getRaids().createOrExtendRaid(serverPlayer, serverPlayer.blockPosition()) == null; + return level.getRaids().createOrExtendRaid(serverPlayer, serverPlayer.blockPosition()) == null;
+ } + }
+ // Leaves end - Revert raid changes + // Leaves end - Revert raid changes
@@ -24,7 +24,7 @@ index 80f17f33f670018240c854df589cf90cdeab6e70..cbfb4ae2dc30c2ee98ef37f44a95434a
if (raidAt == null || raidAt.getRaidOmenLevel() < raidAt.getMaxRaidOmenLevel()) { if (raidAt == null || raidAt.getRaidOmenLevel() < raidAt.getMaxRaidOmenLevel()) {
serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier)); serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier));
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc51233b7074d4 100644 index 1910bff3f08147bfd63703097e30b9f88c84e337..f45aa44a7a17946aeb406a447f18de34320a4fa2 100644
--- a/net/minecraft/world/entity/raid/Raid.java --- a/net/minecraft/world/entity/raid/Raid.java
+++ b/net/minecraft/world/entity/raid/Raid.java +++ b/net/minecraft/world/entity/raid/Raid.java
@@ -263,7 +263,7 @@ public class Raid { @@ -263,7 +263,7 @@ public class Raid {
@@ -32,7 +32,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
public boolean absorbRaidOmen(ServerPlayer player) { public boolean absorbRaidOmen(ServerPlayer player) {
- MobEffectInstance effect = player.getEffect(MobEffects.RAID_OMEN); - MobEffectInstance effect = player.getEffect(MobEffects.RAID_OMEN);
+ MobEffectInstance effect = player.getEffect(fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior ? MobEffects.BAD_OMEN : MobEffects.RAID_OMEN); // Leaves - old Raid Behavior + MobEffectInstance effect = player.getEffect(fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior ? MobEffects.BAD_OMEN : MobEffects.RAID_OMEN); // Leaves - old Raid Behavior
if (effect == null) { if (effect == null) {
return false; return false;
} else { } else {
@@ -42,7 +42,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
if (flag1) { if (flag1) {
- this.waveSpawnPos = this.getValidSpawnPos(level); - this.waveSpawnPos = this.getValidSpawnPos(level);
+ // Leaves Start - old FindSpawnPosition + // Leaves Start - old FindSpawnPosition
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior) { + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior) {
+ this.waveSpawnPos = this.preCalcRavagerSpawnLocation(level, this.raidCooldownTicks < 100 ? 1 : 0); + this.waveSpawnPos = this.preCalcRavagerSpawnLocation(level, this.raidCooldownTicks < 100 ? 1 : 0);
+ } else { + } else {
+ this.waveSpawnPos = this.getValidSpawnPos(level); + this.waveSpawnPos = this.getValidSpawnPos(level);
@@ -58,7 +58,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
- BlockPos blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20)); - BlockPos blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20));
+ // Leaves Start - old FindSpawnPosition + // Leaves Start - old FindSpawnPosition
+ BlockPos blockPos; + BlockPos blockPos;
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior) { + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior) {
+ blockPos = this.getRavagerSpawnLocation(level, i, 20); + blockPos = this.getRavagerSpawnLocation(level, i, 20);
+ } else { + } else {
+ blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20)); + blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20));
@@ -72,7 +72,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
} }
- if (i > 5) { - if (i > 5) {
+ if (i > (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior ? 3 : 5)) { // Leaves - old FindSpawnPosition + if (i > (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior ? 3 : 5)) { // Leaves - old FindSpawnPosition
org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(level, this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(level, this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit
this.stop(); this.stop();
break; break;
@@ -81,7 +81,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f); int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3); int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
- if (Mth.abs(height - this.center.getY()) <= 96) { - if (Mth.abs(height - this.center.getY()) <= 96) {
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior || Mth.abs(height - this.center.getY()) <= 96) { // Leaves - skippable + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior || Mth.abs(height - this.center.getY()) <= 96) { // Leaves - skippable
mutableBlockPos.set(i2, height, i3); mutableBlockPos.set(i2, height, i3);
if (!level.isVillage(mutableBlockPos) || i <= 7) { if (!level.isVillage(mutableBlockPos) || i <= 7) {
int i4 = 10; int i4 = 10;
@@ -167,7 +167,7 @@ index 1910bff3f08147bfd63703097e30b9f88c84e337..5188ae86aff3051d45fe5e7d2fcc5123
+ // Leaves end - old FindSpawnPosition + // Leaves end - old FindSpawnPosition
} }
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
index 3e30989c99cd11c8c94d6fd194d2969e3a7efda6..b1f1bcf7f5ac002550077d5e1d4efd5c67d18063 100644 index 3e30989c99cd11c8c94d6fd194d2969e3a7efda6..2d163f3d5eb1af4d539d24c0256855bbec960de4 100644
--- a/net/minecraft/world/entity/raid/Raider.java --- a/net/minecraft/world/entity/raid/Raider.java
+++ b/net/minecraft/world/entity/raid/Raider.java +++ b/net/minecraft/world/entity/raid/Raider.java
@@ -128,6 +128,43 @@ public abstract class Raider extends PatrollingMonster { @@ -128,6 +128,43 @@ public abstract class Raider extends PatrollingMonster {
@@ -177,7 +177,7 @@ index 3e30989c99cd11c8c94d6fd194d2969e3a7efda6..b1f1bcf7f5ac002550077d5e1d4efd5c
+ +
+ // Leaves start - Revert raid changes + // Leaves start - Revert raid changes
+ if (this.level() instanceof ServerLevel) { + if (this.level() instanceof ServerLevel) {
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldRaidBehavior && !this.hasRaid()) { + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.oldRaidBehavior && !this.hasRaid()) {
+ ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD); + ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
+ net.minecraft.world.entity.player.Player entityhuman = null; + net.minecraft.world.entity.player.Player entityhuman = null;
+ if (entity instanceof net.minecraft.world.entity.player.Player player) { + if (entity instanceof net.minecraft.world.entity.player.Player player) {
@@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE) Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE)
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index 593dbcda4b497291eb1ecdc64b947a8d279f8be6..661f797b39853104b16d75ca7ba0eda156a74af3 100644 index 593dbcda4b497291eb1ecdc64b947a8d279f8be6..cb863a36fc67e993956ec3be655e6e4b9764c051 100644
--- a/net/minecraft/server/players/PlayerList.java --- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java
@@ -1087,6 +1087,10 @@ public abstract class PlayerList { @@ -1087,6 +1087,10 @@ public abstract class PlayerList {
@@ -17,7 +17,7 @@ index 593dbcda4b497291eb1ecdc64b947a8d279f8be6..661f797b39853104b16d75ca7ba0eda1
} // Paper - Add sendOpLevel API } // Paper - Add sendOpLevel API
+ +
+ // Purpur start - Barrels and enderchests 6 rows + // Purpur start - Barrels and enderchests 6 rows
+ player.enderChestSlotCount = fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows < 7 && fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows > 0 ? 9 * fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows : 27; + player.enderChestSlotCount = fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows < 7 && fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows > 0 ? 9 * fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows : 27;
+ // Purpur end - Barrels and enderchests 6 rows + // Purpur end - Barrels and enderchests 6 rows
} }
@@ -70,7 +70,7 @@ index 0fffa384f928ab84451331380968fb4650eafe26..d84a10396395939149da88bcb01be59e
return new ChestMenu(MenuType.GENERIC_9x6, containerId, playerInventory, container, 6); return new ChestMenu(MenuType.GENERIC_9x6, containerId, playerInventory, container, 6);
} }
diff --git a/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/net/minecraft/world/inventory/PlayerEnderChestContainer.java diff --git a/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/net/minecraft/world/inventory/PlayerEnderChestContainer.java
index 51148b7b95c93a9e25da70ac9275c63f1458d84c..b6bceae1ec26685af485bfe9d846f7584d5012cd 100644 index 51148b7b95c93a9e25da70ac9275c63f1458d84c..dba8acfcacfe9a7b7e0fb9943fba49468214616e 100644
--- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java --- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java
+++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java +++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java
@@ -26,11 +26,18 @@ public class PlayerEnderChestContainer extends SimpleContainer { @@ -26,11 +26,18 @@ public class PlayerEnderChestContainer extends SimpleContainer {
@@ -78,7 +78,7 @@ index 51148b7b95c93a9e25da70ac9275c63f1458d84c..b6bceae1ec26685af485bfe9d846f758
public PlayerEnderChestContainer(Player owner) { public PlayerEnderChestContainer(Player owner) {
- super(27); - super(27);
+ super(fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows < 7 && fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows > 0 ? 9 * fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows : 27); + super(fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows < 7 && fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows > 0 ? 9 * fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows : 27);
this.owner = owner; this.owner = owner;
// CraftBukkit end // CraftBukkit end
} }
@@ -94,7 +94,7 @@ index 51148b7b95c93a9e25da70ac9275c63f1458d84c..b6bceae1ec26685af485bfe9d846f758
this.activeChest = enderChestBlockEntity; this.activeChest = enderChestBlockEntity;
} }
diff --git a/net/minecraft/world/level/block/EnderChestBlock.java b/net/minecraft/world/level/block/EnderChestBlock.java diff --git a/net/minecraft/world/level/block/EnderChestBlock.java b/net/minecraft/world/level/block/EnderChestBlock.java
index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..fe374f08b7829b846b2a1c2ac3ca500ca3e48684 100644 index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..cef29289b7bc7fdf9613c0cd52f2bf4f715f288d 100644
--- a/net/minecraft/world/level/block/EnderChestBlock.java --- a/net/minecraft/world/level/block/EnderChestBlock.java
+++ b/net/minecraft/world/level/block/EnderChestBlock.java +++ b/net/minecraft/world/level/block/EnderChestBlock.java
@@ -85,8 +85,14 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i @@ -85,8 +85,14 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
@@ -103,7 +103,7 @@ index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..fe374f08b7829b846b2a1c2ac3ca500c
new SimpleMenuProvider( new SimpleMenuProvider(
- (containerId, playerInventory, player1) -> ChestMenu.threeRows(containerId, playerInventory, enderChestInventory), CONTAINER_TITLE - (containerId, playerInventory, player1) -> ChestMenu.threeRows(containerId, playerInventory, enderChestInventory), CONTAINER_TITLE
- ) - )
+ (containerId, playerInventory, player1) -> switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows) { + (containerId, playerInventory, player1) -> switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows) {
+ case 6 -> ChestMenu.sixRows(containerId, playerInventory, enderChestInventory); + case 6 -> ChestMenu.sixRows(containerId, playerInventory, enderChestInventory);
+ case 5 -> ChestMenu.fiveRows(containerId, playerInventory, enderChestInventory); + case 5 -> ChestMenu.fiveRows(containerId, playerInventory, enderChestInventory);
+ case 4 -> ChestMenu.fourRows(containerId, playerInventory, enderChestInventory); + case 4 -> ChestMenu.fourRows(containerId, playerInventory, enderChestInventory);
@@ -115,7 +115,7 @@ index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..fe374f08b7829b846b2a1c2ac3ca500c
// Paper end - Fix InventoryOpenEvent cancellation - moved up; // Paper end - Fix InventoryOpenEvent cancellation - moved up;
player.awardStat(Stats.OPEN_ENDERCHEST); player.awardStat(Stats.OPEN_ENDERCHEST);
diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
index de99652629c7301a4bc0e9ec48bed9a26a338f0d..4383e87560bb05acf9c50758f38a3cb69ee5c5c7 100644 index de99652629c7301a4bc0e9ec48bed9a26a338f0d..b43445d8313c330a0376aaa4eb872495ebd87b5f 100644
--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java --- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
@@ -56,7 +56,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity implemen @@ -56,7 +56,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -124,7 +124,7 @@ index de99652629c7301a4bc0e9ec48bed9a26a338f0d..4383e87560bb05acf9c50758f38a3cb6
- private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY); - private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY);
+ // Purpur start - Barrels and enderchests 6 rows + // Purpur start - Barrels and enderchests 6 rows
+ private NonNullList<ItemStack> items = NonNullList.withSize(switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.barrelRows) { + private NonNullList<ItemStack> items = NonNullList.withSize(switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.barrelRows) {
+ case 6 -> 54; + case 6 -> 54;
+ case 5 -> 45; + case 5 -> 45;
+ case 4 -> 36; + case 4 -> 36;
@@ -143,7 +143,7 @@ index de99652629c7301a4bc0e9ec48bed9a26a338f0d..4383e87560bb05acf9c50758f38a3cb6
public int getContainerSize() { public int getContainerSize() {
- return 27; - return 27;
+ // Purpur start - Barrels and enderchests 6 rows + // Purpur start - Barrels and enderchests 6 rows
+ return switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.barrelRows) { + return switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.barrelRows) {
+ case 6 -> 54; + case 6 -> 54;
+ case 5 -> 45; + case 5 -> 45;
+ case 4 -> 36; + case 4 -> 36;
@@ -161,7 +161,7 @@ index de99652629c7301a4bc0e9ec48bed9a26a338f0d..4383e87560bb05acf9c50758f38a3cb6
protected AbstractContainerMenu createMenu(int id, Inventory player) { protected AbstractContainerMenu createMenu(int id, Inventory player) {
- return ChestMenu.threeRows(id, player, this); - return ChestMenu.threeRows(id, player, this);
+ // Purpur start - Barrels and enderchests 6 rows + // Purpur start - Barrels and enderchests 6 rows
+ return switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.barrelRows) { + return switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.barrelRows) {
+ case 6 -> ChestMenu.sixRows(id, player, this); + case 6 -> ChestMenu.sixRows(id, player, this);
+ case 5 -> ChestMenu.fiveRows(id, player, this); + case 5 -> ChestMenu.fiveRows(id, player, this);
+ case 4 -> ChestMenu.fourRows(id, player, this); + case 4 -> ChestMenu.fourRows(id, player, this);
@@ -40,7 +40,7 @@ index 3f4b1c54f9207ba1854a8c8da965cbaca5ea517d..a8348a073682eec31990e9ab963b11ad
if (this.getType().is(EntityTypeTags.IMMUNE_TO_INFESTED)) { if (this.getType().is(EntityTypeTags.IMMUNE_TO_INFESTED)) {
return !effectInstance.is(MobEffects.INFESTED); return !effectInstance.is(MobEffects.INFESTED);
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
index b1f1bcf7f5ac002550077d5e1d4efd5c67d18063..6120f7b970ff05867524ee9f1433d46843d57483 100644 index 2d163f3d5eb1af4d539d24c0256855bbec960de4..2cc0a7b5f088c29d9343b369b6e71c8a3ebdef75 100644
--- a/net/minecraft/world/entity/raid/Raider.java --- a/net/minecraft/world/entity/raid/Raider.java
+++ b/net/minecraft/world/entity/raid/Raider.java +++ b/net/minecraft/world/entity/raid/Raider.java
@@ -158,7 +158,7 @@ public abstract class Raider extends PatrollingMonster { @@ -158,7 +158,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -5,7 +5,7 @@ Subject: [PATCH] Disable some check for operators
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d63d8f7523938088bf9efc1c1b8ad9f0583338bb..b40059553089207ab1c6628beefadc674ec43d4e 100644 index f06b9d8ad9512d35f3f460eb77c869690321c67f..e17f9629369f8653b484b4cc71de4874b5faa4d6 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -367,7 +367,7 @@ public class ServerGamePacketListenerImpl @@ -367,7 +367,7 @@ public class ServerGamePacketListenerImpl
@@ -31,7 +31,7 @@ index cf72cb8b418239b56c755486b03a321672e16bc3..b69c06607ca900beeebf4892a978442d
String awtException = io.papermc.paper.util.ServerEnvironment.awtDependencyCheck(); String awtException = io.papermc.paper.util.ServerEnvironment.awtDependencyCheck();
if (awtException != null) { if (awtException != null) {
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index ec07d916ff52f5a866218c2fa4d632b83675faf2..eabaae86e4951046db5d1bae9abb92f1bece100f 100644 index c93feb64b6088a4878fcdb6e7c733a5f37e9385b..79c911003c7b1c3d94e7e9d3974eeadcc16bde3a 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java --- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -5,7 +5,7 @@ Subject: [PATCH] Old zombie reinforcement
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index 14d0758aca54d9a25e369dfa8c89c930f27946c9..6f1f26b7f759e56f843e674167470da943785728 100644 index 14d0758aca54d9a25e369dfa8c89c930f27946c9..1324f2c8c0d6571bac36855f08354a84e0f08b70 100644
--- a/net/minecraft/world/entity/monster/Zombie.java --- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -341,7 +341,7 @@ public class Zombie extends Monster { @@ -341,7 +341,7 @@ public class Zombie extends Monster {
@@ -13,7 +13,7 @@ index 14d0758aca54d9a25e369dfa8c89c930f27946c9..6f1f26b7f759e56f843e674167470da9
int floor1 = Mth.floor(this.getY()); int floor1 = Mth.floor(this.getY());
int floor2 = Mth.floor(this.getZ()); int floor2 = Mth.floor(this.getZ());
- EntityType<? extends Zombie> type = this.getType(); - EntityType<? extends Zombie> type = this.getType();
+ EntityType<? extends Zombie> type = fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldZombieReinforcement ? EntityType.ZOMBIE : this.getType(); // Lophine - old zombie reinforcement + EntityType<? extends Zombie> type = fun.bm.lophine.config.modules.function.OldFeatureConfig.oldZombieReinforcement ? EntityType.ZOMBIE : this.getType(); // Lophine - old zombie reinforcement
Zombie zombie = type.create(level, EntitySpawnReason.REINFORCEMENT); Zombie zombie = type.create(level, EntitySpawnReason.REINFORCEMENT);
if (zombie == null) { if (zombie == null) {
return true; return true;
@@ -5,7 +5,7 @@ Subject: [PATCH] Spawn invulnerable time
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 6b7c92fdf562dfa46eee8e8acbc82b02fc3226c5..144b2c9396b8162f9cce8b343d998907bf7fb5aa 100644 index 6b7c92fdf562dfa46eee8e8acbc82b02fc3226c5..c29e9c6cb2513fe4b01a619e16433893efb44e6f 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
@@ -232,6 +232,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -232,6 +232,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -29,7 +29,7 @@ index 6b7c92fdf562dfa46eee8e8acbc82b02fc3226c5..144b2c9396b8162f9cce8b343d998907
return false; return false;
} else { } else {
+ // Lophine start - spawn invulnerable time + // Lophine start - spawn invulnerable time
+ if (fun.bm.lophine.config.modules.misc.OldFeatureConfig.spawnInvulnerableTime) { + if (fun.bm.lophine.config.modules.function.OldFeatureConfig.spawnInvulnerableTime) {
+ if (this.spawnInvulnerableTime > 0 && !damageSource.is(net.minecraft.tags.DamageTypeTags.BYPASSES_INVULNERABILITY)) { + if (this.spawnInvulnerableTime > 0 && !damageSource.is(net.minecraft.tags.DamageTypeTags.BYPASSES_INVULNERABILITY)) {
+ return false; + return false;
+ } + }
@@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE) Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE)
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index 2f41a92465b9da28e026297cc3528898bb1c8412..fb5300ec1bd19b3dfd6a2b4106440b9f73c48205 100644 index 2f41a92465b9da28e026297cc3528898bb1c8412..168301a2f1c3081ae15d3695c2dcc72b4538cdfb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -148,9 +148,26 @@ public class CraftContainer extends AbstractContainerMenu { @@ -148,9 +148,26 @@ public class CraftContainer extends AbstractContainerMenu {
@@ -18,7 +18,7 @@ index 2f41a92465b9da28e026297cc3528898bb1c8412..fb5300ec1bd19b3dfd6a2b4106440b9f
- case BARREL: - case BARREL:
- this.delegate = new ChestMenu(net.minecraft.world.inventory.MenuType.GENERIC_9x3, windowId, bottom, top, top.getContainerSize() / 9); - this.delegate = new ChestMenu(net.minecraft.world.inventory.MenuType.GENERIC_9x3, windowId, bottom, top, top.getContainerSize() / 9);
+ // Purpur start - Barrels and enderchests 6 rows + // Purpur start - Barrels and enderchests 6 rows
+ this.delegate = new ChestMenu(switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.enderchestRows) { + this.delegate = new ChestMenu(switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.enderchestRows) {
+ case 6 -> net.minecraft.world.inventory.MenuType.GENERIC_9x6; + case 6 -> net.minecraft.world.inventory.MenuType.GENERIC_9x6;
+ case 5 -> net.minecraft.world.inventory.MenuType.GENERIC_9x5; + case 5 -> net.minecraft.world.inventory.MenuType.GENERIC_9x5;
+ case 4 -> net.minecraft.world.inventory.MenuType.GENERIC_9x4; + case 4 -> net.minecraft.world.inventory.MenuType.GENERIC_9x4;
@@ -28,7 +28,7 @@ index 2f41a92465b9da28e026297cc3528898bb1c8412..fb5300ec1bd19b3dfd6a2b4106440b9f
+ }, windowId, bottom, top, top.getContainerSize() / 9); + }, windowId, bottom, top, top.getContainerSize() / 9);
break; break;
+ case BARREL: + case BARREL:
+ this.delegate = new ChestMenu(switch (fun.bm.lophine.config.modules.misc.ContainerExpansionConfig.barrelRows) { + this.delegate = new ChestMenu(switch (fun.bm.lophine.config.modules.function.ContainerExpansionConfig.barrelRows) {
+ case 6 -> net.minecraft.world.inventory.MenuType.GENERIC_9x6; + case 6 -> net.minecraft.world.inventory.MenuType.GENERIC_9x6;
+ case 5 -> net.minecraft.world.inventory.MenuType.GENERIC_9x5; + case 5 -> net.minecraft.world.inventory.MenuType.GENERIC_9x5;
+ case 4 -> net.minecraft.world.inventory.MenuType.GENERIC_9x4; + case 4 -> net.minecraft.world.inventory.MenuType.GENERIC_9x4;
@@ -1,9 +1,9 @@
package fun.bm.lophine.config.modules.experiment; package fun.bm.lophine.config.modules.experiment;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "command") @ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "command")
public class CommandConfig implements IConfigModule { public class CommandConfig implements IConfigModule {
@@ -1,9 +1,9 @@
package fun.bm.lophine.config.modules.experiment; package fun.bm.lophine.config.modules.experiment;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "entity_damage_source_trace") @ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "entity_damage_source_trace")
public class EntityDamageSourceTraceConfig implements IConfigModule { public class EntityDamageSourceTraceConfig implements IConfigModule {
@@ -1,9 +1,9 @@
package fun.bm.lophine.config.modules.experiment; package fun.bm.lophine.config.modules.experiment;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "ray_tracking_entity_tracker") @ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "ray_tracking_entity_tracker")
public class RayTrackingEntityTrackerConfig implements IConfigModule { public class RayTrackingEntityTrackerConfig implements IConfigModule {
@@ -1,10 +1,10 @@
package fun.bm.lophine.config.modules.experiment; package fun.bm.lophine.config.modules.experiment;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig; import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "waypoint_bar") @ConfigClassInfo(configAttribution = EnumConfigCategory.EXPERIMENT, mainName = "waypoint_bar")
public class WaypointConfig implements IConfigModule { public class WaypointConfig implements IConfigModule {
@@ -1,12 +1,14 @@
package fun.bm.lophine.config.modules.gameplay; package fun.bm.lophine.config.modules.fixes;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.GAMEPLAY, mainName = "end-void-ring") @ConfigClassInfo(configAttribution = EnumConfigCategory.FIXES, mainName = "end-void-ring")
public class EndVoidRingsConfig implements IConfigModule { public class EndVoidRingsConfig implements IConfigModule {
@TransformedConfig(name = "enabled", category = {"gameplay", "end_void_rings"})
@ConfigInfo(baseName = "enabled", comments = """ @ConfigInfo(baseName = "enabled", comments = """
If enabled, it will generate end void rings, like MC-159283.""") If enabled, it will generate end void rings, like MC-159283.""")
public static boolean enabled = false; public static boolean enabled = false;
@@ -1,27 +1,32 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "container_expansion") @ConfigClassInfo(configAttribution = EnumConfigCategory.FUNCTION, mainName = "container_expansion")
public class ContainerExpansionConfig implements IConfigModule { public class ContainerExpansionConfig implements IConfigModule {
@TransformedConfig(name = "barrel_rows", category = {"misc", "container_expansion"})
@ConfigInfo(baseName = "barrel_rows", comments = @ConfigInfo(baseName = "barrel_rows", comments =
""" """
range: 1~6""") range: 1~6""")
public static int barrelRows = 3; public static int barrelRows = 3;
@TransformedConfig(name = "enderchest_rows", category = {"misc", "container_expansion"})
@ConfigInfo(baseName = "enderchest_rows", comments = @ConfigInfo(baseName = "enderchest_rows", comments =
""" """
range: 1~6""") range: 1~6""")
public static int enderchestRows = 3; public static int enderchestRows = 3;
@TransformedConfig(name = "shulker_stackable_count", category = {"misc", "container_expansion"})
@ConfigInfo(baseName = "shulker_stackable_count", comments = @ConfigInfo(baseName = "shulker_stackable_count", comments =
""" """
range: 1~64""") range: 1~64""")
public static int shulkerCount = 1; public static int shulkerCount = 1;
@TransformedConfig(name = "same_nbt_shulker_stackable", category = {"misc", "container_expansion"})
@ConfigInfo(baseName = "same_nbt_shulker_stackable") @ConfigInfo(baseName = "same_nbt_shulker_stackable")
public static boolean nbtShulkerStackable = false; public static boolean nbtShulkerStackable = false;
} }
@@ -1,12 +1,14 @@
package fun.bm.lophine.config.modules.optimizations; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.OPTIMIZATIONS, mainName = "language") @ConfigClassInfo(configAttribution = EnumConfigCategory.FUNCTION, mainName = "language")
public class LanguageConfig implements IConfigModule { public class LanguageConfig implements IConfigModule {
@TransformedConfig(name = "lang", category = {"optimizations", "language"})
@ConfigInfo(baseName = "lang", comments = """ @ConfigInfo(baseName = "lang", comments = """
Please use the key from https://minecraft.wiki/w/Language Please use the key from https://minecraft.wiki/w/Language
Sample of format: en_us zh_cn zh_hk zh_tw""") Sample of format: en_us zh_cn zh_hk zh_tw""")
@@ -1,22 +1,26 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig; import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "old-feature") @ConfigClassInfo(configAttribution = EnumConfigCategory.FUNCTION, mainName = "old-feature")
public class OldFeatureConfig implements IConfigModule { public class OldFeatureConfig implements IConfigModule {
@TransformedConfig(name = "spawn_invulnerable_time", category = {"misc", "old-feature"})
@ConfigInfo(baseName = "spawn_invulnerable_time") @ConfigInfo(baseName = "spawn_invulnerable_time")
public static boolean spawnInvulnerableTime = false; public static boolean spawnInvulnerableTime = false;
@TransformedConfig(name = "old_zombie_reinforcement", category = {"misc", "old-feature"})
@ConfigInfo(baseName = "old_zombie_reinforcement") @ConfigInfo(baseName = "old_zombie_reinforcement")
public static boolean oldZombieReinforcement = false; public static boolean oldZombieReinforcement = false;
@TransformedConfig(name = "old_explosion_damage_calculator", category = {"misc", "old-feature"})
@ConfigInfo(baseName = "old_explosion_damage_calculator") @ConfigInfo(baseName = "old_explosion_damage_calculator")
public static boolean oldExplosionDamageCalculator = false; public static boolean oldExplosionDamageCalculator = false;
@TransformedConfig(name = "old_raid_behavior", category = {"misc", "old-feature"})
@TransformedConfig(name = "give_bad_omen_when_kill_raid_captain", category = {"misc", "revert_raid_changes"}, transformComments = false) @TransformedConfig(name = "give_bad_omen_when_kill_raid_captain", category = {"misc", "revert_raid_changes"}, transformComments = false)
@ConfigInfo(baseName = "old_raid_behavior") @ConfigInfo(baseName = "old_raid_behavior")
public static boolean oldRaidBehavior = false; public static boolean oldRaidBehavior = false;
@@ -1,13 +1,14 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig; import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "redstone") @ConfigClassInfo(configAttribution = EnumConfigCategory.FUNCTION, mainName = "redstone")
public class RedStoneConfig implements IConfigModule { public class RedStoneConfig implements IConfigModule {
@TransformedConfig(name = "shears_rotate", category = {"misc", "redstone"})
@TransformedConfig(name = "allow_skip_cooldown", category = {"misc", "redstone"}) @TransformedConfig(name = "allow_skip_cooldown", category = {"misc", "redstone"})
@ConfigInfo(baseName = "shears_rotate", comments = @ConfigInfo(baseName = "shears_rotate", comments =
""" """
@@ -1,38 +1,48 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
import java.util.List; import java.util.List;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "survux-protocol") @ConfigClassInfo(configAttribution = EnumConfigCategory.FUNCTION, mainName = "survux-protocol")
public class SurvuxProtocolConfig implements IConfigModule { public class SurvuxProtocolConfig implements IConfigModule {
@TransformedConfig(name = "entity-protocol", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "entity-protocol") @ConfigInfo(baseName = "entity-protocol")
public static boolean entityProtocol = false; public static boolean entityProtocol = false;
@TransformedConfig(name = "hud-logger-protocol", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "hud-logger-protocol") @ConfigInfo(baseName = "hud-logger-protocol")
public static boolean hudLoggerProtocol = false; public static boolean hudLoggerProtocol = false;
@TransformedConfig(name = "hud-metadata-protocol", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "hud-metadata-protocol") @ConfigInfo(baseName = "hud-metadata-protocol")
public static boolean hudMetadataProtocol = false; public static boolean hudMetadataProtocol = false;
@TransformedConfig(name = "hud-metadata-share-seed", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "hud-metadata-share-seed") @ConfigInfo(baseName = "hud-metadata-share-seed")
public static boolean hudMetadataShareSeed = false; public static boolean hudMetadataShareSeed = false;
@TransformedConfig(name ="structure-protocol", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "structure-protocol") @ConfigInfo(baseName = "structure-protocol")
public static boolean structureProtocol = false; public static boolean structureProtocol = false;
@TransformedConfig(name = "hud-enabled-loggers", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "hud-enabled-loggers") @ConfigInfo(baseName = "hud-enabled-loggers")
public static List<String> hudEnabledLoggers = List.of("tps", "mob_caps"); public static List<String> hudEnabledLoggers = List.of("tps", "mob_caps");
@TransformedConfig(name = "hud-update-interval", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "hud-update-interval") @ConfigInfo(baseName = "hud-update-interval")
public static int hudUpdateInterval = 1; public static int hudUpdateInterval = 1;
@TransformedConfig(name = "litematics-enabled", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "litematics-enabled") @ConfigInfo(baseName = "litematics-enabled")
public static boolean litematicsEnabled = false; public static boolean litematicsEnabled = false;
@TransformedConfig(name = "litematics-max-nbt-size", category = {"misc", "survux-protocol"})
@ConfigInfo(baseName = "litematics-max-nbt-size") @ConfigInfo(baseName = "litematics-max-nbt-size")
public static int litematicsMaxNbtSize = 2097152; public static int litematicsMaxNbtSize = 2097152;
} }
@@ -1,13 +1,14 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.function;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig; import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "villager") @ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "villager")
public class VillagerConfig implements IConfigModule { public class VillagerConfig implements IConfigModule {
@TransformedConfig(name = "villager-infinite-trade", category = {"misc", "villager"})
@TransformedConfig(name = "villager-infinite-trade", category = {"misc", "villager-config"}) @TransformedConfig(name = "villager-infinite-trade", category = {"misc", "villager-config"})
@ConfigInfo(baseName = "villager-infinite-trade", comments = @ConfigInfo(baseName = "villager-infinite-trade", comments =
""" """
@@ -1,9 +1,9 @@
package fun.bm.lophine.config.modules.misc; package fun.bm.lophine.config.modules.misc;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "disable-check") @ConfigClassInfo(configAttribution = EnumConfigCategory.MISC, mainName = "disable-check")
public class DisableCheckConfig implements IConfigModule { public class DisableCheckConfig implements IConfigModule {
@@ -1,10 +1,10 @@
package fun.bm.lophine.config.modules.removed; package fun.bm.lophine.config.modules.removed;
import me.earthme.luminol.config.EnumConfigCategory;
import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo; import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig; import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(configAttribution = EnumConfigCategory.REMOVED, mainName = "removed_config") @ConfigClassInfo(configAttribution = EnumConfigCategory.REMOVED, mainName = "removed_config")
public class RemovedConfig implements IConfigModule { public class RemovedConfig implements IConfigModule {
@@ -5,7 +5,7 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException; import com.google.gson.JsonSyntaxException;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
import fun.bm.lophine.config.modules.optimizations.LanguageConfig; import fun.bm.lophine.config.modules.function.LanguageConfig;
import me.earthme.luminol.config.ConfigManager; import me.earthme.luminol.config.ConfigManager;
import me.earthme.luminol.config.ConfigsInstance; import me.earthme.luminol.config.ConfigsInstance;
import net.minecraft.DetectedVersion; import net.minecraft.DetectedVersion;
@@ -18,6 +18,7 @@
package org.leavesmc.leaves.protocol.servux; package org.leavesmc.leaves.protocol.servux;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
import fun.bm.lophine.config.modules.function.SurvuxProtocolConfig;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.minecraft.Util; import net.minecraft.Util;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@@ -152,7 +153,7 @@ public class ServuxEntityDataProtocol implements LeavesProtocol {
@Override @Override
public boolean isActive() { public boolean isActive() {
return fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.entityProtocol; return SurvuxProtocolConfig.entityProtocol;
} }
public enum EntityDataPayloadType { public enum EntityDataPayloadType {
@@ -20,6 +20,7 @@ package org.leavesmc.leaves.protocol.servux;
import com.google.common.collect.HashBasedTable; import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table; import com.google.common.collect.Table;
import com.mojang.serialization.DataResult; import com.mojang.serialization.DataResult;
import fun.bm.lophine.config.modules.function.SurvuxProtocolConfig;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@@ -103,7 +104,7 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
metadata.putString("id", HudDataPayload.CHANNEL.toString()); metadata.putString("id", HudDataPayload.CHANNEL.toString());
metadata.putInt("version", PROTOCOL_VERSION); metadata.putInt("version", PROTOCOL_VERSION);
metadata.putString("servux", ServuxProtocol.SERVUX_STRING); metadata.putString("servux", ServuxProtocol.SERVUX_STRING);
if (fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudLoggerProtocol) { if (SurvuxProtocolConfig.hudLoggerProtocol) {
CompoundTag nbt = new CompoundTag(); CompoundTag nbt = new CompoundTag();
for (DataLogger.Type type : DataLogger.Type.VALUES) { for (DataLogger.Type type : DataLogger.Type.VALUES) {
nbt.putBoolean(type.getSerializedName(), isLoggerTypeEnabled(type)); nbt.putBoolean(type.getSerializedName(), isLoggerTypeEnabled(type));
@@ -184,7 +185,7 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
metadata.putInt("spawnPosZ", spawnPos.getZ()); metadata.putInt("spawnPosZ", spawnPos.getZ());
metadata.putInt("spawnChunkRadius", level.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS)); metadata.putInt("spawnChunkRadius", level.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
if (fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudMetadataShareSeed) { if (SurvuxProtocolConfig.hudMetadataShareSeed) {
metadata.putLong("worldSeed", level.getSeed()); metadata.putLong("worldSeed", level.getSeed());
} }
} }
@@ -216,7 +217,7 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
} }
private static boolean isLoggerTypeEnabled(DataLogger.Type type) { private static boolean isLoggerTypeEnabled(DataLogger.Type type) {
return fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudEnabledLoggers.contains(type.getSerializedName()); return SurvuxProtocolConfig.hudEnabledLoggers.contains(type.getSerializedName());
} }
@ProtocolHandler.Ticker @ProtocolHandler.Ticker
@@ -232,13 +233,13 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
@ProtocolHandler.Ticker(tickerId = "logger") @ProtocolHandler.Ticker(tickerId = "logger")
public void loggerTick() { public void loggerTick() {
if (!fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudLoggerProtocol) { if (!SurvuxProtocolConfig.hudLoggerProtocol) {
return; return;
} }
MinecraftServer server = MinecraftServer.getServer(); MinecraftServer server = MinecraftServer.getServer();
if (server.getTickCount() % fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudUpdateInterval == 0) { if (server.getTickCount() % SurvuxProtocolConfig.hudUpdateInterval == 0) {
LOGGERS.forEach((type, logger) -> { LOGGERS.forEach((type, logger) -> {
if (!isLoggerTypeEnabled(type)) { if (!isLoggerTypeEnabled(type)) {
return; return;
@@ -276,7 +277,7 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
@Override @Override
public boolean isActive() { public boolean isActive() {
return fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.hudMetadataProtocol; return SurvuxProtocolConfig.hudMetadataProtocol;
} }
@Override @Override
@@ -18,6 +18,7 @@
package org.leavesmc.leaves.protocol.servux; package org.leavesmc.leaves.protocol.servux;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
import fun.bm.lophine.config.modules.function.SurvuxProtocolConfig;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import it.unimi.dsi.fastutil.longs.LongIterator; import it.unimi.dsi.fastutil.longs.LongIterator;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
@@ -335,7 +336,7 @@ public class ServuxStructuresProtocol implements LeavesProtocol {
@Override @Override
public boolean isActive() { public boolean isActive() {
return fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.structureProtocol; return SurvuxProtocolConfig.structureProtocol;
} }
public enum StructuresPayloadType { public enum StructuresPayloadType {
@@ -17,6 +17,7 @@
package org.leavesmc.leaves.protocol.servux.litematics; package org.leavesmc.leaves.protocol.servux.litematics;
import fun.bm.lophine.config.modules.function.SurvuxProtocolConfig;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.NamedTextColor;
@@ -132,7 +133,7 @@ public class ServuxLitematicsProtocol implements LeavesProtocol {
} }
playerSession.remove(uuid); playerSession.remove(uuid);
fullPacket.readVarInt(); fullPacket.readVarInt();
Tag tag = FriendlyByteBuf.readNbt(fullPacket, new NbtAccounter(fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.litematicsMaxNbtSize == -1 ? Long.MAX_VALUE : fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.litematicsMaxNbtSize, 512)); Tag tag = FriendlyByteBuf.readNbt(fullPacket, new NbtAccounter(SurvuxProtocolConfig.litematicsMaxNbtSize == -1 ? Long.MAX_VALUE : SurvuxProtocolConfig.litematicsMaxNbtSize, 512));
if (!(tag instanceof CompoundTag)) { if (!(tag instanceof CompoundTag)) {
ServuxProtocol.LOGGER.error("cannot read nbt tag from packet"); ServuxProtocol.LOGGER.error("cannot read nbt tag from packet");
return; return;
@@ -290,7 +291,7 @@ public class ServuxLitematicsProtocol implements LeavesProtocol {
@Override @Override
public boolean isActive() { public boolean isActive() {
return fun.bm.lophine.config.modules.misc.SurvuxProtocolConfig.litematicsEnabled; return SurvuxProtocolConfig.litematicsEnabled;
} }
public enum ServuxLitematicaPayloadType { public enum ServuxLitematicaPayloadType {
@@ -17,7 +17,7 @@
package org.leavesmc.leaves.util; package org.leavesmc.leaves.util;
import fun.bm.lophine.config.modules.misc.RedStoneConfig; import fun.bm.lophine.config.modules.function.RedStoneConfig;
import net.minecraft.Util; import net.minecraft.Util;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;