mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +00:00
[ci skip] cleanup
This commit is contained in:
@@ -1,2 +1,5 @@
|
|||||||
# This file is auto generated, any changes may be overridden!
|
# This file is auto generated, any changes may be overridden!
|
||||||
# See CONTRIBUTING.md on how to add access transformers.
|
# See CONTRIBUTING.md on how to add access transformers.
|
||||||
|
public net.minecraft.world.entity.Entity blockPosition
|
||||||
|
public net.minecraft.world.entity.Entity position
|
||||||
|
public net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece LOGGER
|
||||||
|
|||||||
@@ -888,7 +888,7 @@ index 6540b2d6a1062d883811ce240c49d30d1925b291..9500fc2f841819b0d40e8a6e48353bb2
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 13db4411e5bd635315b27b92a3e97bf286d14577..93b0265e3b1ea133877682721ff28d735d9b688b 100644
|
index 3fe8ae3b49163f1b124562165dbb27ab96a6eb05..ae89315cb35a55d0dd0e36db35cba467209762c7 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -77,8 +77,6 @@ import net.minecraft.util.ProgressListener;
|
@@ -77,8 +77,6 @@ import net.minecraft.util.ProgressListener;
|
||||||
@@ -1198,33 +1198,31 @@ index 407bd4b8026869bc14ee5e79ff80e7bdd1a07bcb..6e2a3d4171dbb2a30ba18f1657236917
|
|||||||
|
|
||||||
void onResourceManagerReload(ResourceManager resourceManager);
|
void onResourceManagerReload(ResourceManager resourceManager);
|
||||||
diff --git a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
diff --git a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||||
index 64b0508ef21952c65b0b967b756b2a4c64d96899..bd7005d29ec81039e6fa1c487c9e5633fa90bd5e 100644
|
index 64b0508ef21952c65b0b967b756b2a4c64d96899..b6b03fbbd669e6331b30255df5419611c38e0495 100644
|
||||||
--- a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
--- a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||||
+++ b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
+++ b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||||
@@ -2,7 +2,8 @@ package net.minecraft.server.packs.resources;
|
@@ -2,7 +2,6 @@ package net.minecraft.server.packs.resources;
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
-import net.minecraft.util.profiling.Profiler;
|
-import net.minecraft.util.profiling.Profiler;
|
||||||
+
|
|
||||||
+import net.minecraft.util.profiling.InactiveProfiler;
|
|
||||||
import net.minecraft.util.profiling.ProfilerFiller;
|
import net.minecraft.util.profiling.ProfilerFiller;
|
||||||
|
|
||||||
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
||||||
@@ -10,9 +11,9 @@ public abstract class SimplePreparableReloadListener<T> implements PreparableRel
|
@@ -10,9 +9,9 @@ public abstract class SimplePreparableReloadListener<T> implements PreparableRel
|
||||||
public final CompletableFuture<Void> reload(
|
public final CompletableFuture<Void> reload(
|
||||||
PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor
|
PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor
|
||||||
) {
|
) {
|
||||||
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, Profiler.get()), backgroundExecutor)
|
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, Profiler.get()), backgroundExecutor)
|
||||||
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, InactiveProfiler.INSTANCE), backgroundExecutor) // Gale - Purpur - remove vanilla profiler
|
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, net.minecraft.util.profiling.InactiveProfiler.INSTANCE), backgroundExecutor) // Gale - Purpur - remove vanilla profiler
|
||||||
.thenCompose(barrier::wait)
|
.thenCompose(barrier::wait)
|
||||||
- .thenAcceptAsync(object -> this.apply((T)object, manager, Profiler.get()), gameExecutor);
|
- .thenAcceptAsync(object -> this.apply((T)object, manager, Profiler.get()), gameExecutor);
|
||||||
+ .thenAcceptAsync(object -> this.apply((T)object, manager, InactiveProfiler.INSTANCE), gameExecutor); // Gale - Purpur - remove vanilla profiler
|
+ .thenAcceptAsync(object -> this.apply((T)object, manager, net.minecraft.util.profiling.InactiveProfiler.INSTANCE), gameExecutor); // Gale - Purpur - remove vanilla profiler
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler);
|
protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler);
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 1d0151a042ed5de4e235ef0bdac1a0e8240e85e7..3594240116d3b61dbf838490df7a30345d7d8925 100644
|
index 525210788937af70f9a0df1c66e0064d20552c1b..386291cf55f6a36e813719abbd2206401352c862 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -78,8 +78,6 @@ import net.minecraft.tags.FluidTags;
|
@@ -78,8 +78,6 @@ import net.minecraft.tags.FluidTags;
|
||||||
@@ -1812,7 +1810,7 @@ index 97adf8142cdd322c4873c420ed760e9dee34da23..a04d71967976731b4858d44ac138b7ac
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
|
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
index 504a30ead8d2bb13d559acbde62f9d44a5dda1cb..25c0c27979f49f08d0cc150de9afe6112f115666 100644
|
index c91e1f8e5fd39bcc48f9f0bf002770b2dff74404..c4c0ebb9b43018d795e02b2ab15d38bc475e4330 100644
|
||||||
--- a/net/minecraft/world/entity/animal/goat/Goat.java
|
--- a/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
|
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
@@ -21,8 +21,6 @@ import net.minecraft.tags.ItemTags;
|
@@ -21,8 +21,6 @@ import net.minecraft.tags.ItemTags;
|
||||||
@@ -2222,7 +2220,7 @@ index 761fdcd4a4e18f45547afd8edff44f61c6eeacb4..3a7707427691a7862499a7efa3b39ead
|
|||||||
// Paper start - Prevent block entity and entity crashes
|
// Paper start - Prevent block entity and entity crashes
|
||||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||||
diff --git a/net/minecraft/world/level/pathfinder/PathFinder.java b/net/minecraft/world/level/pathfinder/PathFinder.java
|
diff --git a/net/minecraft/world/level/pathfinder/PathFinder.java b/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||||
index 81de6c1bbef1cafd3036e736dd305fbedc8368c6..d48057d387b6937a0194e5300eb1cb46dec2896b 100644
|
index 81de6c1bbef1cafd3036e736dd305fbedc8368c6..c2baadcdceb1df6a881d6f73aa4eb4dd264bcdfe 100644
|
||||||
--- a/net/minecraft/world/level/pathfinder/PathFinder.java
|
--- a/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||||
+++ b/net/minecraft/world/level/pathfinder/PathFinder.java
|
+++ b/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||||
@@ -12,9 +12,6 @@ import java.util.function.Function;
|
@@ -12,9 +12,6 @@ import java.util.function.Function;
|
||||||
@@ -2245,12 +2243,11 @@ index 81de6c1bbef1cafd3036e736dd305fbedc8368c6..d48057d387b6937a0194e5300eb1cb46
|
|||||||
// Set<Target> set = targetPositions.keySet(); // Paper
|
// Set<Target> set = targetPositions.keySet(); // Paper
|
||||||
node.g = 0.0F;
|
node.g = 0.0F;
|
||||||
node.h = this.getBestH(node, positions); // Paper - optimize collection
|
node.h = this.getBestH(node, positions); // Paper - optimize collection
|
||||||
@@ -129,7 +123,7 @@ public class PathFinder {
|
@@ -129,7 +123,6 @@ public class PathFinder {
|
||||||
best = path;
|
best = path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- profilerFiller.pop();
|
- profilerFiller.pop();
|
||||||
+
|
|
||||||
return best;
|
return best;
|
||||||
// Paper end - Perf: remove streams and optimize collection
|
// Paper end - Perf: remove streams and optimize collection
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/item/crafting/ShapelessRecipe.java b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
diff --git a/net/minecraft/world/item/crafting/ShapelessRecipe.java b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..03df50182a13978c88b05eff13e33de325de08c4 100644
|
index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..6a53e97d27d746621892ced4ca5b4a56b6bc4c23 100644
|
||||||
--- a/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
--- a/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
+++ b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
+++ b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
@@ -23,8 +23,15 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@@ -23,8 +23,16 @@ public class ShapelessRecipe implements CraftingRecipe {
|
||||||
final List<Ingredient> ingredients;
|
final List<Ingredient> ingredients;
|
||||||
@Nullable
|
@Nullable
|
||||||
private PlacementInfo placementInfo;
|
private PlacementInfo placementInfo;
|
||||||
@@ -50,13 +50,14 @@ index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..03df50182a13978c88b05eff13e33de3
|
|||||||
+ // Gale start - Airplane - simpler ShapelessRecipe comparison for vanilla
|
+ // Gale start - Airplane - simpler ShapelessRecipe comparison for vanilla
|
||||||
+ this(group, category, result, ingredients, false);
|
+ this(group, category, result, ingredients, false);
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ public ShapelessRecipe(String group, CraftingBookCategory category, ItemStack result, List<Ingredient> ingredients, boolean isBukkit) {
|
+ public ShapelessRecipe(String group, CraftingBookCategory category, ItemStack result, List<Ingredient> ingredients, boolean isBukkit) {
|
||||||
+ this.isBukkit = isBukkit;
|
+ this.isBukkit = isBukkit;
|
||||||
+ // Gale end - Airplane - simpler ShapelessRecipe comparison for vanilla
|
+ // Gale end - Airplane - simpler ShapelessRecipe comparison for vanilla
|
||||||
this.group = group;
|
this.group = group;
|
||||||
this.category = category;
|
this.category = category;
|
||||||
this.result = result;
|
this.result = result;
|
||||||
@@ -72,6 +79,28 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@@ -72,6 +80,29 @@ public class ShapelessRecipe implements CraftingRecipe {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(CraftingInput input, Level level) {
|
public boolean matches(CraftingInput input, Level level) {
|
||||||
@@ -75,6 +76,7 @@ index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..03df50182a13978c88b05eff13e33de3
|
|||||||
+ continue inventory;
|
+ continue inventory;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index af71a71ff11b418a43728fd464b1e673d593140f..689fede25ae3f73ebe897ab9b8abd70ead032f06 100644
|
index ad0bb896d6ea669ce88bfe6490319e8ba7a29001..168f50523b00ab8d43cbcc5ea5675a840762be11 100644
|
||||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -49,6 +49,45 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
@@ -49,6 +49,55 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
super(entityType, level);
|
super(entityType, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,33 +46,43 @@ index af71a71ff11b418a43728fd464b1e673d593140f..689fede25ae3f73ebe897ab9b8abd70e
|
|||||||
+ @Override
|
+ @Override
|
||||||
+ public void setPos(double x, double y, double z) {
|
+ public void setPos(double x, double y, double z) {
|
||||||
+ int currentTick = net.minecraft.server.MinecraftServer.currentTick;
|
+ int currentTick = net.minecraft.server.MinecraftServer.currentTick;
|
||||||
|
+
|
||||||
+ if (chunksLoadedInTick != currentTick) {
|
+ if (chunksLoadedInTick != currentTick) {
|
||||||
+ chunksLoadedInTick = currentTick;
|
+ chunksLoadedInTick = currentTick;
|
||||||
+ chunksLoadedThisTick = 0;
|
+ chunksLoadedThisTick = 0;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ int previousX = Mth.floor(this.getX()) >> 4, previousZ = Mth.floor(this.getZ()) >> 4;
|
+ int previousX = Mth.floor(this.getX()) >> 4, previousZ = Mth.floor(this.getZ()) >> 4;
|
||||||
+ int newX = Mth.floor(x) >> 4, newZ = Mth.floor(z) >> 4;
|
+ int newX = Mth.floor(x) >> 4, newZ = Mth.floor(z) >> 4;
|
||||||
|
+
|
||||||
+ if (previousX != newX || previousZ != newZ) {
|
+ if (previousX != newX || previousZ != newZ) {
|
||||||
+ boolean isLoaded = ((net.minecraft.server.level.ServerChunkCache) this.level().getChunkSource()).getChunkAtIfLoadedImmediately(newX, newZ) != null;
|
+ boolean isLoaded = ((net.minecraft.server.level.ServerChunkCache) this.level().getChunkSource()).getChunkAtIfLoadedImmediately(newX, newZ) != null;
|
||||||
|
+
|
||||||
+ if (!isLoaded) {
|
+ if (!isLoaded) {
|
||||||
+ var maxProjectileChunkLoadsConfig = this.level().galeConfig().smallOptimizations.maxProjectileChunkLoads;
|
+ var maxProjectileChunkLoadsConfig = this.level().galeConfig().smallOptimizations.maxProjectileChunkLoads;
|
||||||
+ int maxChunkLoadsPerTick = maxProjectileChunkLoadsConfig.perTick;
|
+ int maxChunkLoadsPerTick = maxProjectileChunkLoadsConfig.perTick;
|
||||||
|
+
|
||||||
+ if (maxChunkLoadsPerTick >= 0 && chunksLoadedThisTick > maxChunkLoadsPerTick) {
|
+ if (maxChunkLoadsPerTick >= 0 && chunksLoadedThisTick > maxChunkLoadsPerTick) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ int maxChunkLoadsPerProjectile = maxProjectileChunkLoadsConfig.perProjectile.max;
|
+ int maxChunkLoadsPerProjectile = maxProjectileChunkLoadsConfig.perProjectile.max;
|
||||||
|
+
|
||||||
+ if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) {
|
+ if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) {
|
||||||
+ if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) {
|
+ if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) {
|
||||||
+ this.discard();
|
+ this.discard();
|
||||||
+ } else if (maxProjectileChunkLoadsConfig.perProjectile.resetMovementAfterReachLimit) {
|
+ } else if (maxProjectileChunkLoadsConfig.perProjectile.resetMovementAfterReachLimit) {
|
||||||
+ this.setDeltaMovement(0, this.getDeltaMovement().y, 0);
|
+ this.setDeltaMovement(0, this.getDeltaMovement().y, 0);
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ chunksLoadedThisTick++;
|
+ chunksLoadedThisTick++;
|
||||||
+ this.chunksLoadedByProjectile++;
|
+ this.chunksLoadedByProjectile++;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ super.setPos(x, y, z);
|
+ super.setPos(x, y, z);
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - Airplane - reduce projectile chunk loading
|
+ // Gale end - Airplane - reduce projectile chunk loading
|
||||||
|
|||||||
@@ -31,16 +31,17 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
index 4b5ffd278e0e9d47100e5452949e8d757bbfece4..c7a77b16ba032eb24b070fd6a5f0f824b3cbcc1a 100644
|
index 4b5ffd278e0e9d47100e5452949e8d757bbfece4..00c0d2432b4a0e46f85f1f422772e6c43ef5222c 100644
|
||||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
@@ -309,11 +309,18 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -309,11 +309,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
private boolean teleport(double x, double y, double z) {
|
private boolean teleport(double x, double y, double z) {
|
||||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);
|
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);
|
||||||
|
|
||||||
- while (mutableBlockPos.getY() > this.level().getMinY() && !this.level().getBlockState(mutableBlockPos).blocksMotion()) {
|
- while (mutableBlockPos.getY() > this.level().getMinY() && !this.level().getBlockState(mutableBlockPos).blocksMotion()) {
|
||||||
+ // Gale start - Airplane - single chunk lookup
|
+ // Gale start - Airplane - single chunk lookup
|
||||||
+ net.minecraft.world.level.chunk.LevelChunk chunk = this.level().getChunkIfLoaded(mutableBlockPos);
|
+ net.minecraft.world.level.chunk.LevelChunk chunk = this.level().getChunkIfLoaded(mutableBlockPos);
|
||||||
|
+
|
||||||
+ if (chunk == null) {
|
+ if (chunk == null) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ index bd888ef719b9bfc93bace0b1d0fb771ac659f515..5d1e83658bb9646cf56885627256f0be
|
|||||||
}
|
}
|
||||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 00caebfabfc459eed86f0e6e2cc3f4b628f7ef99..d17020508a1f8d6c7da630b89a11db9bf7d1748f 100644
|
index 00caebfabfc459eed86f0e6e2cc3f4b628f7ef99..181eec21013cc37dd252e3df047ad9ddda8ece19 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -2015,6 +2015,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2015,6 +2015,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return this.lastClimbablePos;
|
return this.lastClimbablePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,6 +61,7 @@ index 00caebfabfc459eed86f0e6e2cc3f4b628f7ef99..d17020508a1f8d6c7da630b89a11db9b
|
|||||||
+ this.cachedOnClimbable = this.onClimbable();
|
+ this.cachedOnClimbable = this.onClimbable();
|
||||||
+ this.lastClimbingPosition = this.blockPosition();
|
+ this.lastClimbingPosition = this.blockPosition();
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ return this.cachedOnClimbable;
|
+ return this.cachedOnClimbable;
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - Airplane - cache on climbable check
|
+ // Gale end - Airplane - cache on climbable check
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||||
index dafcba6eeba62a5e35ad53c9b38605a17139d8b0..a8ad7c304eca5a1b5b8247077fcb148d760d6ac9 100644
|
index dafcba6eeba62a5e35ad53c9b38605a17139d8b0..0c65addf32b09991392dcc1de8b477543fd02a81 100644
|
||||||
--- a/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
--- a/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||||
+++ b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
+++ b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||||
@@ -19,25 +19,35 @@ public class EntityCollisionContext implements CollisionContext {
|
@@ -19,25 +19,35 @@ public class EntityCollisionContext implements CollisionContext {
|
||||||
@@ -79,7 +79,7 @@ index dafcba6eeba62a5e35ad53c9b38605a17139d8b0..a8ad7c304eca5a1b5b8247077fcb148d
|
|||||||
this(
|
this(
|
||||||
entity.isDescending(),
|
entity.isDescending(),
|
||||||
entity.getY(),
|
entity.getY(),
|
||||||
@@ -45,16 +55,31 @@ public class EntityCollisionContext implements CollisionContext {
|
@@ -45,16 +55,19 @@ public class EntityCollisionContext implements CollisionContext {
|
||||||
canStandOnFluid ? fluidState -> true : (entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : fluidState -> false),
|
canStandOnFluid ? fluidState -> true : (entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : fluidState -> false),
|
||||||
entity
|
entity
|
||||||
);
|
);
|
||||||
@@ -91,29 +91,17 @@ index dafcba6eeba62a5e35ad53c9b38605a17139d8b0..a8ad7c304eca5a1b5b8247077fcb148d
|
|||||||
@Override
|
@Override
|
||||||
public boolean isHoldingItem(Item item) {
|
public boolean isHoldingItem(Item item) {
|
||||||
- return this.heldItem.is(item);
|
- return this.heldItem.is(item);
|
||||||
+ // Gale start - Airplane - make EntityCollisionContext a live representation
|
+ return this.entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem().is(item) : ItemStack.EMPTY.is(item); // Gale - Airplane - make EntityCollisionContext a live representation
|
||||||
+ Entity entity = this.entity;
|
|
||||||
+ if (entity instanceof LivingEntity livingEntity) {
|
|
||||||
+ return livingEntity.getMainHandItem().is(item);
|
|
||||||
+ }
|
|
||||||
+ return ItemStack.EMPTY.is(item);
|
|
||||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canStandOnFluid(FluidState fluid1, FluidState fluid2) {
|
public boolean canStandOnFluid(FluidState fluid1, FluidState fluid2) {
|
||||||
- return this.canStandOnFluid.test(fluid2) && !fluid1.getType().isSame(fluid2.getType());
|
- return this.canStandOnFluid.test(fluid2) && !fluid1.getType().isSame(fluid2.getType());
|
||||||
+ // Gale start - Airplane - make EntityCollisionContext a live representation
|
+ return this.entity instanceof LivingEntity livingEntity && livingEntity.canStandOnFluid(fluid2) && !fluid1.getType().isSame(fluid2.getType()); // Gale - Airplane - make EntityCollisionContext a live representation
|
||||||
+ Entity entity = this.entity;
|
|
||||||
+ if (entity instanceof LivingEntity livingEntity) {
|
|
||||||
+ return livingEntity.canStandOnFluid(fluid2) && !fluid1.getType().isSame(fluid2.getType());
|
|
||||||
+ }
|
|
||||||
+ return false;
|
|
||||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,12 +89,12 @@ public class EntityCollisionContext implements CollisionContext {
|
@@ -64,12 +77,12 @@ public class EntityCollisionContext implements CollisionContext {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDescending() {
|
public boolean isDescending() {
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
||||||
Date: Wed, 23 Nov 2022 23:32:51 +0100
|
|
||||||
Subject: [PATCH] Optimize entity coordinate key
|
|
||||||
|
|
||||||
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
||||||
Gale - https://galemc.org
|
|
||||||
|
|
||||||
This patch is based on the following patch:
|
|
||||||
"Optimize entity coordinate key"
|
|
||||||
By: Kevin Raneri <kevin.raneri@gmail.com>
|
|
||||||
As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
|
||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
||||||
|
|
||||||
* Pufferfish description *
|
|
||||||
|
|
||||||
When executing getCoordinateKey for entities (a hotpath), the JVM is
|
|
||||||
required to repeatedly cast doubles to longs. The performance impact of
|
|
||||||
this depends on the CPU architecture, but generally switching between
|
|
||||||
FPU and ALU incurs a significant performance hit. The casted/rounded
|
|
||||||
data is already available in the blockPosition struct, so we use that
|
|
||||||
instead of re-doing the casting.
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
||||||
index 72da610c4d0301ddf2940bbc067430d05ff46684..0bbac68dbd891da8892ba40fc18578c4f9e67c11 100644
|
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
|
||||||
@@ -225,7 +225,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
public double yo;
|
|
||||||
public double zo;
|
|
||||||
private Vec3 position;
|
|
||||||
- private BlockPos blockPosition;
|
|
||||||
+ public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
|
||||||
private ChunkPos chunkPosition;
|
|
||||||
private Vec3 deltaMovement = Vec3.ZERO;
|
|
||||||
private float yRot;
|
|
||||||
@@ -28,7 +28,7 @@ but is so much cheaper than the suffocation check that it's worth
|
|||||||
keeping it.
|
keeping it.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index d17020508a1f8d6c7da630b89a11db9bf7d1748f..1fbc971f4bb2473dc67021b4cec9228109e0c43b 100644
|
index 181eec21013cc37dd252e3df047ad9ddda8ece19..3a44887fa81676d4c06c10eae5d451eace7f595f 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -448,7 +448,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -448,7 +448,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
@@ -43,16 +43,13 @@ index d17020508a1f8d6c7da630b89a11db9bf7d1748f..1fbc971f4bb2473dc67021b4cec92281
|
|||||||
this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F);
|
this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F);
|
||||||
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||||
double d = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
|
double d = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
|
||||||
@@ -1354,6 +1357,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1354,6 +1357,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return this.getHealth() <= 0.0F;
|
return this.getHealth() <= 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Gale start - Pufferfish - reduce in wall checks
|
+ // Gale start - Pufferfish - reduce in wall checks
|
||||||
+ public boolean couldPossiblyBeHurt(float amount) {
|
+ private boolean couldPossiblyBeHurt(float amount) {
|
||||||
+ if ((float) this.invulnerableTime > (float) this.invulnerableDuration / 2.0F && amount <= this.lastHurt) {
|
+ return !((float) this.invulnerableTime > (float) this.invulnerableDuration / 2.0F) || !(amount <= this.lastHurt);
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ return true;
|
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - Pufferfish - reduce in wall checks
|
+ // Gale end - Pufferfish - reduce in wall checks
|
||||||
+
|
+
|
||||||
@@ -17,7 +17,7 @@ Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|||||||
Only do an item "suck in" action once per second
|
Only do an item "suck in" action once per second
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 52a7ed0d991758bad0dcedcb7f97fb15ac6c6d04..45c152856c46d11f3bd790a01fac89a7c3b68af1 100644
|
index 52a7ed0d991758bad0dcedcb7f97fb15ac6c6d04..8e450c9d0111c0ce44feb386cf8b2715e407bf25 100644
|
||||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -143,7 +143,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -143,7 +143,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
@@ -34,7 +34,7 @@ index 52a7ed0d991758bad0dcedcb7f97fb15ac6c6d04..45c152856c46d11f3bd790a01fac89a7
|
|||||||
}
|
}
|
||||||
// Paper end - EAR 2
|
// Paper end - EAR 2
|
||||||
|
|
||||||
@@ -227,9 +233,29 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -227,9 +233,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||||
@@ -47,10 +47,12 @@ index 52a7ed0d991758bad0dcedcb7f97fb15ac6c6d04..45c152856c46d11f3bd790a01fac89a7
|
|||||||
+ // Gale start - EMC - reduce hopper item checks
|
+ // Gale start - EMC - reduce hopper item checks
|
||||||
+ private void markNearbyHopperCartsAsImmune() {
|
+ private void markNearbyHopperCartsAsImmune() {
|
||||||
+ var config = this.level().galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart;
|
+ var config = this.level().galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart;
|
||||||
|
+
|
||||||
+ // No need to mark hopper minecarts as immune if they can pull every tick anyway
|
+ // No need to mark hopper minecarts as immune if they can pull every tick anyway
|
||||||
+ if (config.interval <= 1) {
|
+ if (config.interval <= 1) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ if (config.temporaryImmunity.duration > 0 && this.isAlive() && this.onGround && !this.isRemoved() && (config.temporaryImmunity.nearbyItemMaxAge == -1 || this.age <= config.temporaryImmunity.nearbyItemMaxAge) && this.age % Math.max(1, config.temporaryImmunity.checkForMinecartNearItemInterval) == 0 && config.temporaryImmunity.maxItemHorizontalDistance >= 0 && config.temporaryImmunity.maxItemVerticalDistance >= 0) {
|
+ if (config.temporaryImmunity.duration > 0 && this.isAlive() && this.onGround && !this.isRemoved() && (config.temporaryImmunity.nearbyItemMaxAge == -1 || this.age <= config.temporaryImmunity.nearbyItemMaxAge) && this.age % Math.max(1, config.temporaryImmunity.checkForMinecartNearItemInterval) == 0 && config.temporaryImmunity.maxItemHorizontalDistance >= 0 && config.temporaryImmunity.maxItemVerticalDistance >= 0) {
|
||||||
+ net.minecraft.world.phys.AABB aabb = this.getBoundingBox().inflate(config.temporaryImmunity.maxItemHorizontalDistance, config.temporaryImmunity.maxItemVerticalDistance, config.temporaryImmunity.maxItemHorizontalDistance);
|
+ net.minecraft.world.phys.AABB aabb = this.getBoundingBox().inflate(config.temporaryImmunity.maxItemHorizontalDistance, config.temporaryImmunity.maxItemVerticalDistance, config.temporaryImmunity.maxItemHorizontalDistance);
|
||||||
+ for (Entity entity : this.level().getEntities(this, aabb)) {
|
+ for (Entity entity : this.level().getEntities(this, aabb)) {
|
||||||
@@ -103,7 +105,7 @@ index 5f042e294db605827000123252b0df646968f897..e1cc15f28fe8da23b74ff4504c5b2da2
|
|||||||
|
|
||||||
double getLevelY();
|
double getLevelY();
|
||||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..276cb0dffaa253a6c13b4c68d8c703732118d0d1 100644
|
index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..2549dd08b60cd81dcbf3412ed71cfc40729ae468 100644
|
||||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -540,7 +540,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -540,7 +540,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
@@ -115,7 +117,7 @@ index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..276cb0dffaa253a6c13b4c68d8c70373
|
|||||||
for (ItemEntity itemEntity : getItemsAtAndAbove(level, hopper)) {
|
for (ItemEntity itemEntity : getItemsAtAndAbove(level, hopper)) {
|
||||||
if (addItem(hopper, itemEntity)) {
|
if (addItem(hopper, itemEntity)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -816,6 +816,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -816,6 +816,34 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
return stack1.getCount() < stack1.getMaxStackSize() && ItemStack.isSameItemSameComponents(stack1, stack2); // Paper - Perf: Optimize Hoppers; used to return true for full itemstacks?!
|
return stack1.getCount() < stack1.getMaxStackSize() && ItemStack.isSameItemSameComponents(stack1, stack2); // Paper - Perf: Optimize Hoppers; used to return true for full itemstacks?!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,15 +133,18 @@ index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..276cb0dffaa253a6c13b4c68d8c70373
|
|||||||
+ if (minecartHopper.pickupImmunity > net.minecraft.server.MinecraftServer.currentTick) {
|
+ if (minecartHopper.pickupImmunity > net.minecraft.server.MinecraftServer.currentTick) {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ suckInterval = level.galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart.interval;
|
+ suckInterval = level.galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart.interval;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ suckInterval = level.galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.interval;
|
+ suckInterval = level.galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.interval;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ if (suckInterval <= 1) {
|
+ if (suckInterval <= 1) {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ final int hopperId = (int) hopper.getLevelX() + (int) hopper.getLevelY() + (int) hopper.getLevelZ();
|
+ final int hopperId = (int) hopper.getLevelX() + (int) hopper.getLevelY() + (int) hopper.getLevelZ();
|
||||||
|
+
|
||||||
+ return (hopper.getAndIncrementAttemptCounter() + hopperId) % suckInterval == 0;
|
+ return (hopper.getAndIncrementAttemptCounter() + hopperId) % suckInterval == 0;
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - EMC - reduce hopper item checks
|
+ // Gale end - EMC - reduce hopper item checks
|
||||||
@@ -18,10 +18,10 @@ Helps 1.8 Farms let hoppers pick it up before Villager
|
|||||||
due to our hopper changes
|
due to our hopper changes
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
diff --git a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||||
index 2664d72c3b6906d0505df2e63c0e5075eba9461b..800bc29502ed46bd77cb04c0a79143898f109a48 100644
|
index 2664d72c3b6906d0505df2e63c0e5075eba9461b..e7f74b4f54069ffdf74f029639cbf0756f2db095 100644
|
||||||
--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||||
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||||
@@ -87,7 +87,16 @@ public class BehaviorUtils {
|
@@ -87,7 +87,17 @@ public class BehaviorUtils {
|
||||||
Vec3 vec3 = offset.subtract(entity.position());
|
Vec3 vec3 = offset.subtract(entity.position());
|
||||||
vec3 = vec3.normalize().multiply(speedMultiplier.x, speedMultiplier.y, speedMultiplier.z);
|
vec3 = vec3.normalize().multiply(speedMultiplier.x, speedMultiplier.y, speedMultiplier.z);
|
||||||
itemEntity.setDeltaMovement(vec3);
|
itemEntity.setDeltaMovement(vec3);
|
||||||
@@ -29,6 +29,7 @@ index 2664d72c3b6906d0505df2e63c0e5075eba9461b..800bc29502ed46bd77cb04c0a7914389
|
|||||||
+ // Gale start - EMC - reduce villager item re-pickup
|
+ // Gale start - EMC - reduce villager item re-pickup
|
||||||
+ if (entity instanceof net.minecraft.world.entity.npc.Villager) {
|
+ if (entity instanceof net.minecraft.world.entity.npc.Villager) {
|
||||||
+ int repickupDelay = entity.level().galeConfig().smallOptimizations.reducedIntervals.villagerItemRepickup;
|
+ int repickupDelay = entity.level().galeConfig().smallOptimizations.reducedIntervals.villagerItemRepickup;
|
||||||
|
+
|
||||||
+ if (repickupDelay <= -1) {
|
+ if (repickupDelay <= -1) {
|
||||||
+ itemEntity.setDefaultPickUpDelay();
|
+ itemEntity.setDefaultPickUpDelay();
|
||||||
+ } else {
|
+ } else {
|
||||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
index 5d1e83658bb9646cf56885627256f0be7a84831e..b9c8bcf3136939a1c8f215af53c4fa343b344e38 100644
|
index 5d1e83658bb9646cf56885627256f0be7a84831e..54916fe57ceeab24936ce50709402ecf1fcd9a10 100644
|
||||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
@@ -53,27 +53,39 @@ public final class ActivationRange {
|
@@ -53,27 +53,41 @@ public final class ActivationRange {
|
||||||
if (entity.activationType == ActivationType.VILLAGER) {
|
if (entity.activationType == ActivationType.VILLAGER) {
|
||||||
if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
|
if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
|
||||||
world.wakeupInactiveRemainingVillagers--;
|
world.wakeupInactiveRemainingVillagers--;
|
||||||
@@ -44,9 +44,11 @@ index 5d1e83658bb9646cf56885627256f0be7a84831e..b9c8bcf3136939a1c8f215af53c4fa34
|
|||||||
+
|
+
|
||||||
+ private static int getWakeUpDurationWithVariance(Entity entity, int wakeUpDuration) {
|
+ private static int getWakeUpDurationWithVariance(Entity entity, int wakeUpDuration) {
|
||||||
+ double deviation = entity.level().galeConfig().gameplayMechanics.entityWakeUpDurationRatioStandardDeviation;
|
+ double deviation = entity.level().galeConfig().gameplayMechanics.entityWakeUpDurationRatioStandardDeviation;
|
||||||
|
+
|
||||||
+ if (deviation <= 0) {
|
+ if (deviation <= 0) {
|
||||||
+ return wakeUpDuration;
|
+ return wakeUpDuration;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ return (int) Math.min(Integer.MAX_VALUE, Math.max(1, Math.round(wakeUpDuration * wakeUpDurationRandom.nextGaussian(1, deviation))));
|
+ return (int) Math.min(Integer.MAX_VALUE, Math.max(1, Math.round(wakeUpDuration * wakeUpDurationRandom.nextGaussian(1, deviation))));
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - variable entity wake-up duration
|
+ // Gale end - variable entity wake-up duration
|
||||||
@@ -25,7 +25,7 @@ index b349da64650f914db8212e19b3c05ba92e74a1a3..9c2f9bc5e5bef96fb7ad0f04aa1cb72d
|
|||||||
public boolean isRealPlayer; // Paper
|
public boolean isRealPlayer; // Paper
|
||||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 089a903607c0d16dc2744981a6dcb23115df010d..1a2b9a2e2cabf542523982f6f8742840933b0f4a 100644
|
index dd8bb7d929ff5e0ea6e4d250899896c66ae4f707..6f025ce8785feb5901ac0bf92fac950d87c1285d 100644
|
||||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2325,7 +2325,7 @@ public class ServerGamePacketListenerImpl
|
@@ -2325,7 +2325,7 @@ public class ServerGamePacketListenerImpl
|
||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 1a2b9a2e2cabf542523982f6f8742840933b0f4a..1fa2bb9e9866ad6f0394327df934388b7fcd7f93 100644
|
index 6f025ce8785feb5901ac0bf92fac950d87c1285d..2ec59747ed7102a90d637f3b6fb6520339b2c57e 100644
|
||||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2479,7 +2479,7 @@ public class ServerGamePacketListenerImpl
|
@@ -2479,7 +2479,7 @@ public class ServerGamePacketListenerImpl
|
||||||
@@ -17,16 +17,17 @@ Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
This can help to hide annoying scanning bots from showing up in console.
|
This can help to hide annoying scanning bots from showing up in console.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 6689aeacf50d1498e8d23cce696fb4fecbd1cf39..d9c0831dd58a5cdf1b23444489ac04629f8916f9 100644
|
index 6689aeacf50d1498e8d23cce696fb4fecbd1cf39..0fdf22af66945c1b6987e07f6c8a167110033b53 100644
|
||||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -146,6 +146,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -146,6 +146,15 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
|
||||||
public void disconnect(Component reason) {
|
public void disconnect(Component reason) {
|
||||||
try {
|
try {
|
||||||
+ // Gale start - Pufferfish - do not log disconnections with null id
|
+ // Gale start - Pufferfish - do not log disconnections with null id
|
||||||
+ if (!org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.nullIdDisconnections && this.authenticatedProfile != null && this.authenticatedProfile.getId() == null) {
|
+ if (!org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.nullIdDisconnections && this.authenticatedProfile != null && this.authenticatedProfile.getId() == null) {
|
||||||
+ var reasonString = reason.getString();
|
+ var reasonString = reason.getString();
|
||||||
|
+
|
||||||
+ if ("Disconnected".equals(reasonString) || Component.translatable("multiplayer.disconnect.generic").getString().equals(reasonString)) {
|
+ if ("Disconnected".equals(reasonString) || Component.translatable("multiplayer.disconnect.generic").getString().equals(reasonString)) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
@@ -13,18 +13,9 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java b/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
diff --git a/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java b/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||||
index 5c91b11fdb12cd51d9d6c662f4ba7a7f78891e26..c63c357a28e7911c7a227e911a4dc36d914da9b5 100644
|
index 786fa3a33334ca6b4b43b89b6fde9de5c41a3b28..42600faa2a2393d71d93b6818ac64ab030737772 100644
|
||||||
--- a/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
--- a/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||||
+++ b/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
+++ b/net/minecraft/world/level/levelgen/structure/PoolElementStructurePiece.java
|
||||||
@@ -27,7 +27,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemp
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
|
|
||||||
public class PoolElementStructurePiece extends StructurePiece {
|
|
||||||
- private static final Logger LOGGER = LogUtils.getLogger();
|
|
||||||
+ public static final Logger LOGGER = LogUtils.getLogger(); // Gale - EMC - softly log invalid pool element errors - private -> public
|
|
||||||
protected final StructurePoolElement element;
|
|
||||||
protected BlockPos position;
|
|
||||||
private final int groundLevelDelta;
|
|
||||||
@@ -80,7 +80,7 @@ public class PoolElementStructurePiece extends StructurePiece {
|
@@ -80,7 +80,7 @@ public class PoolElementStructurePiece extends StructurePiece {
|
||||||
DynamicOps<Tag> dynamicOps = context.registryAccess().createSerializationContext(NbtOps.INSTANCE);
|
DynamicOps<Tag> dynamicOps = context.registryAccess().createSerializationContext(NbtOps.INSTANCE);
|
||||||
StructurePoolElement.CODEC
|
StructurePoolElement.CODEC
|
||||||
@@ -37,22 +37,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
diff --git a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||||
index 722f378bb3726200b6fe88948bf1e1d3514a7b5c..dc3c709912367fc2789b789f178d16feb3c0a2ed 100644
|
index 722f378bb3726200b6fe88948bf1e1d3514a7b5c..b896f13f5aea09dafb1f1e74e1ef90dc53eae2ae 100644
|
||||||
--- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
--- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||||
+++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
+++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
|
||||||
@@ -103,7 +103,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
@@ -103,7 +103,11 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||||
this.strafingTime = 0;
|
this.strafingTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.strafingTime > -1) {
|
- if (this.strafingTime > -1) {
|
||||||
+ // Gale start - Purpur - fix MC-121706
|
+ // Gale start - Purpur - fix MC-121706
|
||||||
+ boolean hasStrafingTime = this.strafingTime > -1;
|
+ boolean hasStrafingTime = this.strafingTime > -1;
|
||||||
|
+
|
||||||
+ if (hasStrafingTime) {
|
+ if (hasStrafingTime) {
|
||||||
+ // Gale end - Purpur - fix MC-121706
|
+ // Gale end - Purpur - fix MC-121706
|
||||||
if (d > this.attackRadiusSqr * 0.75F) {
|
if (d > this.attackRadiusSqr * 0.75F) {
|
||||||
this.strafingBackwards = false;
|
this.strafingBackwards = false;
|
||||||
} else if (d < this.attackRadiusSqr * 0.25F) {
|
} else if (d < this.attackRadiusSqr * 0.25F) {
|
||||||
@@ -116,7 +119,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
@@ -116,7 +120,10 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mob.lookAt(target, 30.0F, 30.0F);
|
this.mob.lookAt(target, 30.0F, 30.0F);
|
||||||
@@ -181,7 +181,7 @@ index 68727deaedd55aa86e76fbc6cc2cfb67913f7add..bad5787de2034dbb0eabb9458a47a89e
|
|||||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
||||||
.xmap(
|
.xmap(
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 2caeb69306a42d02b7a5c27e00fb969e392ac6ba..2b9b683023943435a86c42e3a61e0b3329df19d8 100644
|
index 6c486f1c04c9fed6e3a07e4d9aa1e79f8fdd7015..c697576d3ae22fbb7ae869fa099bffc8ac5cb2e5 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1224,7 +1224,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
@@ -1224,7 +1224,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
@@ -13,18 +13,9 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 0bbac68dbd891da8892ba40fc18578c4f9e67c11..b68013f83db13f4aeb94be4777c5341ce8ebfde4 100644
|
index df972d47848f9cb74be269019b196c4f2699bfc1..c08a7a2d12fbf67dc675f79e8452b90b99eca86b 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -224,7 +224,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
public double xo;
|
|
||||||
public double yo;
|
|
||||||
public double zo;
|
|
||||||
- private Vec3 position;
|
|
||||||
+ public Vec3 position; // Gale - JettPack - optimize sun burn tick - private -> public
|
|
||||||
public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
|
||||||
private ChunkPos chunkPosition;
|
|
||||||
private Vec3 deltaMovement = Vec3.ZERO;
|
|
||||||
@@ -2024,10 +2024,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -2024,10 +2024,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
|||||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 1fbc971f4bb2473dc67021b4cec9228109e0c43b..d341bf76b4679470a7fb5ff081b79425e4bc1264 100644
|
index 3a44887fa81676d4c06c10eae5d451eace7f595f..830ae2b569b533f2ded23826c48727f1d7fd0272 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -570,10 +570,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -570,10 +570,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index b68013f83db13f4aeb94be4777c5341ce8ebfde4..9f674f579a3a0f6fe9eb71fa2cace7f0a93d5702 100644
|
index c08a7a2d12fbf67dc675f79e8452b90b99eca86b..61c929cb391c122095edc0d655f095a487cfce75 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -233,6 +233,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -233,6 +233,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -13,7 +13,7 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 9f674f579a3a0f6fe9eb71fa2cace7f0a93d5702..ec303fb52aee7a0bc1df42a628fac24276d059de 100644
|
index 61c929cb391c122095edc0d655f095a487cfce75..bbcfb7b535514d8e394b31f74d2bbc2ba90e7498 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -884,7 +884,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -884,7 +884,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -13,7 +13,7 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 2b9b683023943435a86c42e3a61e0b3329df19d8..8734feabddeb259249213f0084f072a3f12e7daf 100644
|
index c697576d3ae22fbb7ae869fa099bffc8ac5cb2e5..ba0b5961535f0dbffda5216a6e4657ea85f30eb7 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1559,6 +1559,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
@@ -1559,6 +1559,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index d9c0831dd58a5cdf1b23444489ac04629f8916f9..c3c85970a5d4bf85fa138a90a33a69f0336334a8 100644
|
index 0fdf22af66945c1b6987e07f6c8a167110033b53..36c442b195db6403e2d86cac4120970fc63010ab 100644
|
||||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -127,7 +127,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -127,7 +127,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index ec303fb52aee7a0bc1df42a628fac24276d059de..411c3829ac99b4a3673419d230e098ff05c272f3 100644
|
index bbcfb7b535514d8e394b31f74d2bbc2ba90e7498..55c05f5e8e5045292f77621fed78a0498c9b53bf 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4679,6 +4679,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4679,6 +4679,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -28,10 +28,10 @@ index ec303fb52aee7a0bc1df42a628fac24276d059de..411c3829ac99b4a3673419d230e098ff
|
|||||||
return this.chunkPosition;
|
return this.chunkPosition;
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index d341bf76b4679470a7fb5ff081b79425e4bc1264..4e414a78a6acfb90d5e212398617580a3f34be9b 100644
|
index 830ae2b569b533f2ded23826c48727f1d7fd0272..062e83860a3f9e3a40c513ca389d628ba936f465 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -2032,19 +2032,43 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2029,8 +2029,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
public boolean onClimbableCached() {
|
public boolean onClimbableCached() {
|
||||||
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
||||||
@@ -48,8 +48,9 @@ index d341bf76b4679470a7fb5ff081b79425e4bc1264..4e414a78a6acfb90d5e212398617580a
|
|||||||
+ }
|
+ }
|
||||||
+ // Gale end - don't load chunks to activate climbing entities
|
+ // Gale end - don't load chunks to activate climbing entities
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.cachedOnClimbable;
|
return this.cachedOnClimbable;
|
||||||
}
|
@@ -2038,11 +2046,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
// Gale end - Airplane - cache on climbable check
|
// Gale end - Airplane - cache on climbable check
|
||||||
|
|
||||||
public boolean onClimbable() {
|
public boolean onClimbable() {
|
||||||
@@ -16,7 +16,7 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 411c3829ac99b4a3673419d230e098ff05c272f3..e0af617664641e27ffdee24309e340ede4cc6f73 100644
|
index 55c05f5e8e5045292f77621fed78a0498c9b53bf..295dc5f9f7d8765d345e1c543c7ffea5baaf3cfc 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2168,8 +2168,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -2168,8 +2168,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index e0af617664641e27ffdee24309e340ede4cc6f73..5fb13791f44ab27b6835b74f08c47807fb9ab58b 100644
|
index 295dc5f9f7d8765d345e1c543c7ffea5baaf3cfc..985581d3b289911e4d2509a1a2e08f9dbf957e54 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1212,8 +1212,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -1212,8 +1212,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -27,7 +27,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
index b9c8bcf3136939a1c8f215af53c4fa343b344e38..a04302728819f28ab724d474a3d06a916f3d1d99 100644
|
index 54916fe57ceeab24936ce50709402ecf1fcd9a10..01631bbe14a4bed817a6de41fa268a3e4f949180 100644
|
||||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
@@ -75,7 +75,7 @@ public final class ActivationRange {
|
@@ -75,7 +75,7 @@ public final class ActivationRange {
|
||||||
@@ -18,7 +18,7 @@ this patch is focused around the sensors used for ai
|
|||||||
delete the line of sight cache less often and use a faster nearby comparison
|
delete the line of sight cache less often and use a faster nearby comparison
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 4e414a78a6acfb90d5e212398617580a3f34be9b..883a47a9ccd75ea124d45beb1645b3f011962c48 100644
|
index 062e83860a3f9e3a40c513ca389d628ba936f465..32e058cc28b48c105271fc4a1115608dc8a7f670 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1003,15 +1003,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1003,15 +1003,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
Reference in New Issue
Block a user