Skip to content

Commit d2c466f

Browse files
committed
Update Configurable
1 parent 5eb8775 commit d2c466f

File tree

8 files changed

+108
-67
lines changed

8 files changed

+108
-67
lines changed

atdeprecated-server/minecraft-patches/features/0009-Purpur-Barrels-and-enderchests-6-rows.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ From: MidnightTale <[email protected]>
33
Date: Thu, 24 Jul 2025 08:46:30 +0700
44
Subject: [PATCH] Purpur: Barrels and enderchests 6 rows
55

6-
Co-authored by: William Blake Galbreath <[email protected]>
76
As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/purpur-server/minecraft-patches/features/0003-Barrels-and-enderchests-6-rows.patch)
87
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE)
98

109
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
11-
index 5c21fc0c749973d17df690fe7e2eab597b198131..d89f91a08d38869296471a78d52fa84ff97be64a 100644
10+
index 5958732fe6ac391648df07cd76e73c0fb4c312b8..2f4ceb4f26a9861083de02e3d5aa6f10763c20f5 100644
1211
--- a/net/minecraft/server/players/PlayerList.java
1312
+++ b/net/minecraft/server/players/PlayerList.java
14-
@@ -1086,6 +1086,9 @@ public abstract class PlayerList {
13+
@@ -1087,6 +1087,9 @@ public abstract class PlayerList {
1514
player.getBukkitEntity().recalculatePermissions(); // CraftBukkit
1615
this.server.getCommands().sendCommands(player);
1716
} // Paper - Add sendOpLevel API
@@ -34,7 +33,7 @@ index 7ff3562f4095a1e79a1299b56a080ee5a15cfa0d..aa1a5de33aef5718581bf50ee45b1d2b
3433
// CraftBukkit start
3534
public boolean fauxSleeping;
3635
diff --git a/net/minecraft/world/inventory/ChestMenu.java b/net/minecraft/world/inventory/ChestMenu.java
37-
index 0fffa384f928ab84451331380968fb4650eafe26..8cf24c79535d1cf326079f0eacd5f1ac25e3f365 100644
36+
index 0fffa384f928ab84451331380968fb4650eafe26..57ac36b77f15966b0e2a6676bfc15b963ec1100a 100644
3837
--- a/net/minecraft/world/inventory/ChestMenu.java
3938
+++ b/net/minecraft/world/inventory/ChestMenu.java
4039
@@ -70,6 +70,26 @@ public class ChestMenu extends AbstractContainerMenu {

atdeprecated-server/minecraft-patches/features/0010-Add-config-for-death-loot.patch

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for death loot
55

66

77
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
8-
index 06e41bca6b964ca71ea7bca547b03cdb3610ba31..b39f2790fabeb7f2a977dcd1ec66db1fde373e51 100644
8+
index aa242f3f7589c8edafccccb52effaed7582aa6f4..44d8430361cadacff08b5f543a471982d453ff77 100644
99
--- a/net/minecraft/server/level/ServerPlayer.java
1010
+++ b/net/minecraft/server/level/ServerPlayer.java
11-
@@ -1249,7 +1249,33 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
11+
@@ -1250,7 +1250,33 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
1212
if (!keepInventory) {
1313
for (ItemStack item : this.getInventory().getContents()) {
1414
if (!item.isEmpty() && !EnchantmentHelper.has(item, net.minecraft.world.item.enchantment.EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
@@ -17,23 +17,23 @@ index 06e41bca6b964ca71ea7bca547b03cdb3610ba31..b39f2790fabeb7f2a977dcd1ec66db1f
1717
+ ItemEntity entity = this.drop(stack, true, false, false, null);
1818
+ // atDeprecated start - death loot protection
1919
+ if (entity != null) {
20-
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsOwnerPickupOnly) {
20+
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsOwnerPickupOnly) {
2121
+ entity.setTarget(this.getUUID());
2222
+ entity.markAsDeathLoot();
2323
+ }
24-
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsGlow) {
24+
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsGlow) {
2525
+ entity.setGlowingTag(true);
2626
+ entity.markAsDeathLoot();
2727
+ }
28-
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsInvulnerable) {
28+
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsInvulnerable) {
2929
+ entity.setInvulnerable(true);
3030
+ entity.markAsDeathLoot();
3131
+ }
32-
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemDespawnTimeTicks > 0) {
33-
+ entity.age = -fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemDespawnTimeTicks;
32+
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemDespawnTimeTicks > 0) {
33+
+ entity.age = -fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemDespawnTimeTicks;
3434
+ entity.markAsDeathLoot();
3535
+ }
36-
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsMobCantPickup) {
36+
+ if (fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsMobCantPickup) {
3737
+ entity.canMobPickup = false;
3838
+ entity.markAsDeathLoot();
3939
+ }
@@ -44,7 +44,7 @@ index 06e41bca6b964ca71ea7bca547b03cdb3610ba31..b39f2790fabeb7f2a977dcd1ec66db1f
4444
}
4545
}
4646
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
47-
index d55a6989fd68f0bcf7bd05e9420fda1115afa6c0..25b1db4170104c7b49ed5c62989f6d8c59699465 100644
47+
index d55a6989fd68f0bcf7bd05e9420fda1115afa6c0..08b29d1f7941bb81d9a715656d94d987e8247cc5 100644
4848
--- a/net/minecraft/world/entity/LivingEntity.java
4949
+++ b/net/minecraft/world/entity/LivingEntity.java
5050
@@ -3970,9 +3970,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -56,7 +56,7 @@ index d55a6989fd68f0bcf7bd05e9420fda1115afa6c0..25b1db4170104c7b49ed5c62989f6d8c
5656
- itemEntity.setDeltaMovement(-Mth.sin(f1) * f, 0.2F, Mth.cos(f1) * f);
5757
+ // atDeprecated start
5858
+ if (this instanceof Player) {
59-
+ float f = this.random.nextFloat() * (float) fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathLootSpread;
59+
+ float f = this.random.nextFloat() * (float) fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathLootSpread;
6060
+ float f1 = this.random.nextFloat() * (float) (Math.PI * 2);
6161
+ itemEntity.setDeltaMovement(-Mth.sin(f1) * f, 0.2F, Mth.cos(f1) * f);
6262
+ } else {
@@ -69,7 +69,7 @@ index d55a6989fd68f0bcf7bd05e9420fda1115afa6c0..25b1db4170104c7b49ed5c62989f6d8c
6969
float f = 0.3F;
7070
float f1 = Mth.sin(this.getXRot() * (float) (Math.PI / 180.0));
7171
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
72-
index b745eb5d9c68547335247910ff2ae8d5fb36349c..bef0bf94a54ab85a86efcb5502ca721f28cf33be 100644
72+
index b745eb5d9c68547335247910ff2ae8d5fb36349c..a779bb24475e2ee5b6fab7da9b64a2c96b027242 100644
7373
--- a/net/minecraft/world/entity/item/ItemEntity.java
7474
+++ b/net/minecraft/world/entity/item/ItemEntity.java
7575
@@ -56,6 +56,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -85,7 +85,7 @@ index b745eb5d9c68547335247910ff2ae8d5fb36349c..bef0bf94a54ab85a86efcb5502ca721f
8585
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
8686
}
8787
+ // atDeprecated start - glowing for death loot
88-
+ if (this.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsGlow) {
88+
+ if (this.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsGlow) {
8989
+ this.setGlowingTag(true);
9090
+ }
9191
+ // atDeprecated end
@@ -118,7 +118,7 @@ index b745eb5d9c68547335247910ff2ae8d5fb36349c..bef0bf94a54ab85a86efcb5502ca721f
118118
public void playerTouch(Player entity) {
119119
if (!this.level().isClientSide) {
120120
+ // atDeprecated start - enforce owner-only pickup for death loot
121-
+ if (this.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsOwnerPickupOnly) {
121+
+ if (this.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsOwnerPickupOnly) {
122122
+ if (this.target != null && !this.target.equals(entity.getUUID())) {
123123
+ return;
124124
+ }
@@ -137,7 +137,7 @@ index b745eb5d9c68547335247910ff2ae8d5fb36349c..bef0bf94a54ab85a86efcb5502ca721f
137137
+ // atDeprecated end
138138
}
139139
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
140-
index aa1a5de33aef5718581bf50ee45b1d2b1c13a46c..b9b14cd9f0ff5556e076aab21f4c2b85d1e48ee5 100644
140+
index aa1a5de33aef5718581bf50ee45b1d2b1c13a46c..d5ba1bea926f0fd3ef38d101055d61eb548679a4 100644
141141
--- a/net/minecraft/world/entity/player/Player.java
142142
+++ b/net/minecraft/world/entity/player/Player.java
143143
@@ -1840,7 +1840,16 @@ public abstract class Player extends LivingEntity {
@@ -147,7 +147,7 @@ index aa1a5de33aef5718581bf50ee45b1d2b1c13a46c..b9b14cd9f0ff5556e076aab21f4c2b85
147147
- return !level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0;
148148
+ // atDeprecated start - Use deathXpDropPercentage gamerule for XP drop (fixed XP calculation)
149149
+ if (!level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator()) {
150-
+ int percent = fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathXpDropPercentage;
150+
+ int percent = fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathXpDropPercentage;
151151
+ if (percent < 0) percent = 0;
152152
+ if (percent > 100) percent = 100;
153153
+ int xp = getTrueTotalExperience();
@@ -194,15 +194,15 @@ index aa1a5de33aef5718581bf50ee45b1d2b1c13a46c..b9b14cd9f0ff5556e076aab21f4c2b85
194194
+ // atDeprecated end
195195
}
196196
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
197-
index 5de769e7bd56bb3355c3c711d46ce5e103ea4409..e823741a915f14254933aebc515f4ad72b174bbc 100644
197+
index 5de769e7bd56bb3355c3c711d46ce5e103ea4409..646cb7159a3e38101c281bd9fac5d0be1d79c3e8 100644
198198
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
199199
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
200200
@@ -630,6 +630,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
201201
}
202202

203203
public static boolean addItem(Container container, ItemEntity item) {
204204
+ // atDeprecated start - prevent hopper pickup of death loot
205-
+ if (item.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.DEATH_LOOT_CONFIG.deathItemsHopperCantPickup) {
205+
+ if (item.isDeathLoot && fun.mntale.atdeprecated.config.AtCoreConfig.INVENTORY_CONFIG.deathItemsHopperCantPickup) {
206206
+ return false;
207207
+ }
208208
+ // atDeprecated end

atdeprecated-server/minecraft-patches/features/0012-Lophine-Add-config-to-enable-Raytracing-tracker.patch

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ From: MidnightTale <[email protected]>
33
Date: Thu, 24 Jul 2025 23:04:37 +0700
44
Subject: [PATCH] Lophine: Add config to enable Raytracing tracker
55

6-
Co-authored by: MrHua269 <[email protected]>
76
As part of: Lophine (https://github.com/LuminolMC/Lophine/blob/904abaa56499a869259d3e6b3e586c1d33e34d28/lophine-server/minecraft-patches/features/0006-Add-config-to-enable-Raytracing-tracker.patch)
87
Licensed under: MIT (https://github.com/LuminolMC/Lophine/blob/904abaa56499a869259d3e6b3e586c1d33e34d28/LICENSE.md)
98

@@ -96,7 +95,7 @@ index 6f00ffa05d9597917574357e0069c9b056aa5ce2..af0a8b99188f25adb0a76e227d3debc1
9695
public EntityType(
9796
EntityType.EntityFactory<T> factory,
9897
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
99-
index b9b14cd9f0ff5556e076aab21f4c2b85d1e48ee5..4480b491250f08350f479c27d17d51fe62bc60f6 100644
98+
index d5ba1bea926f0fd3ef38d101055d61eb548679a4..e95884b560b8986568dc84214649f640d84d199e 100644
10099
--- a/net/minecraft/world/entity/player/Player.java
101100
+++ b/net/minecraft/world/entity/player/Player.java
102101
@@ -230,6 +230,25 @@ public abstract class Player extends LivingEntity {

atdeprecated-server/src/main/java/fun/mntale/atdeprecated/config/AtCoreConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package fun.mntale.atdeprecated.config;
22

3+
import fun.mntale.atdeprecated.config.modules.features.GriefPreventionConfig;
34
import fun.mntale.atdeprecated.config.modules.features.*;
45
import fun.mntale.atdeprecated.config.modules.fixes.*;
56
import fun.mntale.atdeprecated.config.modules.experiment.*;
@@ -13,11 +14,11 @@ public class AtCoreConfig {
1314
public static final AnvilConfig ANVIL_CONFIG = new AnvilConfig();
1415
public static final BeaconConfig BEACON_CONFIG = new BeaconConfig();
1516
public static final DispenserConfig DISPENSER_CONFIG = new DispenserConfig();
16-
public static final DeathLootConfig DEATH_LOOT_CONFIG = new DeathLootConfig();
1717
public static final ElytraConfig ELYTRA_CONFIG = new ElytraConfig();
1818
public static final PlayerConfig PLAYER_CONFIG = new PlayerConfig();
1919
public static final InventoryConfig INVENTORY_CONFIG = new InventoryConfig();
2020
public static final WaypointConfig WAYPOINT_CONFIG = new WaypointConfig();
21+
public static final GriefPreventionConfig GRIEF_PREVENTION_CONFIG = new GriefPreventionConfig();
2122
public static final RemovedConfig REMOVED_CONFIG = new RemovedConfig();
2223
public static final EntityConfig ENTITY_CONFIG = new EntityConfig();
2324
public static final RayTrackingEntityTrackerConfig RAY_TRACKING_ENTITY_TRACKER_CONFIG = new RayTrackingEntityTrackerConfig();
@@ -35,11 +36,11 @@ private static void registerModules() {
3536
configManager.registerModule(ANVIL_CONFIG);
3637
configManager.registerModule(BEACON_CONFIG);
3738
configManager.registerModule(DISPENSER_CONFIG);
38-
configManager.registerModule(DEATH_LOOT_CONFIG);
3939
configManager.registerModule(ELYTRA_CONFIG);
4040
configManager.registerModule(PLAYER_CONFIG);
4141
configManager.registerModule(INVENTORY_CONFIG);
4242
configManager.registerModule(WAYPOINT_CONFIG);
43+
configManager.registerModule(GRIEF_PREVENTION_CONFIG);
4344
configManager.registerModule(REMOVED_CONFIG);
4445
configManager.registerModule(ENTITY_CONFIG);
4546
configManager.registerModule(RAY_TRACKING_ENTITY_TRACKER_CONFIG);

atdeprecated-server/src/main/java/fun/mntale/atdeprecated/config/modules/features/DeathLootConfig.java

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package fun.mntale.atdeprecated.config.modules.features;
2+
3+
import fun.mntale.atdeprecated.config.EnumConfigCategory;
4+
import fun.mntale.atdeprecated.config.IConfigModule;
5+
import fun.mntale.atdeprecated.config.annotations.ConfigInfo;
6+
7+
public class GriefPreventionConfig implements IConfigModule {
8+
9+
@ConfigInfo(name = "prevent-tnt-explode", comments = "Prevent TNT from destroying blocks")
10+
public boolean preventTntGrief = false;
11+
12+
@ConfigInfo(name = "prevent-creeper-explode", comments = "Prevent Creepers from destroying blocks")
13+
public boolean preventCreeperGrief = true;
14+
15+
@ConfigInfo(name = "prevent-tnt-minecart-explode", comments = "Prevent TNT Minecarts from destroying blocks")
16+
public boolean preventTntMinecartGrief = true;
17+
18+
@ConfigInfo(name = "prevent-bed-explode", comments = "Prevent Beds from destroying blocks in the nether/end")
19+
public boolean preventBedGrief = true;
20+
21+
@ConfigInfo(name = "prevent-respawn-anchor-explode", comments = "Prevent Respawn Anchors from destroying blocks")
22+
public boolean preventRespawnAnchorGrief = true;
23+
24+
@ConfigInfo(name = "prevent-end-crystal-explode", comments = "Prevent End Crystals from destroying blocks")
25+
public boolean preventEndCrystalGrief = true;
26+
27+
@ConfigInfo(name = "prevent-fireball-explode", comments = "Prevent fireballs (from ghasts, blazes, etc.) from destroying blocks")
28+
public boolean preventFireballGrief = true;
29+
30+
@ConfigInfo(name = "prevent-enderman-take-block", comments = "Prevent Endermen from picking up blocks")
31+
public boolean preventEndermanGrief = true;
32+
33+
@ConfigInfo(name = "prevent-wither-boss-explode", comments = "Prevent the main Wither boss explosion from destroying blocks")
34+
public boolean preventWitherBossExplode = true;
35+
36+
@ConfigInfo(name = "prevent-wither-skull-explode", comments = "Prevent Wither skulls from destroying blocks")
37+
public boolean preventWitherSkullExplode = true;
38+
39+
@ConfigInfo(name = "prevent-wither-boss-destroy-block", comments = "Prevent the Wither from breaking blocks by charging")
40+
public boolean preventWitherBossDestroyBlock = false;
41+
42+
@Override
43+
public EnumConfigCategory getCategory() {
44+
return EnumConfigCategory.FEATURES;
45+
}
46+
47+
@Override
48+
public String getBaseName() {
49+
return "grief-prevention";
50+
}
51+
}

0 commit comments

Comments
 (0)