Skip to content

Commit

Permalink
Update MC technical mode
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Aug 13, 2023
1 parent 4a1a51f commit c553b0d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/server/0053-MC-Technical-Survival-Mode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ index ad2177cdbc61a6f41c7e2ed81af262d4ffe7d861..4a0da4436998fc21506996216bd9c094
} catch (Exception ex) {
throw new RuntimeException("Could not reload paper configuration files", ex);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c47df8d18be8ac7d32a16e6662dbbd850efc8e8a..4453664ac91eb727e340ace3b6bdb083541f816c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2692,7 +2692,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity);
// Paper start - Reset pearls when they stop being ticked
- if (paperConfig().fixes.disableUnloadedChunkEnderpearlExploit && entity instanceof net.minecraft.world.entity.projectile.ThrownEnderpearl pearl) {
+ if (!top.leavesmc.leaves.LeavesConfig.mcTechnicalMode && paperConfig().fixes.disableUnloadedChunkEnderpearlExploit && entity instanceof net.minecraft.world.entity.projectile.ThrownEnderpearl pearl) { // Leaves - mc technical mode
pearl.cachedOwner = null;
pearl.ownerUUID = null;
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
index ffc5b68c4246a7111845230a75552bb15875a209..990cdebf1b9e64a5001c71411e64f68108aef47f 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
Expand Down Expand Up @@ -69,6 +82,19 @@ index e30d5ae3e2900f43d7cafde71b8196f26e872841..79bfd7b5da13197c2d3f7dbf9c3154dd
final GossipContainer.EntityGossips playerReputation = this.getGossips().gossips.get(entity.getUUID());
if (playerReputation != null) {
playerReputation.remove(GossipType.MAJOR_POSITIVE);
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 1b7cf6d06bdf36f146656727511a461f2520762e..0eb8c5dc84c3ca346dcaf6fd50c13d3b060f87d1 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -115,7 +115,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
if (nbt.hasUUID("Owner")) {
this.ownerUUID = nbt.getUUID("Owner");
this.cachedOwner = null;
- if (this instanceof ThrownEnderpearl && this.level() != null && this.level().paperConfig().fixes.disableUnloadedChunkEnderpearlExploit) { this.ownerUUID = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
+ if (this instanceof ThrownEnderpearl && this.level() != null && this.level().paperConfig().fixes.disableUnloadedChunkEnderpearlExploit && !top.leavesmc.leaves.LeavesConfig.mcTechnicalMode) { this.ownerUUID = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit // Leaves - mc technical mode
}

this.leftOwner = nbt.getBoolean("LeftOwner");
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index b0f23ebceb2f492b21eb95ee9496621f46c975c7..79f8e34032cde65a7d2a1f21bc32e0c22aff8efc 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
Expand Down

0 comments on commit c553b0d

Please sign in to comment.