-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM-CATEGORY-OPTION (for future automation purposes) Split configuration commits (tracking adding config options) Use per world config if possible
- Loading branch information
1 parent
ef8af2f
commit 32e0262
Showing
3 changed files
with
65 additions
and
34 deletions.
There are no files selected for viewing
34 changes: 0 additions & 34 deletions
34
patches/server/0008-Add-option-to-drop-contents-of-shulker-items-when-de.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: "Sofiane H. Djerbi" <[email protected]> | ||
Date: Sat, 8 Apr 2023 23:32:34 +0300 | ||
Subject: [PATCH] Kaiiju Gameplay Configuration | ||
|
||
|
||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuConfig.java | ||
index edaeba20d871925ae05f7f1cabb3ac8eb71b4655..e216139d08c52640396c07c19c5cfeff09031cdb 100644 | ||
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuConfig.java | ||
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuConfig.java | ||
@@ -206,4 +206,7 @@ public class KaiijuConfig { | ||
sendNullEntityPackets = getBoolean("network.send-null-entity-packets", sendNullEntityPackets); | ||
alternateKeepAlive = getBoolean("network.alternate-keepalive", sendNullEntityPackets); | ||
} | ||
+ | ||
+ private static void gameplaySettings() { | ||
+ } | ||
} | ||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
index b194f4dbebcbbf5bb4e026a0169e2d24806b46ec..73d79fe0077b28db2f9e7fa13a1ae6eff9abd6a9 100644 | ||
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
@@ -143,4 +143,7 @@ public class KaiijuWorldConfig { | ||
regionFormatLinearCompressionLevel = 1; | ||
} | ||
} | ||
+ | ||
+ private void gameplaySettings() { | ||
+ } | ||
} | ||
\ No newline at end of file |
34 changes: 34 additions & 0 deletions
34
patches/server/0009-Kaiiju-Gameplay-ShulkerDropContentsWhenDestroyed.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Xymb <[email protected]> | ||
Date: Sat, 8 Apr 2023 23:38:13 +0300 | ||
Subject: [PATCH] Kaiiju Gameplay ShulkerDropContentsWhenDestroyed | ||
|
||
|
||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
index 73d79fe0077b28db2f9e7fa13a1ae6eff9abd6a9..1ebc47a266dd3202ac9654eebf1a6a74dead2e27 100644 | ||
--- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java | ||
@@ -144,6 +144,9 @@ public class KaiijuWorldConfig { | ||
} | ||
} | ||
|
||
+ public boolean shulkerBoxDropContentsWhenDestroyed = true; | ||
+ | ||
private void gameplaySettings() { | ||
+ shulkerBoxDropContentsWhenDestroyed = getBoolean("gameplay.shulker-box-drop-contents-when-destroyed", shulkerBoxDropContentsWhenDestroyed ); | ||
} | ||
} | ||
\ No newline at end of file | ||
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java | ||
index b0204af850ee182773ad458208cccd946ad148d5..a4dff10cf787b187ffc716b2278c2dc6999ecb00 100644 | ||
--- a/src/main/java/net/minecraft/world/item/BlockItem.java | ||
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java | ||
@@ -288,7 +288,7 @@ public class BlockItem extends Item { | ||
|
||
@Override | ||
public void onDestroyed(ItemEntity entity) { | ||
- if (this.block instanceof ShulkerBoxBlock) { | ||
+ if (this.block instanceof ShulkerBoxBlock && entity.getLevel().kaiijuConfig.shulkerBoxDropContentsWhenDestroyed) { | ||
ItemStack itemstack = entity.getItem(); | ||
CompoundTag nbttagcompound = BlockItem.getBlockEntityData(itemstack); | ||
|