mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +00:00
Updated Upstream (Paper)
This commit is contained in:
@@ -65,5 +65,4 @@ Binaries are licensed under GPL-3.0.
|
||||
## TODO
|
||||
check Simpler ShapelessRecipe comparison for vanilla patch
|
||||
check Cache CubeVoxelShape shape array (crash)
|
||||
check executeMidTickTasks in Remove lambda from ticking guard patch
|
||||
check backupRegionFile() in Add xor-shift random patch
|
||||
@@ -2,7 +2,7 @@ group=org.galemc.gale
|
||||
version=1.21-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.21
|
||||
paperRef=8c8b227547fa78b8f3295e4ac8ee066777e04e98
|
||||
paperRef=be8ac7acc3ca286aac62c836db03d69b57f7b8fe
|
||||
|
||||
org.gradle.caching=false
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -752,7 +752,7 @@ index 64ed296cfbe7e5d27286b8cee70454fd1d99ebb0..ebae8578a2d0dfd0d329861f45d0f278
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89508ecc53 100644
|
||||
index b26efc77a7669fd6b0ef498df23f0f78f1361073..55c81b6fa0173ba32cd3f3cee448147ad55418d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -80,7 +80,6 @@ import net.minecraft.util.ProgressListener;
|
||||
@@ -886,17 +886,17 @@ index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -819,9 +798,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -823,9 +802,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
boolean flag = this.isRaining();
|
||||
int j = chunkcoordintpair.getMinBlockX();
|
||||
int k = chunkcoordintpair.getMinBlockZ();
|
||||
- ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
- gameprofilerfiller.push("thunder");
|
||||
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
|
||||
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
@@ -850,8 +827,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
|
||||
@@ -856,8 +833,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -905,38 +905,23 @@ index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89
|
||||
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
|
||||
for (int l = 0; l < randomTickSpeed; ++l) {
|
||||
if (this.random.nextInt(48) == 0) {
|
||||
@@ -860,7 +835,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -869,7 +844,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
} // Paper - Option to disable ice and snow
|
||||
|
||||
- gameprofilerfiller.popPush("tickBlocks");
|
||||
timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] achunksection = chunk.getSections();
|
||||
@@ -875,7 +849,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
for (int l1 = 0; l1 < randomTickSpeed; ++l1) {
|
||||
BlockPos blockposition1 = this.getBlockRandomPos(j, k1, k, 15);
|
||||
|
||||
- gameprofilerfiller.push("randomTick");
|
||||
BlockState iblockdata = chunksection.getBlockState(blockposition1.getX() - j, blockposition1.getY() - k1, blockposition1.getZ() - k);
|
||||
|
||||
if (iblockdata.isRandomlyTicking()) {
|
||||
@@ -888,14 +861,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
fluid.randomTick(this, blockposition1, this.random);
|
||||
}
|
||||
|
||||
- gameprofilerfiller.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Paper start - optimize random block ticking
|
||||
@@ -905,7 +879,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
// Paper end - optimise random block ticking
|
||||
|
||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
- gameprofilerfiller.pop();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -1204,19 +1175,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1223,19 +1196,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
try {
|
||||
// Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
@@ -956,7 +941,7 @@ index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89
|
||||
} finally { timer.stopTiming(); } // Paper - timings
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
@@ -1239,12 +1204,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1258,12 +1225,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
// Paper end
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
@@ -969,7 +954,7 @@ index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89
|
||||
// Paper start - EAR 2
|
||||
if (isActive) {
|
||||
passenger.rideTick();
|
||||
@@ -1256,7 +1216,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1275,7 +1237,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
vehicle.positionRider(passenger);
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -1128,10 +1113,10 @@ index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..6b3c57fc1231cd37e17a58137bb78411
|
||||
|
||||
protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a275ba177 100644
|
||||
index 83f3ffdd8fa901b3de580d2359cdb5ead0d762cb..0f3dedcc20007385bdbfd9cab5209255fac38285 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -837,7 +837,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -838,7 +838,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit end
|
||||
|
||||
public void baseTick() {
|
||||
@@ -1139,7 +1124,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
||||
this.inBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
@@ -901,8 +900,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -902,8 +901,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.level().isClientSide && this instanceof Leashable) {
|
||||
Leashable.tickLeash((Entity & Leashable) this); // CraftBukkit - decompile error
|
||||
}
|
||||
@@ -1148,7 +1133,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
}
|
||||
|
||||
public void setSharedFlagOnFire(boolean onFire) {
|
||||
@@ -1080,7 +1077,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1081,7 +1078,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1156,7 +1141,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
@@ -1089,7 +1085,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1090,7 +1086,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper start - ignore movement changes while inactive.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
@@ -1164,7 +1149,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1110,8 +1105,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1111,8 +1106,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||
}
|
||||
|
||||
@@ -1173,7 +1158,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||
|
||||
@@ -1129,9 +1122,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1130,9 +1123,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
BlockState iblockdata = this.level().getBlockState(blockposition);
|
||||
|
||||
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
|
||||
@@ -1184,7 +1169,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -1232,8 +1223,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1233,8 +1224,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.isOnFire() && (this.isInPowderSnow || this.isInWaterRainOrBubble())) {
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
@@ -1193,7 +1178,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3101,7 +3090,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3102,7 +3091,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.processPortalCooldown();
|
||||
if (this.portalProcess != null) {
|
||||
if (this.portalProcess.processPortalTeleportation(worldserver, this, this.canUsePortal(false))) {
|
||||
@@ -1201,7 +1186,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
this.setPortalCooldown();
|
||||
DimensionTransition dimensiontransition = this.portalProcess.getPortalDestination(worldserver, this);
|
||||
|
||||
@@ -3113,7 +3101,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3114,7 +3102,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1209,7 +1194,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
} else if (this.portalProcess.hasExpired()) {
|
||||
this.portalProcess = null;
|
||||
}
|
||||
@@ -3614,7 +3601,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3615,7 +3602,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1217,7 +1202,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
Entity entity2 = worldserver1.dimension() == worldserver.dimension() ? this : this.getType().create(worldserver1);
|
||||
|
||||
if (entity2 != null) {
|
||||
@@ -3650,7 +3636,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3651,7 +3637,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
teleportTarget.postDimensionTransition().onTransition(entity2);
|
||||
}
|
||||
|
||||
@@ -1226,7 +1211,7 @@ index 2519c08a45ce3febcf51ac308ad98ac0e2657cf3..796fea3424279ab299995b5b8a40ae8a
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6d0379662 100644
|
||||
index b9cef93fe382b666bec04ca95eeaf2d8acbb3c40..291f17ba3ad03cb4c989d9252ebeb556196f2148 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -440,7 +440,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1245,7 +1230,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3150,10 +3148,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3155,10 +3153,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.run += (f3 - this.run) * 0.3F;
|
||||
@@ -1256,7 +1241,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
|
||||
// Paper start - stop large pitch and yaw changes from crashing the server
|
||||
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
|
||||
@@ -3165,7 +3160,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3170,7 +3165,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
|
||||
// Paper end
|
||||
|
||||
@@ -1264,7 +1249,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
this.animStep += f2;
|
||||
if (this.isFallFlying()) {
|
||||
++this.fallFlyTicks;
|
||||
@@ -3405,19 +3399,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3410,19 +3404,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.setDeltaMovement(d0, d1, d2);
|
||||
@@ -1284,7 +1269,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
if (this.jumping && this.isAffectedByFluids()) {
|
||||
double d3;
|
||||
|
||||
@@ -3444,8 +3433,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3449,8 +3438,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.noJumpDelay = 0;
|
||||
}
|
||||
|
||||
@@ -1293,7 +1278,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
this.xxa *= 0.98F;
|
||||
this.zza *= 0.98F;
|
||||
this.updateFallFlying();
|
||||
@@ -3470,8 +3457,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3475,8 +3462,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.travel(vec3d1);
|
||||
}
|
||||
|
||||
@@ -1302,7 +1287,7 @@ index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..9ea779dbe9e6056b436f107453666ef6
|
||||
if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API
|
||||
int i = this.getTicksFrozen();
|
||||
|
||||
@@ -3488,15 +3473,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3493,15 +3478,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.hurt(this.damageSources().freeze(), 1.0F);
|
||||
}
|
||||
|
||||
@@ -1777,7 +1762,7 @@ index bff83fe413c7baef4ba56a3270ea4463a58c792f..807964a19ac15717715c9a92aeefadbe
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a4638027c 100644
|
||||
index 73407a5d33a24b50a250c38bc81f9a0f590e9f93..91944ff33143ed28fa05be521375ead0768eb25b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -132,7 +132,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1831,7 +1816,7 @@ index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a
|
||||
this.timings.tileEntityPending.startTiming(); // Spigot
|
||||
this.tickingBlockEntities = true;
|
||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||
@@ -989,7 +982,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -991,7 +984,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
this.timings.tileEntityTick.stopTiming(); // Spigot
|
||||
this.tickingBlockEntities = false;
|
||||
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
||||
@@ -1839,7 +1824,7 @@ index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
|
||||
@@ -1194,7 +1186,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1196,7 +1188,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
@@ -1847,7 +1832,7 @@ index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a
|
||||
// Paper start - rewrite chunk system
|
||||
final List<Entity> ret = new java.util.ArrayList<>();
|
||||
|
||||
@@ -1220,8 +1211,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1222,8 +1213,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
|
||||
final AABB boundingBox, final Predicate<? super T> predicate,
|
||||
final List<? super T> into, final int maxCount) {
|
||||
@@ -1856,7 +1841,7 @@ index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a
|
||||
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
|
||||
if (maxCount != Integer.MAX_VALUE) {
|
||||
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getEntities(byType, boundingBox, into, predicate, maxCount);
|
||||
@@ -1515,11 +1504,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1525,11 +1514,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
|
||||
@@ -31,7 +31,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/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9df4c6e056dd9eabd1128a8cc9756c14fb277a11..143d41af6a1e08a27cf53b6323d54c9605c44a62 100644
|
||||
index 291f17ba3ad03cb4c989d9252ebeb556196f2148..daa8c9019bcd7062508444f1bd6e04bfb7daeb7b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -157,7 +157,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -42,7 +42,7 @@ index 9df4c6e056dd9eabd1128a8cc9756c14fb277a11..143d41af6a1e08a27cf53b6323d54c96
|
||||
|
||||
public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@@ -2026,6 +2025,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2031,6 +2030,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
|
||||
|
||||
@@ -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/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bf69dd0f673e86fb2de6251bedcf36e4577933d9..12a23899497ee4a9666cfbee1bc2e535812512d4 100644
|
||||
index 0f3dedcc20007385bdbfd9cab5209255fac38285..68e02e2ffdaf063471bf6022d328aad5475a5f94 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -445,6 +445,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -446,6 +446,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.originWorld;
|
||||
}
|
||||
// Paper end - Entity origin API
|
||||
|
||||
@@ -31,7 +31,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/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ac75bc19da217f7f2f5660345770ec89508ecc53..466315a6171c8962bd23fb5e2aaafbbbcc0479bd 100644
|
||||
index 55c81b6fa0173ba32cd3f3cee448147ad55418d7..75f13e33f94b42bccbabfe1e7533c2ad2b42f105 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -733,7 +733,20 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -42,7 +42,6 @@ index ac75bc19da217f7f2f5660345770ec89508ecc53..466315a6171c8962bd23fb5e2aaafbbb
|
||||
+ // Gale start - Airplane - remove lambda from ticking guard - copied from guardEntityTick
|
||||
+ try {
|
||||
+ this.tickNonPassenger(entity); // Gale - Airplane - remove lambda from ticking guard - changed
|
||||
+ //MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick // TODO: waiting paper
|
||||
+ } catch (Throwable throwable) {
|
||||
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
+ // Paper start - Prevent block entity and entity crashes
|
||||
@@ -52,15 +51,16 @@ index ac75bc19da217f7f2f5660345770ec89508ecc53..466315a6171c8962bd23fb5e2aaafbbb
|
||||
+ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
|
||||
+ // Paper end - Prevent block entity and entity crashes
|
||||
+ }
|
||||
+ this.moonrise$midTickTasks(); // Paper - rewrite chunk system
|
||||
+ // Gale end - Airplane - remove lambda from ticking guard - copied from guardEntityTick
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index f489b74217b5cab017cbcade7e19fb7b8ec94f7c..09852f93fc200a971bd4db5212646d29db663161 100644
|
||||
index 394a4bb7bbb072f03887a37d58c53a3783d2c44a..318ae232551b982c52ec609cc97649f206fd96b6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1005,12 +1005,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1007,15 +1007,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@@ -74,4 +74,8 @@ index f489b74217b5cab017cbcade7e19fb7b8ec94f7c..09852f93fc200a971bd4db5212646d29
|
||||
+ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Gale - Airplane - remove lambda from ticking guard - diff on change ServerLevel#tick
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
}
|
||||
this.moonrise$midTickTasks(); // Paper - rewrite chunk system
|
||||
- this.moonrise$midTickTasks(); // Paper - rewrite chunk system
|
||||
+ this.moonrise$midTickTasks(); // Paper - rewrite chunk system // Gale - Airplane - remove lambda from ticking guard - diff on change ServerLevel#tick
|
||||
}
|
||||
// Paper start - Option to prevent armor stands from doing entity lookups
|
||||
@Override
|
||||
|
||||
@@ -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/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cd084f9d653a7952249e6d39bbce7b54d7da2db7..e705d3fa09a76ca1268b562636eb77978f1c0eb3 100644
|
||||
index 68e02e2ffdaf063471bf6022d328aad5475a5f94..985bc7856b165eee2df1edf3a53d9a8b40eb2516 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4270,16 +4270,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4271,16 +4271,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -60,7 +60,7 @@ index cd084f9d653a7952249e6d39bbce7b54d7da2db7..e705d3fa09a76ca1268b562636eb7797
|
||||
double d1 = 0.0D;
|
||||
boolean flag = this.isPushedByFluid();
|
||||
boolean flag1 = false;
|
||||
@@ -4287,14 +4289,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4288,14 +4290,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -128,7 +128,7 @@ index cd084f9d653a7952249e6d39bbce7b54d7da2db7..e705d3fa09a76ca1268b562636eb7797
|
||||
|
||||
if (d2 >= axisalignedbb.minY) {
|
||||
flag1 = true;
|
||||
@@ -4316,9 +4365,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4317,9 +4366,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -142,18 +142,18 @@ index cd084f9d653a7952249e6d39bbce7b54d7da2db7..e705d3fa09a76ca1268b562636eb7797
|
||||
if (vec3d.length() > 0.0D) {
|
||||
if (k1 > 0) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index f2e11bff414b521295bde721e01ae2166a6a3fd6..440a35f0b987187895a7f74efc4f1989e1bee907 100644
|
||||
index 8cd6c1d838e0332125fde3fc36475034aa4effa0..4e7b5f462127d01efba049a45e0773e60b95bc6e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -25,6 +25,7 @@ public class LevelChunkSection {
|
||||
public final PalettedContainer<BlockState> states;
|
||||
@@ -26,6 +26,7 @@ public class LevelChunkSection {
|
||||
// CraftBukkit start - read/write
|
||||
private PalettedContainer<Holder<Biome>> biomes;
|
||||
public final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper
|
||||
+ public short fluidStateCount; // Gale - Airplane - reduce entity fluid lookups if no fluids
|
||||
|
||||
public LevelChunkSection(PalettedContainer<BlockState> datapaletteblock, PalettedContainer<Holder<Biome>> palettedcontainerro) {
|
||||
// CraftBukkit end
|
||||
@@ -82,6 +83,7 @@ public class LevelChunkSection {
|
||||
@@ -86,6 +87,7 @@ public class LevelChunkSection {
|
||||
|
||||
if (!fluid.isEmpty()) {
|
||||
--this.tickingFluidCount;
|
||||
@@ -161,7 +161,7 @@ index f2e11bff414b521295bde721e01ae2166a6a3fd6..440a35f0b987187895a7f74efc4f1989
|
||||
}
|
||||
|
||||
if (!state.isAir()) {
|
||||
@@ -93,6 +95,7 @@ public class LevelChunkSection {
|
||||
@@ -100,6 +102,7 @@ public class LevelChunkSection {
|
||||
|
||||
if (!fluid1.isEmpty()) {
|
||||
++this.tickingFluidCount;
|
||||
@@ -169,27 +169,11 @@ index f2e11bff414b521295bde721e01ae2166a6a3fd6..440a35f0b987187895a7f74efc4f1989
|
||||
}
|
||||
|
||||
return iblockdata1;
|
||||
@@ -120,6 +123,7 @@ public class LevelChunkSection {
|
||||
public int nonEmptyBlockCount;
|
||||
public int tickingBlockCount;
|
||||
public int tickingFluidCount;
|
||||
+ public int fluidStateCount; // Gale - Airplane - reduce entity fluid lookups if no fluids
|
||||
|
||||
a(final LevelChunkSection chunksection) {}
|
||||
|
||||
@@ -138,6 +142,7 @@ public class LevelChunkSection {
|
||||
@@ -145,6 +148,7 @@ public class LevelChunkSection {
|
||||
if (fluid.isRandomlyTicking()) {
|
||||
this.tickingFluidCount += i;
|
||||
this.tickingFluidCount = (short) (this.tickingFluidCount + 1);
|
||||
}
|
||||
+ this.fluidStateCount++; // Gale - Airplane - reduce entity fluid lookups if no fluids
|
||||
}
|
||||
|
||||
}
|
||||
@@ -149,6 +154,7 @@ public class LevelChunkSection {
|
||||
this.nonEmptyBlockCount = (short) a0.nonEmptyBlockCount;
|
||||
this.tickingBlockCount = (short) a0.tickingBlockCount;
|
||||
this.tickingFluidCount = (short) a0.tickingFluidCount;
|
||||
+ this.fluidStateCount = (short) a0.fluidStateCount; // Gale - Airplane - reduce entity fluid lookups if no fluids
|
||||
}
|
||||
|
||||
public PalettedContainer<BlockState> getStates() {
|
||||
});
|
||||
|
||||
@@ -35,10 +35,10 @@ index a3288cd39a0d3563efed87a074a5dec28d303a9e..ef5274ec1cb239c6dc4ab4c2f3e8e98e
|
||||
|
||||
public static long getCoordinateKey(final ChunkPos pair) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e705d3fa09a76ca1268b562636eb77978f1c0eb3..474b67fbe23f7ba6890b7cf25e87859fa44740c1 100644
|
||||
index 985bc7856b165eee2df1edf3a53d9a8b40eb2516..46fa9c7cb799523980029392dba37d2c7951be9a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -315,7 +315,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -316,7 +316,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public double yo;
|
||||
public double zo;
|
||||
private Vec3 position;
|
||||
|
||||
@@ -29,7 +29,7 @@ index 14e412ebf75b0e06ab53a1c8f9dd1be6ad1e2680..f962e82e2c70f328a23dc99193d072f8
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c6dc88ce33fa15673fc271e70f6d82dd4d514ede..cd844069b1fcb0a26c940724ee53b7e06d4280ed 100644
|
||||
index b6236d28c6ef3b94625950eb5934ebb11c14c9f4..a34407257d6281e499498247712a2291c67aed25 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -102,6 +102,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
@@ -40,7 +40,7 @@ index c6dc88ce33fa15673fc271e70f6d82dd4d514ede..cd844069b1fcb0a26c940724ee53b7e0
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1372,7 +1373,7 @@ public abstract class PlayerList {
|
||||
@@ -1373,7 +1374,7 @@ public abstract class PlayerList {
|
||||
// Paper end
|
||||
boolean flag = this.verifyChatTrusted(message);
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ index 0ee04fe6ff6a4d09754f326526ae04fe7226bab2..365598a660e79d266f5d4a439cb1ba01
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
index 50040c497a819cd1229042ab3cb057d34a32cacc..e085197001ba0e50dc84fe488cf531cce0950cb1 100644
|
||||
index 01f5b946fabbe34f31110e75973dab9f39897346..b9467fec08a30ef43cbc2bb2fdf00c3a1418554f 100644
|
||||
--- a/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -5,7 +5,7 @@ import java.util.function.IntConsumer;
|
||||
@@ -485,10 +485,10 @@ index f5e79db3ccde0730c3b4fb81c76ca6ed045a7374..5546a873fae5252df5fb4bf8781e70db
|
||||
private EquipmentSlotGroup(final int id, final String name, final Predicate<EquipmentSlot> slotPredicate) {
|
||||
this.id = id;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e70d2a9005f1ba5d6bdd08a70c8de99295759018..2a96e5cc0ff99c127fe6e4b1b0a1c9fe1424ed73 100644
|
||||
index b06766a45138e40022e4131832c8d6288e7f6c48..6ae8d4f50c6a4beab511ab9fdf540fb7a3ddd5d3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3220,7 +3220,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3225,7 +3225,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@Nullable
|
||||
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {
|
||||
Map<EquipmentSlot, ItemStack> map = null;
|
||||
@@ -573,10 +573,10 @@ index 7c3e561f2ca2522ab8336487c0307e1b69a397a8..a7ee93c0d94be3bb6c8ea8e8ca7f8abf
|
||||
String[] strings = new String[pattern.size() - l - k];
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 09852f93fc200a971bd4db5212646d29db663161..2fa7260811cc8946da1405a724cf44fb75a24489 100644
|
||||
index 318ae232551b982c52ec609cc97649f206fd96b6..f23e4e0b2298eb509679cb63a08abe1a68c68c1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1287,7 +1287,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1289,7 +1289,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) {
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ);
|
||||
if (slices == null) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 474b67fbe23f7ba6890b7cf25e87859fa44740c1..cc89235cfea1cc02c59e64e02ad517f2db8745a3 100644
|
||||
index 46fa9c7cb799523980029392dba37d2c7951be9a..0419c25e47f04cfdb180588178d963d5d20616e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -314,7 +314,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -315,7 +315,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public double xo;
|
||||
public double yo;
|
||||
public double zo;
|
||||
@@ -25,7 +25,7 @@ index 474b67fbe23f7ba6890b7cf25e87859fa44740c1..cc89235cfea1cc02c59e64e02ad517f2
|
||||
public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
||||
private ChunkPos chunkPosition;
|
||||
private Vec3 deltaMovement;
|
||||
@@ -1957,9 +1957,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1958,9 +1958,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
|
||||
@@ -214,7 +214,7 @@ index 0000000000000000000000000000000000000000..349618b7f544bf9a30e0796d4d9a2640
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/util/BitStorage.java b/src/main/java/net/minecraft/util/BitStorage.java
|
||||
index 68648c5a5e3ff079f832092af0f2f801c42d1ede..5a85e499aeb02885cab5ba7d571d6f6ae470bce8 100644
|
||||
index 8bafd5fd7499ba4a04bf706cfd1e156073716e21..b7df9eac4ee23fa489368af82ec9c07dea6ebd75 100644
|
||||
--- a/src/main/java/net/minecraft/util/BitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/BitStorage.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -225,15 +225,15 @@ index 68648c5a5e3ff079f832092af0f2f801c42d1ede..5a85e499aeb02885cab5ba7d571d6f6a
|
||||
|
||||
public interface BitStorage {
|
||||
int getAndSet(int index, int value);
|
||||
@@ -20,4 +21,6 @@ public interface BitStorage {
|
||||
void unpack(int[] out);
|
||||
@@ -31,4 +32,6 @@ public interface BitStorage {
|
||||
|
||||
BitStorage copy();
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ <T> void compact(Palette<T> srcPalette, Palette<T> dstPalette, short[] out); // Gale - Lithium - faster chunk serialization
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
index 9f438d9c6eb05e43d24e4af68188a3d4c46a938c..0af2e2cc59db228e01afa880f83c2024dade4ff0 100644
|
||||
index 8d7d763bf51cac556057645e6169c9447993189b..7846273b7e3519ad276373d8a2066856473b9e69 100644
|
||||
--- a/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.util;
|
||||
@@ -244,7 +244,7 @@ index 9f438d9c6eb05e43d24e4af68188a3d4c46a938c..0af2e2cc59db228e01afa880f83c2024
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
public class SimpleBitStorage implements BitStorage {
|
||||
@@ -367,4 +368,45 @@ public class SimpleBitStorage implements BitStorage {
|
||||
@@ -389,4 +390,45 @@ public class SimpleBitStorage implements BitStorage {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -291,10 +291,10 @@ index 9f438d9c6eb05e43d24e4af68188a3d4c46a938c..0af2e2cc59db228e01afa880f83c2024
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
index e085197001ba0e50dc84fe488cf531cce0950cb1..267d22559002741c113755e75e7c75e4232cf644 100644
|
||||
index b9467fec08a30ef43cbc2bb2fdf00c3a1418554f..4177cb798612bdcd3b8a1e7a5015061ff9535e35 100644
|
||||
--- a/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -62,4 +62,6 @@ public class ZeroBitStorage implements BitStorage {
|
||||
@@ -71,4 +71,6 @@ public class ZeroBitStorage implements BitStorage {
|
||||
public BitStorage copy() {
|
||||
return this;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ index acae3eb30e0689048937f479dc3070f0688abdad..4b79f0474a9013dd4fdb68c6363ca194
|
||||
int onResize(int newBits, T object);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 926c81a25180d508d662eb3fa35f771636164694..82ad713eede4bca015a5b4b1d5fd9b02f0e75a47 100644
|
||||
index 81368bf186365878db2e1ed305bb7bf36c26f61f..6402665ae8cc8664921ae0298e8b6fa4c31d8b23 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -23,8 +23,25 @@ import net.minecraft.util.Mth;
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cc89235cfea1cc02c59e64e02ad517f2db8745a3..60755eb94cd3162dc21324e587587cffa8643a67 100644
|
||||
index 0419c25e47f04cfdb180588178d963d5d20616e6..2933f84e416228303d269aec13f7e649effa7a79 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -323,6 +323,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -324,6 +324,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public float yRotO;
|
||||
public float xRotO;
|
||||
private AABB bb;
|
||||
@@ -24,7 +24,7 @@ index cc89235cfea1cc02c59e64e02ad517f2db8745a3..60755eb94cd3162dc21324e587587cff
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1064,6 +1065,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1065,6 +1066,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
@@ -36,7 +36,7 @@ index cc89235cfea1cc02c59e64e02ad517f2db8745a3..60755eb94cd3162dc21324e587587cff
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
@@ -3969,6 +3975,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3970,6 +3976,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB boundingBox) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 60755eb94cd3162dc21324e587587cffa8643a67..c744457475e1e5993906c34eee8ea199c8a8970e 100644
|
||||
index 2933f84e416228303d269aec13f7e649effa7a79..6f13b8656869570eb7ebdb63611447c1d2d8ae52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -895,7 +895,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -896,7 +896,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
this.checkBelowWorld();
|
||||
if (!this.level().isClientSide) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 466315a6171c8962bd23fb5e2aaafbbbcc0479bd..09949bcea0b1c22e9da5979ce88909f440a22dd5 100644
|
||||
index 75f13e33f94b42bccbabfe1e7533c2ad2b42f105..4cbbec2b372158c13f6305c23c29798c8b52779f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1507,7 +1507,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1528,7 +1528,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
|
||||
@Override
|
||||
public void destroyBlockProgress(int entityId, BlockPos pos, int progress) {
|
||||
@@ -35,7 +35,7 @@ index 466315a6171c8962bd23fb5e2aaafbbbcc0479bd..09949bcea0b1c22e9da5979ce88909f4
|
||||
|
||||
// CraftBukkit start
|
||||
Player entityhuman = null;
|
||||
@@ -1541,7 +1551,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1562,7 +1572,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
// CraftBukkit end
|
||||
|
||||
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
|
||||
|
||||
@@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cf834a2cc39ecd058325d2ef9eb647289648bd8e..1b5bfdd69766c6de813b0ef2fcadcaf19a468c03 100644
|
||||
index aabca85eb35085511b24ace968d3bf1b85303445..d77e3502ce709166126047da1f63d229a0943a90 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -13,6 +13,8 @@ import java.net.SocketAddress;
|
||||
@@ -86,7 +86,7 @@ index cf834a2cc39ecd058325d2ef9eb647289648bd8e..1b5bfdd69766c6de813b0ef2fcadcaf1
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
entityplayer.serverLevel().removePlayerImmediately(entityplayer, entity_removalreason);
|
||||
/* CraftBukkit start
|
||||
@@ -897,6 +903,7 @@ public abstract class PlayerList {
|
||||
@@ -898,6 +904,7 @@ public abstract class PlayerList {
|
||||
if (!entityplayer.connection.isDisconnected()) {
|
||||
worldserver.addRespawnedPlayer(entityplayer1);
|
||||
this.players.add(entityplayer1);
|
||||
@@ -94,7 +94,7 @@ index cf834a2cc39ecd058325d2ef9eb647289648bd8e..1b5bfdd69766c6de813b0ef2fcadcaf1
|
||||
this.playersByName.put(entityplayer1.getScoreboardName().toLowerCase(java.util.Locale.ROOT), entityplayer1); // Spigot
|
||||
this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
|
||||
}
|
||||
@@ -975,20 +982,55 @@ public abstract class PlayerList {
|
||||
@@ -976,20 +983,55 @@ public abstract class PlayerList {
|
||||
this.sendPlayerPermissionLevel(player, i, recalculatePermissions); // Paper - avoid recalculating permissions if possible
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1b5bfdd69766c6de813b0ef2fcadcaf19a468c03..a8d0e6566183f440f8e2732e10b390ba8b6ed517 100644
|
||||
index d77e3502ce709166126047da1f63d229a0943a90..876bffc0d03cd3a781c4139a9b5e4858215afdc9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1018,14 +1018,18 @@ public abstract class PlayerList {
|
||||
@@ -1019,14 +1019,18 @@ public abstract class PlayerList {
|
||||
// Gale start - Purpur - spread out sending all player info
|
||||
ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn];
|
||||
if (sendAllPlayerInfoBucket != null) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c744457475e1e5993906c34eee8ea199c8a8970e..51bdc4721b36b8cfe0340966553b5f8e37c99bec 100644
|
||||
index 6f13b8656869570eb7ebdb63611447c1d2d8ae52..47f94388024f1618549d9cafa6a8c2bb24d7279d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3844,7 +3844,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3845,7 +3845,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
if (entity == null) {
|
||||
return false;
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 51bdc4721b36b8cfe0340966553b5f8e37c99bec..e9f6b876b80a92d360e7eea135235574532d5100 100644
|
||||
index 47f94388024f1618549d9cafa6a8c2bb24d7279d..d0599a0a41d4bfc1a2063ef4228402da00e1a06c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4492,6 +4492,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4493,6 +4493,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.inBlockState;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ index 51bdc4721b36b8cfe0340966553b5f8e37c99bec..e9f6b876b80a92d360e7eea135235574
|
||||
return this.chunkPosition;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 79d8a70dc38d13e160b40791d2c317050475827f..a1e8495656a575c0d31abd12c69f0ba4427752ce 100644
|
||||
index 6b1b16c0ade335058834c01d9d760ef0a76928ca..15ba997a722530a5461d3a66b9fbed26b5312a37 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2042,19 +2042,43 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2047,19 +2047,43 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public boolean onClimbableCached() {
|
||||
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
||||
|
||||
@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e9f6b876b80a92d360e7eea135235574532d5100..8885f7cf57e6eb97de882757f56925ff862016c8 100644
|
||||
index d0599a0a41d4bfc1a2063ef4228402da00e1a06c..9edcf2a791fd645ce7a13cea21446167d619a0a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2084,8 +2084,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2085,8 +2085,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8885f7cf57e6eb97de882757f56925ff862016c8..4d7c4907e0b73f63db3d7625b33eaa3439a2b801 100644
|
||||
index 9edcf2a791fd645ce7a13cea21446167d619a0a9..0170337bc9b2837d542d0235039c15d5e8dffba2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1218,9 +1218,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1219,9 +1219,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
this.tryCheckInsideBlocks();
|
||||
|
||||
Reference in New Issue
Block a user