9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00

[ci skip] cleanup

This commit is contained in:
Dreeam
2025-01-21 07:14:02 -05:00
parent bc87c65880
commit ffd718f6bf
14 changed files with 683 additions and 127 deletions

View File

@@ -5,14 +5,14 @@ Subject: [PATCH] Rebrand
diff --git a/net/minecraft/CrashReport.java b/net/minecraft/CrashReport.java
index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..60afaa49e54ff1a52bc52b99ad160682a68dcd97 100644
index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..5a9173b6039ee8404529a04904c5f9e9343d74d8 100644
--- a/net/minecraft/CrashReport.java
+++ b/net/minecraft/CrashReport.java
@@ -30,6 +30,7 @@ public class CrashReport {
private boolean trackingStackTrace = true;
private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0];
private final SystemReport systemReport = new SystemReport();
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER OR GALE! REPORT TO LEAF INSTEAD!", ""); // Leaf - Purpur
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER OR GALE! REPORT TO LEAF INSTEAD!", ""); // Leaf - Rebrand
public CrashReport(String title, Throwable exception) {
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper
@@ -21,7 +21,7 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..60afaa49e54ff1a52bc52b99ad160682
public String getFriendlyReport(ReportType type) {
- return this.getFriendlyReport(type, List.of());
+ return this.getFriendlyReport(type, extraInfo); // Leaf - Purpur
+ return this.getFriendlyReport(type, extraInfo); // Leaf - Rebrand
}
@Nullable
@@ -30,12 +30,12 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..60afaa49e54ff1a52bc52b99ad160682
public boolean saveToFile(Path path, ReportType type) {
- return this.saveToFile(path, type, List.of());
+ return this.saveToFile(path, type, extraInfo); // Leaf - Purpur
+ return this.saveToFile(path, type, extraInfo); // Leaf - Rebrand
}
public SystemReport getSystemReport() {
diff --git a/net/minecraft/world/damagesource/DamageSource.java b/net/minecraft/world/damagesource/DamageSource.java
index aea139e47a0866c63c0fc6728840e5ad92a26403..3d8d7460ab31e9183e26ada76ad05378f8bb925d 100644
index aea139e47a0866c63c0fc6728840e5ad92a26403..ac7352a2b264abf4db4b89f39a2c86f390776336 100644
--- a/net/minecraft/world/damagesource/DamageSource.java
+++ b/net/minecraft/world/damagesource/DamageSource.java
@@ -66,7 +66,7 @@ public class DamageSource {
@@ -43,12 +43,12 @@ index aea139e47a0866c63c0fc6728840e5ad92a26403..3d8d7460ab31e9183e26ada76ad05378
public DamageSource customEventDamager(Entity entity) {
if (this.directEntity != null) {
- throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to Paper, if you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues)"); // Gale - branding changes
+ throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to Paper, if you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues)"); // Gale - branding changes // Leaf
+ throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to Paper, if you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues)"); // Gale - branding changes // Leaf - Rebrand
}
DamageSource damageSource = this.cloneInstance();
damageSource.customEventDamager = entity;
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 3abb8aefcca325e28f0af07bd859be74f0aee08d..7fff86a4956f59b2f4a9f7e283256879c034c1b8 100644
index 3abb8aefcca325e28f0af07bd859be74f0aee08d..320e9e24711d2a326313b3a202c7ef987f71f229 100644
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -288,7 +288,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -56,7 +56,7 @@ index 3abb8aefcca325e28f0af07bd859be74f0aee08d..7fff86a4956f59b2f4a9f7e283256879
but we do want people to report thread issues to Gale.
*/
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER OR GALE - You may ask for help on Discord, but do not file an issue. These error messages can not be removed. - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues)");
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER OR LEAF - You may ask for help on Discord, but do not file an issue. These error messages can not be removed. - If you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues)"); // Leaf
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER OR LEAF - You may ask for help on Discord, but do not file an issue. These error messages can not be removed. - If you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues)"); // Leaf - Rebrand
// Gale end - branding changes
}

