Skip to content

Commit 0ae8b4c

Browse files
committed
change from nodespawn to 1 day despawn
1 parent bf8ca1b commit 0ae8b4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

atdeprecated-server/minecraft-patches/features/0008-Player-Death-Loot-and-XP-Protection-Gamerule.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ index 06e41bca6b964ca71ea7bca547b03cdb3610ba31..1e13ff78aee0951f474313f404040c80
2929
+ entity.setInvulnerable(true);
3030
+ entity.markAsDeathLoot();
3131
+ }
32-
+ if (this.level().getGameRules().getBoolean(GameRules.RULE_DEATH_ITEMS_NO_DESPAWN)) {
33-
+ entity.setUnlimitedLifetime();
32+
+ if (this.level().getGameRules().getBoolean(GameRules.RULE_1DAY_RESPAWN_GAMERULE)) {
33+
+ entity.age = -1728000;
3434
+ entity.markAsDeathLoot();
3535
+ }
3636
+ if (this.level().getGameRules().getBoolean(GameRules.RULE_DEATH_ITEMS_MOB_CANT_PICKUP)) {
@@ -166,8 +166,8 @@ index d5536dd40a1e9a2e05967652f690abbbca287852..a6277c587f9e3bdae3b00d2862dea7f4
166166
+ public static final GameRules.Key<GameRules.BooleanValue> RULE_DEATH_ITEMS_INVULNERABLE = register(
167167
+ "deathItemsInvulnerable", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)
168168
+ );
169-
+ public static final GameRules.Key<GameRules.BooleanValue> RULE_DEATH_ITEMS_NO_DESPAWN = register(
170-
+ "deathItemsNoDespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)
169+
+ public static final GameRules.Key<GameRules.BooleanValue> RULE_1DAY_RESPAWN_GAMERULE = register(
170+
+ "1dayrespawngamerule", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)
171171
+ );
172172
+ public static final GameRules.Key<GameRules.BooleanValue> RULE_DEATH_ITEMS_OWNER_PICKUP_ONLY = register(
173173
+ "deathItemsOwnerPickupOnly", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)

0 commit comments

Comments
 (0)