Skip to content

Commit a82724f

Browse files
authored
Update mc technical mode (#734)
1 parent decc975 commit a82724f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

leaves-server/minecraft-patches/features/0033-MC-Technical-Survival-Mode.patch

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,29 @@ index 4f647507d06d45a65b4b1793219d90c65e110225..dac4646902a93eaaa287f5b6da324eea
7070
!(entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL ||
7171
entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) {
7272
continue;
73+
diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
74+
index cbbe3dee3dda06d0e2451597dae0ac03009330e0..aa94abe106ae0f47f61e6c431f1abcbdbf945dfa 100644
75+
--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
76+
+++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
77+
@@ -342,7 +342,7 @@ public class BeehiveBlockEntity extends BlockEntity {
78+
// Leaves end - pca
79+
}
80+
// Paper start - Fix bees aging inside; use exitTickCounter to keep actual bee life
81+
- else if (level.paperConfig().entities.behavior.cooldownFailedBeehiveReleases) {
82+
+ else if (!org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode && level.paperConfig().entities.behavior.cooldownFailedBeehiveReleases) { // Leaves - mc technical survival mode
83+
beeData.exitTickCounter = beeData.occupant.minTicksInHive / 2;
84+
}
85+
// Paper end - Fix bees aging inside; use exitTickCounter to keep actual bee life
7386
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
74-
index d7755e6a4641b5463eb39885bf53b6950c09bfc9..1dd5538be2e45514c9009f60494ae5fceb2ad7e6 100644
87+
index d7755e6a4641b5463eb39885bf53b6950c09bfc9..52ef2891eb9b6c8c8db763c9836fc6470746c68f 100644
7588
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
7689
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
7790
@@ -275,7 +275,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
7891
origItemStack.setCount(originalItemCount);
7992
}
8093
}
8194
- if (foundItem && level.paperConfig().hopper.cooldownWhenFull) { // Inventory was full - cooldown
82-
+ if (foundItem && level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Inventory was full - cooldown // Leaves
95+
+ if (foundItem && level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Inventory was full - cooldown // Leaves - mc technical survival mode
8396
hopper.setCooldown(level.spigotConfig.hopperTransfer);
8497
}
8598
return false;
@@ -88,7 +101,7 @@ index d7755e6a4641b5463eb39885bf53b6950c09bfc9..1dd5538be2e45514c9009f60494ae5fc
88101
origItemStack.setCount(originalItemCount);
89102

90103
- if (level.paperConfig().hopper.cooldownWhenFull) {
91-
+ if (level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Leaves
104+
+ if (level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Leaves - mc technical survival mode
92105
applyCooldown(hopper);
93106
}
94107

leaves-server/minecraft-patches/features/0092-Vanilla-hopper.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Subject: [PATCH] Vanilla hopper
66
This is a temporary solution designed to attempt to restore the vanilla behavior of the funnel while preserving optimizations as much as possible. It should ultimately be replaced by the optimization solution provided by lithium.
77

88
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
9-
index 3145b6ee853f720c5c201f5dd464645eb039100c..deb67f1636d7fcb24946019d36fbdf97c022e764 100644
9+
index 84092e0182dc2c20e57b4c14a52c3a9622318fd4..a6776df02ec71470696836cf89b942cc34c782ec 100644
1010
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
1111
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
1212
@@ -307,36 +307,58 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -90,5 +90,5 @@ index 3145b6ee853f720c5c201f5dd464645eb039100c..deb67f1636d7fcb24946019d36fbdf97
9090
- origItemStack.setCount(originalItemCount);
9191
+ // Leaves end - fix vanilla
9292

93-
if (level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Leaves
93+
if (level.paperConfig().hopper.cooldownWhenFull && !org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode) { // Leaves - mc technical survival mode
9494
applyCooldown(hopper);

0 commit comments

Comments
 (0)