View File

@@ -11,26 +11,26 @@ Add per world config
Add config reload
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
index 9aa664537cc37e44db46d5a2a64ae3116938c681..841546cef2a98427ae78ca2a07693391eb0d3035 100644
index 9aa664537cc37e44db46d5a2a64ae3116938c681..748816e3f325468f523bdb8dfb94992883ed1989 100644
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -112,6 +112,7 @@ public class Main {
Bootstrap.bootStrap();
Bootstrap.validate();
Util.startTimerHackThread();
+ org.dreeam.leaf.config.LeafConfig.loadConfig(); // Leaf
+ org.dreeam.leaf.config.LeafConfig.loadConfig(); // Leaf - Leaf config
Path path1 = Paths.get("server.properties");
DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support
dedicatedServerSettings.forceSave();
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 0da1eeab6a2f8336283a62ebcb3aa0d1b1933c85..8794ae06ac574b399cc2dbb3fa61b6ef51d8062d 100644
index 0da1eeab6a2f8336283a62ebcb3aa0d1b1933c85..bef8b563ea638a613c140000e69f53d12e17fb2b 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.tick();
// Paper end
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
+ org.dreeam.leaf.config.LeafConfig.regSparkExtraConfig(); // Leaf - Leaf Config
+ org.dreeam.leaf.config.LeafConfig.regSparkExtraConfig(); // Leaf - Leaf config
Arrays.fill(this.recentTps, 20);
// Paper start - further improve server tick loop
long tickSection = Util.getNanos();

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Fix Pufferfish and Purpur patches
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index f348202ae2cc78586cf4b7926180c659b5fca56f..66418672e548a022980a403de912e05984137f37 100644
index 73d052596310098abe69b247f45cdb118297f1ee..b12d0833e1499f97a02b7fedc398fcfd9c391e08 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -65,7 +65,7 @@ index 35fd539eb2bfe60ad17ab1e558a01273666acc54..445bbdc8da7f1fdbddfc4d8787d78fea
this.values[this.vp++ & 0xFF] = (int)(l * 100L / Runtime.getRuntime().maxMemory());
this.repaint();
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
index fde7de56f46502a1cc268318684e67ac2fbd5157..77676b38912e558a4ba0c65a009af4cdc531c5fa 100644
index fde7de56f46502a1cc268318684e67ac2fbd5157..f618d3cf32be10b9ca3833231e653975bcf56e4c 100644
--- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -625,7 +625,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -73,7 +73,7 @@ index fde7de56f46502a1cc268318684e67ac2fbd5157..77676b38912e558a4ba0c65a009af4cd
// Gale start - MultiPaper - skip unnecessary mob spawning computations
} else {
- spawnState = null;
+ lastSpawnState = null; // Leaf - Pufferfish - Optimize mob spawning
+ lastSpawnState = null; // Leaf - Fix Pufferfish and Purpur patches - Optimize mob spawning
}
// Gale end - MultiPaper - skip unnecessary mob spawning computations
int _int = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
@@ -91,13 +91,14 @@ index 1a9664a3b00dcb8171145c3bb3f3f704272aaa73..ec6276f3335fd963c8554dbc43adf5bd
this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect
return;
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 3f97182bc9ef86476c25deb3106dab7152014edf..3e1a5ef63d97e2ad43d98c5736a185ade7afb4bd 100644
index 3f97182bc9ef86476c25deb3106dab7152014edf..539cd1fe6ff15a4ebcbd65f41d8711d1f4ce5b97 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -536,21 +536,31 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -536,23 +536,35 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// Purpur end - Add canSaveToDisk to Entity
+ // Leaf start - Fix Pufferfish and Purpur patches
+ // Gale start - JettPack - optimize sun burn tick - cache eye blockpos
+ private BlockPos cached_eye_blockpos;
+ private net.minecraft.world.phys.Vec3 cached_position;
@@ -134,9 +135,12 @@ index 3f97182bc9ef86476c25deb3106dab7152014edf..3e1a5ef63d97e2ad43d98c5736a185ad
+ return false; // Gale - JettPack - optimize sun burn tick - optimizations and cache eye blockpos - diff on change
}
// Purpur end - copied from Mob - API for any mob to burn daylight
+ // Leaf end - Fix Pufferfish and Purpur patches
public Entity(EntityType<?> entityType, Level level) {
this.type = entityType;
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 8728aba69ac24b52e6221ea2ddd8fc6d5a26f3f3..956c1b5422c177e0da5140c4184720d10aa4e790 100644
index 8728aba69ac24b52e6221ea2ddd8fc6d5a26f3f3..9f36d063168c262fec7e69a96bad375b4eaff797 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1024,13 +1024,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -144,16 +148,16 @@ index 8728aba69ac24b52e6221ea2ddd8fc6d5a26f3f3..956c1b5422c177e0da5140c4184720d1
EntityType<?> type = lookingEntity.getType();
// Purpur start - Mob head visibility percent
- if (type == EntityType.SKELETON && itemBySlot.is(Items.SKELETON_SKULL)) {
+ if (type == EntityType.SKELETON && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.SKELETON_SKULL)) {
+ if (type == EntityType.SKELETON && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.SKELETON_SKULL)) { // Leaf - Fix Pufferfish and Purpur patches
d *= lookingEntity.level().purpurConfig.skeletonHeadVisibilityPercent;
- } else if (type == EntityType.ZOMBIE && itemBySlot.is(Items.ZOMBIE_HEAD)) {
+ } else if (type == EntityType.ZOMBIE && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.ZOMBIE_HEAD)) {
+ } else if (type == EntityType.ZOMBIE && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.ZOMBIE_HEAD)) { // Leaf - Fix Pufferfish and Purpur patches
d *= lookingEntity.level().purpurConfig.zombieHeadVisibilityPercent;
- } else if ((type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE) && itemBySlot.is(Items.PIGLIN_HEAD)) {
+ } else if ((type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) {
+ } else if ((type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) { // Leaf - Fix Pufferfish and Purpur patches
d *= lookingEntity.level().purpurConfig.piglinHeadVisibilityPercent;
- } else if (type == EntityType.CREEPER && itemBySlot.is(Items.CREEPER_HEAD)) {
+ } else if (type == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) {
+ } else if (type == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) { // Leaf - Fix Pufferfish and Purpur patches
d *= lookingEntity.level().purpurConfig.creeperHeadVisibilityPercent;
}
// Purpur end - Mob head visibility percent
@@ -174,15 +178,17 @@ index 7b8804844ab5636323bc8d136c775f1e9591e89c..14d9dceacc82cc6c085dab8f52e59a31
// Purpur - implemented in Entity - API for any mob to burn daylight
return super.isSunBurnTick();
diff --git a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
index 6f96551ba91da214054b89a255254ca597977cc0..3f1a80db81c0f0cd7bb1d5df4a2c2cb1b6a8d2d9 100644
index 6f96551ba91da214054b89a255254ca597977cc0..3d5ac6976efd66b29657749f83d03ba77ebea2eb 100644
--- a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
+++ b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
@@ -22,19 +22,15 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
@@ -22,20 +22,16 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
@Override
protected void doTick(ServerLevel level, Villager entity) {
+ // Purpur start - Option for Villager Clerics to farm Nether Wart - make sure clerics don't wander to soul sand when the option is off
// Gale start - Lithium - skip secondary POI sensor if absent
- // Gale start - Lithium - skip secondary POI sensor if absent
+ // Leaf start - Fix Pufferfish and Purpur patches
+ // Purpur: Option for Villager Clerics to farm Nether Wart - make sure clerics don't wander to soul sand when the option is off
+ // Gale: Lithium - skip secondary POI sensor if absent
var secondaryPoi = entity.getVillagerData().getProfession().secondaryPoi();
- if (secondaryPoi.isEmpty()) {
- entity.getBrain().eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
@@ -196,12 +202,13 @@ index 6f96551ba91da214054b89a255254ca597977cc0..3f1a80db81c0f0cd7bb1d5df4a2c2cb1
brain.eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
return;
}
+ // Gale end - Lithium - skip secondary POI sensor if absent
// Purpur end - Option for Villager Clerics to farm Nether Wart
- // Purpur end - Option for Villager Clerics to farm Nether Wart
+ // Leaf end - Fix Pufferfish and Purpur patches
ResourceKey<Level> resourceKey = level.dimension();
BlockPos blockPos = entity.blockPosition();
List<GlobalPos> list = Lists.newArrayList();
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index 10d2a1138d814b83ce4233205a7f0ab2ed1f399d..e9f683ef9ce55e67748f1a16a45efe26bb4ff331 100644
index 10d2a1138d814b83ce4233205a7f0ab2ed1f399d..a642533eddd1aca96ad57c2a219f00870a615f71 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -287,8 +287,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -210,12 +217,12 @@ index 10d2a1138d814b83ce4233205a7f0ab2ed1f399d..e9f683ef9ce55e67748f1a16a45efe26
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
AllayAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
index 1323cedcacd3072cdf5f1eac644688cd098b53db..ed15200319d0e50b495f2d0d912093d670fdb309 100644
index 1323cedcacd3072cdf5f1eac644688cd098b53db..ad19bbd6989bfb98966872b304f6ece0e869f7a4 100644
--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -347,8 +347,7 @@ public class Axolotl extends Animal implements VariantHolder<Axolotl.Variant>, B
@@ -224,12 +231,12 @@ index 1323cedcacd3072cdf5f1eac644688cd098b53db..ed15200319d0e50b495f2d0d912093d6
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
AxolotlAi.updateActivity(this);
if (!this.isNoAi()) {
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
index 4ecc6b6247a6ab14a5d46f9a05d5df8412ae2a5f..a962b06ac3fc15604b7fbf5e2109f1cc8d238ac7 100644
index 4ecc6b6247a6ab14a5d46f9a05d5df8412ae2a5f..4aadf347811df904e634ea7ebcc5361ea6cb7e7a 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -241,8 +241,7 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
@@ -238,12 +245,12 @@ index 4ecc6b6247a6ab14a5d46f9a05d5df8412ae2a5f..a962b06ac3fc15604b7fbf5e2109f1cc
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
FrogAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
index 0ca35514a920dddf230d749bc1a5fe15f1c7940a..8468f7095e1db7a54042ce9a97d991d3105bd535 100644
index 0ca35514a920dddf230d749bc1a5fe15f1c7940a..ec9db1c12426db80dbf02d704e6c7ec867d59f6f 100644
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -133,8 +133,7 @@ public class Tadpole extends AbstractFish {
@@ -252,12 +259,12 @@ index 0ca35514a920dddf230d749bc1a5fe15f1c7940a..8468f7095e1db7a54042ce9a97d991d3
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
TadpoleAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
index 7107cc2462e7d33bca413a1b051822cc1bd61bfa..2e3ca6b17862494218042e6d84970a60272c2b40 100644
index 7107cc2462e7d33bca413a1b051822cc1bd61bfa..a1cdb620368fe7f6eb95734af903d66257156b26 100644
--- a/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
@@ -223,8 +223,7 @@ public class Goat extends Animal {
@@ -266,12 +273,12 @@ index 7107cc2462e7d33bca413a1b051822cc1bd61bfa..2e3ca6b17862494218042e6d84970a60
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
GoatAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
index 24725009d7619b0e9043d7d0039f805c611aedf6..a9d381568625ca871dcaf40b363d46692f45591d 100644
index 24725009d7619b0e9043d7d0039f805c611aedf6..f89a3c4f75a40981aff7253cd04bcdf3c8c26952 100644
--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -203,8 +203,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
@@ -280,12 +287,12 @@ index 24725009d7619b0e9043d7d0039f805c611aedf6..a9d381568625ca871dcaf40b363d4669
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
HoglinAi.updateActivity(this);
if (this.isConverting()) {
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index 242b2545b6082f567d0bb7900ef06ded3c0fdcdd..85306d8f0fba3b5dcb244df54c949b45e07ee4e7 100644
index 242b2545b6082f567d0bb7900ef06ded3c0fdcdd..fe6eb99ea3d2deda317efe90ecb0987bb367313f 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -382,8 +382,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -294,12 +301,12 @@ index 242b2545b6082f567d0bb7900ef06ded3c0fdcdd..85306d8f0fba3b5dcb244df54c949b45
protected void customServerAiStep(ServerLevel level) {
- //if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider // Leaf - Fix Pufferfish and Purpur patches
this.getBrain().tick(level, this);
PiglinAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
index bd93ee97982038789114f17ee369208fc6413796..0b1263000f872431e44abfdd57134b6efe245641 100644
index bd93ee97982038789114f17ee369208fc6413796..aa201bd227dffb7442ec62b86b2435f025be732d 100644
--- a/net/minecraft/world/entity/projectile/Projectile.java
+++ b/net/minecraft/world/entity/projectile/Projectile.java
@@ -74,7 +74,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -307,7 +314,7 @@ index bd93ee97982038789114f17ee369208fc6413796..0b1263000f872431e44abfdd57134b6e
if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) {
if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) {
- this.discard();
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Leaf - Purpur
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Leaf - Fix Pufferfish and Purpur patches - Purpur
} else if (maxProjectileChunkLoadsConfig.perProjectile.resetMovementAfterReachLimit) {
this.setDeltaMovement(0, this.getDeltaMovement().y, 0);
}

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Remove vanilla username check
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 634933a6c98a0043cfe3ff4122dfc53e3c20a192..780d85f4afe221f8861b248457bfe6462f0b8a2a 100644
index 634933a6c98a0043cfe3ff4122dfc53e3c20a192..fec84afa274f8b7cc3e0e9bf500e672c16be53d4 100644
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -183,7 +183,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -13,13 +13,13 @@ index 634933a6c98a0043cfe3ff4122dfc53e3c20a192..780d85f4afe221f8861b248457bfe646
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet");
// Paper start - Validate usernames
- if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
+ if (!org.dreeam.leaf.config.modules.misc.RemoveVanillaUsernameCheck.enabled // Leaf - Remove Vanilla username check
+ if (!org.dreeam.leaf.config.modules.misc.RemoveVanillaUsernameCheck.enabled // Leaf - Remove vanilla username check
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
&& io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation
&& !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) {
Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
diff --git a/net/minecraft/server/players/GameProfileCache.java b/net/minecraft/server/players/GameProfileCache.java
index 6fb3712f33a84a3612752dcfd9e97d67066f610e..c01e998c97e1226e7e10984493d67612dfe7ae15 100644
index 6fb3712f33a84a3612752dcfd9e97d67066f610e..bf99d901349316382edc3090689ca6c785ed4ba0 100644
--- a/net/minecraft/server/players/GameProfileCache.java
+++ b/net/minecraft/server/players/GameProfileCache.java
@@ -77,7 +77,7 @@ public class GameProfileCache {
@@ -27,25 +27,25 @@ index 6fb3712f33a84a3612752dcfd9e97d67066f610e..c01e998c97e1226e7e10984493d67612
private static Optional<GameProfile> lookupGameProfile(GameProfileRepository profileRepo, String name) {
- if (!StringUtil.isValidPlayerName(name)) {
+ if (!StringUtil.isValidPlayerName(name, false)) { // Leaf start - Remove Vanilla username check - Directly return, skip unnecessary following logic
+ if (!StringUtil.isValidPlayerName(name, false)) { // Leaf start - Remove vanilla username check - Directly return, skip unnecessary following logic
return createUnknownProfile(name);
} else {
final AtomicReference<GameProfile> atomicReference = new AtomicReference<>();
diff --git a/net/minecraft/util/StringUtil.java b/net/minecraft/util/StringUtil.java
index c3a99fe7b49858bc0ca9a7f800b0db40465f6901..43f62ce3d967f534cdc4e388233933a5ad4af762 100644
index c3a99fe7b49858bc0ca9a7f800b0db40465f6901..0024997e16c1792feb52caf453ec90830ff411b3 100644
--- a/net/minecraft/util/StringUtil.java
+++ b/net/minecraft/util/StringUtil.java
@@ -64,6 +64,13 @@ public class StringUtil {
}
public static boolean isValidPlayerName(String playerName) {
+ // Leaf start - Remove Vanilla username check
+ // Leaf start - Remove vanilla username check
+ return isValidPlayerName(playerName, org.dreeam.leaf.config.modules.misc.RemoveVanillaUsernameCheck.enabled);
+ }
+
+ public static boolean isValidPlayerName(String playerName, boolean bypassCheck) {
+ if (bypassCheck) return playerName.length() <= 16;
+ // Leaf end- Remove Vanilla username check
+ // Leaf end- Remove vanilla username check
return playerName.length() <= 16 && playerName.chars().filter(i -> i <= 32 || i >= 127).findAny().isEmpty();
}

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Wed, 12 Oct 2022 14:48:45 -0400
Subject: [PATCH] Remove Spigot Check for Broken BungeeCord Configurations
Subject: [PATCH] Remove Spigot check for broken BungeeCord configurations
diff --git a/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java

View File

@@ -7,10 +7,10 @@ This Check is added in 1.17.x -> 1.18.x that updated by Mojang.
By removing this check, it gives ability for hackers to use some modules of hack clients.
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ec6276f3335fd963c8554dbc43adf5bdfe3d2412..162617ea984e54898f19c16ff8e7d759bddcc190 100644
index ec6276f3335fd963c8554dbc43adf5bdfe3d2412..cb0b9a13d744115f45489677912c854a64afc03a 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1998,8 +1998,14 @@ public class ServerGamePacketListenerImpl
@@ -1998,8 +1998,13 @@ public class ServerGamePacketListenerImpl
BlockPos blockPos = hitResult.getBlockPos();
if (this.player.canInteractWithBlock(blockPos, 1.0)) {
Vec3 vec3 = location.subtract(Vec3.atCenterOf(blockPos));
@@ -18,10 +18,9 @@ index ec6276f3335fd963c8554dbc43adf5bdfe3d2412..162617ea984e54898f19c16ff8e7d759
- if (Math.abs(vec3.x()) < 1.0000001 && Math.abs(vec3.y()) < 1.0000001 && Math.abs(vec3.z()) < 1.0000001) {
+ // Leaf start - Remove UseItemOnPacket Too Far Check and make it configurable
+ //double d = 1.0000001;
+ if (org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance <= 0
+ || (Math.abs(vec3.x()) < org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance
+ && Math.abs(vec3.y()) < org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance
+ && Math.abs(vec3.z()) < org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance)
+ final double maxDistance = org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance;
+ if (maxDistance <= 0
+ || (Math.abs(vec3.x()) < maxDistance && Math.abs(vec3.y()) < maxDistance && Math.abs(vec3.z()) < maxDistance)
+ ) {
+ // Leaf end - Remove UseItemOnPacket Too Far Check and make it configurable
Direction direction = hitResult.getDirection();

View File

@@ -15,7 +15,7 @@ This is a fully vanilla optimization. Improves: [Blast]Furnace/Campfire/Smoker/S
This was mostly made for the auto crafting table, since the performance boost is much more visible while using that mod
diff --git a/net/minecraft/world/item/crafting/RecipeManager.java b/net/minecraft/world/item/crafting/RecipeManager.java
index aefaac550b58be479cc282f52dea91d4b1e530f6..400d11b0a7266cee642546aa190553e60ad0723b 100644
index aefaac550b58be479cc282f52dea91d4b1e530f6..4bd1b514f91c0a2c9261b41211a4a341f784a995 100644
--- a/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/net/minecraft/world/item/crafting/RecipeManager.java
@@ -167,7 +167,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
@@ -23,20 +23,23 @@ index aefaac550b58be479cc282f52dea91d4b1e530f6..400d11b0a7266cee642546aa190553e6
public <I extends RecipeInput, T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> recipeType, I input, Level level) {
// CraftBukkit start
- List<RecipeHolder<T>> list = this.recipes.getRecipesFor(recipeType, input, level).toList();
+ List<RecipeHolder<T>> list = this.recipes.getRecipesForList(recipeType, input, level); // Leaf - Carpet-Fixes - Remove streams to be faster
+ List<RecipeHolder<T>> list = this.recipes.getRecipesForList(recipeType, input, level); // Leaf - Carpet-Fixes - Use optimized RecipeManager - Remove streams to be faster
return (list.isEmpty()) ? Optional.empty() : Optional.of(list.getLast()); // CraftBukkit - SPIGOT-4638: last recipe gets priority
// CraftBukkit end
}
diff --git a/net/minecraft/world/item/crafting/RecipeMap.java b/net/minecraft/world/item/crafting/RecipeMap.java
index 098753ddd215b6ef5915fac71d8c4f0b19cf4142..c888daa9a8cdc8168cca173acb69b3c3919c5bda 100644
index 098753ddd215b6ef5915fac71d8c4f0b19cf4142..68c2b7e532f0cfa373b7c698da7778c58fe98364 100644
--- a/net/minecraft/world/item/crafting/RecipeMap.java
+++ b/net/minecraft/world/item/crafting/RecipeMap.java
@@ -75,4 +75,24 @@ public class RecipeMap {
@@ -73,6 +73,26 @@ public class RecipeMap {
}
public <I extends RecipeInput, T extends Recipe<I>> Stream<RecipeHolder<T>> getRecipesFor(RecipeType<T> type, I input, Level level) {
return input.isEmpty() ? Stream.empty() : this.byType(type).stream().filter(recipeHolder -> recipeHolder.value().matches(input, level));
- return input.isEmpty() ? Stream.empty() : this.byType(type).stream().filter(recipeHolder -> recipeHolder.value().matches(input, level));
+ return input.isEmpty() ? Stream.empty() : this.byType(type).stream().filter(recipeHolder -> recipeHolder.value().matches(input, level)); // Leaf - Carpet-Fixes - Use optimized RecipeManager - diff on change
}
+
+ // Leaf start - Carpet-Fixes - Remove streams to be faster
+ // Leaf start - Carpet-Fixes - Use optimized RecipeManager - Remove streams to be faster
+ public <I extends RecipeInput, T extends Recipe<I>> java.util.List<RecipeHolder<T>> getRecipesForList(RecipeType<T> type, I input, Level level) {
+ java.util.List<RecipeHolder<T>> list;
+
@@ -46,13 +49,13 @@ index 098753ddd215b6ef5915fac71d8c4f0b19cf4142..c888daa9a8cdc8168cca173acb69b3c3
+ list = new java.util.ArrayList<>();
+ }
+
+ for (RecipeHolder<T> recipeholder : this.byType(type)) {
+ if (recipeholder.value().matches(input, level)) {
+ list.add(recipeholder);
+ for (RecipeHolder<T> recipeHolder : this.byType(type)) {
+ if (recipeHolder.value().matches(input, level)) {
+ list.add(recipeHolder);
+ }
+ }
+
+ return list;
+ }
+ // Leaf end - Carpet-Fixes - Remove streams to be faster
+ // Leaf end - Carpet-Fixes - Use optimized RecipeManager - Remove streams to be faster
}

View File

@@ -8,30 +8,30 @@ Original license: GPL v3
Original project: https://github.com/Akarin-project/Akarin
diff --git a/net/minecraft/server/players/StoredUserList.java b/net/minecraft/server/players/StoredUserList.java
index 39483f7b453d6faedeccc1ab1eda76669395ea5a..7f2031559fe84e9b57fb4c3fb55cee022b442ebb 100644
index 39483f7b453d6faedeccc1ab1eda76669395ea5a..1fe9be5381b43d240593c8394977d7ffccd1132b 100644
--- a/net/minecraft/server/players/StoredUserList.java
+++ b/net/minecraft/server/players/StoredUserList.java
@@ -97,13 +97,23 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
}
public void save() throws IOException {
+ Runnable saveTask = () -> {// Leaf - Akarin - Save json list async
+ Runnable saveTask = () -> {// Leaf - Akarin - Save Json list asynchronously
this.removeExpired(); // Paper - remove expired values before saving
JsonArray jsonArray = new JsonArray();
this.map.values().stream().map(storedEntry -> Util.make(new JsonObject(), storedEntry::serialize)).forEach(jsonArray::add);
+ try { // Leaf - Akarin - Save json list async
+ try { // Leaf - Akarin - Save Json list asynchronously
try (BufferedWriter writer = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
GSON.toJson(jsonArray, GSON.newJsonWriter(writer));
}
+
+ // Leaf start - Akarin - Save json list async
+ // Leaf start - Akarin - Save Json list asynchronously
+ } catch (Exception e) {
+ StoredUserList.LOGGER.warn("Failed to async save {}", this.file, e);
+ StoredUserList.LOGGER.warn("Failed to save {} asynchronously", this.file, e);
+ }
+ };
+ io.papermc.paper.util.MCUtil.scheduleAsyncTask(saveTask);
+ // Leaf end - Akarin - Save json list async
+ // Leaf end - Akarin - Save Json list asynchronously
}
public void load() throws IOException {

View File

@@ -57,10 +57,10 @@ index 2da6609ab8398c5c537e9065b3a82693f43200e2..9db63f122539134003a5955aabae9706
} else {
getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true);
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 465e34eb906ec78f49ff1183b635e77a1fcaa758..39b01b3d96d03bca4c33eaddfc54edef23c3df0c 100644
index 356feb908e533d7f1cddf6eb8238823c9bf8250a..3085fa1c463b3652edb03d2b86fd43a564e4d1b4 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2255,6 +2255,8 @@ public class ServerGamePacketListenerImpl
@@ -2254,6 +2254,8 @@ public class ServerGamePacketListenerImpl
}
}
@@ -69,7 +69,7 @@ index 465e34eb906ec78f49ff1183b635e77a1fcaa758..39b01b3d96d03bca4c33eaddfc54edef
@Override
public void handleChatCommand(ServerboundChatCommandPacket packet) {
this.tryHandleChat(packet.command(), () -> {
@@ -2275,6 +2277,32 @@ public class ServerGamePacketListenerImpl
@@ -2274,6 +2276,32 @@ public class ServerGamePacketListenerImpl
LOGGER.info("{} issued server command: {}", this.player.getScoreboardName(), prefixedCommand);
}
@@ -102,7 +102,7 @@ index 465e34eb906ec78f49ff1183b635e77a1fcaa758..39b01b3d96d03bca4c33eaddfc54edef
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), prefixedCommand, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event);
@@ -2312,11 +2340,37 @@ public class ServerGamePacketListenerImpl
@@ -2311,11 +2339,37 @@ public class ServerGamePacketListenerImpl
private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) {
// CraftBukkit start

View File

@@ -46,10 +46,10 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89
public String toString() {
return "Reference{" + this.key + "=" + this.value + "}";
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index f7f330758dce7c38e0e0e8ba420df4d83f765cf1..42a6b0b6fe13b448583988b3d2f840540b5670e7 100644
index 034e10e912ab9b4b5435ad88c0cd4183c8b5c1a1..e6e347cf7e58d5e088057bce60464fab05dcde88 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1982,7 +1982,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1984,7 +1984,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
FluidState fluidState = this.level().getFluidState(blockPos);
double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos);
if (d > eyeY) {

View File

@@ -8,10 +8,10 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o
these methods more able to be inlined by the JIT compiler.
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 42a6b0b6fe13b448583988b3d2f840540b5670e7..35d931407f726b7f8e83f40d220313eb472b20a8 100644
index e6e347cf7e58d5e088057bce60464fab05dcde88..f344e24faee04c1657affba2a6adb8c27fb2d56b 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -2193,30 +2193,38 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2195,30 +2195,38 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return new Vec3(this.xOld, this.yOld, this.zOld);
}