mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 21:33:49 -07:00
1.21.6-pre2
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
group=io.papermc.paper
|
group=io.papermc.paper
|
||||||
version=1.21.6-R0.1-SNAPSHOT
|
version=1.21.6-R0.1-SNAPSHOT
|
||||||
mcVersion=1.21.6-pre1
|
mcVersion=1.21.6-pre2
|
||||||
|
|
||||||
# Set to true while updating Minecraft version
|
# Set to true while updating Minecraft version
|
||||||
updatingMinecraft=true
|
updatingMinecraft=true
|
||||||
|
@@ -15,7 +15,7 @@ plugins {
|
|||||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
mache("io.papermc:mache:1.21.6-pre1+build.2")
|
mache("io.papermc:mache:1.21.6-pre2+build.2")
|
||||||
paperclip("io.papermc:paperclip:3.0.3")
|
paperclip("io.papermc:paperclip:3.0.3")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||||
}
|
}
|
||||||
|
@@ -161,7 +161,7 @@
|
|||||||
profilerFiller.push("purge");
|
profilerFiller.push("purge");
|
||||||
- if (this.level.tickRateManager().runsNormally() || !tickChunks) {
|
- if (this.level.tickRateManager().runsNormally() || !tickChunks) {
|
||||||
+ if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
+ if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
||||||
this.ticketStorage.purgeStaleTickets();
|
this.ticketStorage.purgeStaleTickets(this.chunkMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,12 +_,20 @@
|
@@ -388,12 +_,20 @@
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/util/datafix/DataFixers.java
|
--- a/net/minecraft/util/datafix/DataFixers.java
|
||||||
+++ b/net/minecraft/util/datafix/DataFixers.java
|
+++ b/net/minecraft/util/datafix/DataFixers.java
|
||||||
@@ -513,6 +_,24 @@
|
@@ -515,6 +_,24 @@
|
||||||
Schema schema44 = builder.addSchema(1456, SAME_NAMESPACED);
|
Schema schema44 = builder.addSchema(1456, SAME_NAMESPACED);
|
||||||
builder.addFixer(new EntityItemFrameDirectionFix(schema44, false));
|
builder.addFixer(new EntityItemFrameDirectionFix(schema44, false));
|
||||||
Schema schema45 = builder.addSchema(1458, V1458::new);
|
Schema schema45 = builder.addSchema(1458, V1458::new);
|
||||||
|
@@ -581,7 +581,7 @@
|
|||||||
BlockPos blockPos = this.mainSupportingBlockPos.get();
|
BlockPos blockPos = this.mainSupportingBlockPos.get();
|
||||||
if (!(yOffset > 1.0E-5F)) {
|
if (!(yOffset > 1.0E-5F)) {
|
||||||
return blockPos;
|
return blockPos;
|
||||||
@@ -1164,7 +_,7 @@
|
@@ -1163,7 +_,7 @@
|
||||||
|| this.collidedWithShapeMovingFrom(vec3, vec31, entityInsideCollisionShape.move(new Vec3(pos)).toAabbs());
|
|| this.collidedWithShapeMovingFrom(vec3, vec31, entityInsideCollisionShape.move(new Vec3(pos)).toAabbs());
|
||||||
if (flag) {
|
if (flag) {
|
||||||
try {
|
try {
|
||||||
@@ -590,7 +590,7 @@
|
|||||||
blockState.entityInside(this.level(), pos, this, stepBasedCollector);
|
blockState.entityInside(this.level(), pos, this, stepBasedCollector);
|
||||||
this.onInsideBlock(blockState);
|
this.onInsideBlock(blockState);
|
||||||
} catch (Throwable var14) {
|
} catch (Throwable var14) {
|
||||||
@@ -1179,7 +_,7 @@
|
@@ -1178,7 +_,7 @@
|
||||||
|
|
||||||
boolean flag1 = this.collidedWithFluid(blockState.getFluidState(), pos, vec3, vec31);
|
boolean flag1 = this.collidedWithFluid(blockState.getFluidState(), pos, vec3, vec31);
|
||||||
if (flag1) {
|
if (flag1) {
|
||||||
@@ -599,7 +599,7 @@
|
|||||||
blockState.getFluidState().entityInside(this.level(), pos, this, stepBasedCollector);
|
blockState.getFluidState().entityInside(this.level(), pos, this, stepBasedCollector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1595,6 +_,7 @@
|
@@ -1594,6 +_,7 @@
|
||||||
this.setXRot(Mth.clamp(xRot, -90.0F, 90.0F) % 360.0F);
|
this.setXRot(Mth.clamp(xRot, -90.0F, 90.0F) % 360.0F);
|
||||||
this.yRotO = this.getYRot();
|
this.yRotO = this.getYRot();
|
||||||
this.xRotO = this.getXRot();
|
this.xRotO = this.getXRot();
|
||||||
@@ -607,7 +607,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void absSnapTo(double x, double y, double z) {
|
public void absSnapTo(double x, double y, double z) {
|
||||||
@@ -1604,6 +_,7 @@
|
@@ -1603,6 +_,7 @@
|
||||||
this.yo = y;
|
this.yo = y;
|
||||||
this.zo = d1;
|
this.zo = d1;
|
||||||
this.setPos(d, y, d1);
|
this.setPos(d, y, d1);
|
||||||
@@ -615,7 +615,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void snapTo(Vec3 pos) {
|
public void snapTo(Vec3 pos) {
|
||||||
@@ -1623,11 +_,19 @@
|
@@ -1622,11 +_,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void snapTo(double x, double y, double z, float yRot, float xRot) {
|
public void snapTo(double x, double y, double z, float yRot, float xRot) {
|
||||||
@@ -635,7 +635,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final void setOldPosAndRot() {
|
public final void setOldPosAndRot() {
|
||||||
@@ -1694,6 +_,7 @@
|
@@ -1693,6 +_,7 @@
|
||||||
public void push(Entity entity) {
|
public void push(Entity entity) {
|
||||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||||
if (!entity.noPhysics && !this.noPhysics) {
|
if (!entity.noPhysics && !this.noPhysics) {
|
||||||
@@ -643,7 +643,7 @@
|
|||||||
double d = entity.getX() - this.getX();
|
double d = entity.getX() - this.getX();
|
||||||
double d1 = entity.getZ() - this.getZ();
|
double d1 = entity.getZ() - this.getZ();
|
||||||
double max = Mth.absMax(d, d1);
|
double max = Mth.absMax(d, d1);
|
||||||
@@ -1727,7 +_,21 @@
|
@@ -1726,7 +_,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void push(double x, double y, double z) {
|
public void push(double x, double y, double z) {
|
||||||
@@ -666,7 +666,7 @@
|
|||||||
this.hasImpulse = true;
|
this.hasImpulse = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1834,8 +_,20 @@
|
@@ -1833,8 +_,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPushable() {
|
public boolean isPushable() {
|
||||||
@@ -687,7 +687,7 @@
|
|||||||
|
|
||||||
public void awardKillScore(Entity entity, DamageSource damageSource) {
|
public void awardKillScore(Entity entity, DamageSource damageSource) {
|
||||||
if (entity instanceof ServerPlayer) {
|
if (entity instanceof ServerPlayer) {
|
||||||
@@ -1862,15 +_,23 @@
|
@@ -1861,15 +_,23 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean saveAsPassenger(ValueOutput output) {
|
public boolean saveAsPassenger(ValueOutput output) {
|
||||||
@@ -715,7 +715,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1881,14 +_,35 @@
|
@@ -1880,14 +_,35 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveWithoutId(ValueOutput output) {
|
public void saveWithoutId(ValueOutput output) {
|
||||||
@@ -751,7 +751,7 @@
|
|||||||
output.store("Rotation", Vec2.CODEC, new Vec2(this.getYRot(), this.getXRot()));
|
output.store("Rotation", Vec2.CODEC, new Vec2(this.getYRot(), this.getXRot()));
|
||||||
output.putDouble("fall_distance", this.fallDistance);
|
output.putDouble("fall_distance", this.fallDistance);
|
||||||
output.putShort("Fire", (short)this.remainingFireTicks);
|
output.putShort("Fire", (short)this.remainingFireTicks);
|
||||||
@@ -1896,7 +_,29 @@
|
@@ -1895,7 +_,29 @@
|
||||||
output.putBoolean("OnGround", this.onGround());
|
output.putBoolean("OnGround", this.onGround());
|
||||||
output.putBoolean("Invulnerable", this.invulnerable);
|
output.putBoolean("Invulnerable", this.invulnerable);
|
||||||
output.putInt("PortalCooldown", this.portalCooldown);
|
output.putInt("PortalCooldown", this.portalCooldown);
|
||||||
@@ -781,7 +781,7 @@
|
|||||||
output.storeNullable("CustomName", ComponentSerialization.CODEC, this.getCustomName());
|
output.storeNullable("CustomName", ComponentSerialization.CODEC, this.getCustomName());
|
||||||
if (this.isCustomNameVisible()) {
|
if (this.isCustomNameVisible()) {
|
||||||
output.putBoolean("CustomNameVisible", this.isCustomNameVisible());
|
output.putBoolean("CustomNameVisible", this.isCustomNameVisible());
|
||||||
@@ -1919,9 +_,12 @@
|
@@ -1918,9 +_,12 @@
|
||||||
output.putInt("TicksFrozen", this.getTicksFrozen());
|
output.putInt("TicksFrozen", this.getTicksFrozen());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -796,7 +796,7 @@
|
|||||||
|
|
||||||
if (!this.tags.isEmpty()) {
|
if (!this.tags.isEmpty()) {
|
||||||
output.store("Tags", TAG_LIST_CODEC, List.copyOf(this.tags));
|
output.store("Tags", TAG_LIST_CODEC, List.copyOf(this.tags));
|
||||||
@@ -1931,13 +_,13 @@
|
@@ -1930,13 +_,13 @@
|
||||||
output.store("data", CustomData.CODEC, this.customData);
|
output.store("data", CustomData.CODEC, this.customData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -812,7 +812,7 @@
|
|||||||
valueOutputList.discardLast();
|
valueOutputList.discardLast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1946,6 +_,34 @@
|
@@ -1945,6 +_,34 @@
|
||||||
output.discard("Passengers");
|
output.discard("Passengers");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -847,7 +847,7 @@
|
|||||||
} catch (Throwable var7) {
|
} catch (Throwable var7) {
|
||||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
|
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
|
||||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
|
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
|
||||||
@@ -1957,7 +_,7 @@
|
@@ -1956,7 +_,7 @@
|
||||||
public void load(ValueInput input) {
|
public void load(ValueInput input) {
|
||||||
try {
|
try {
|
||||||
Vec3 vec3 = input.read("Pos", Vec3.CODEC).orElse(Vec3.ZERO);
|
Vec3 vec3 = input.read("Pos", Vec3.CODEC).orElse(Vec3.ZERO);
|
||||||
@@ -856,7 +856,7 @@
|
|||||||
Vec2 vec2 = input.read("Rotation", Vec2.CODEC).orElse(Vec2.ZERO);
|
Vec2 vec2 = input.read("Rotation", Vec2.CODEC).orElse(Vec2.ZERO);
|
||||||
this.setDeltaMovement(Math.abs(vec31.x) > 10.0 ? 0.0 : vec31.x, Math.abs(vec31.y) > 10.0 ? 0.0 : vec31.y, Math.abs(vec31.z) > 10.0 ? 0.0 : vec31.z);
|
this.setDeltaMovement(Math.abs(vec31.x) > 10.0 ? 0.0 : vec31.x, Math.abs(vec31.y) > 10.0 ? 0.0 : vec31.y, Math.abs(vec31.z) > 10.0 ? 0.0 : vec31.z);
|
||||||
this.hasImpulse = true;
|
this.hasImpulse = true;
|
||||||
@@ -1989,7 +_,20 @@
|
@@ -1988,7 +_,20 @@
|
||||||
this.setNoGravity(input.getBooleanOr("NoGravity", false));
|
this.setNoGravity(input.getBooleanOr("NoGravity", false));
|
||||||
this.setGlowingTag(input.getBooleanOr("Glowing", false));
|
this.setGlowingTag(input.getBooleanOr("Glowing", false));
|
||||||
this.setTicksFrozen(input.getIntOr("TicksFrozen", 0));
|
this.setTicksFrozen(input.getIntOr("TicksFrozen", 0));
|
||||||
@@ -878,7 +878,7 @@
|
|||||||
this.customData = input.read("data", CustomData.CODEC).orElse(CustomData.EMPTY);
|
this.customData = input.read("data", CustomData.CODEC).orElse(CustomData.EMPTY);
|
||||||
this.tags.clear();
|
this.tags.clear();
|
||||||
input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll);
|
input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll);
|
||||||
@@ -2000,6 +_,59 @@
|
@@ -1999,6 +_,59 @@
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Entity has invalid rotation");
|
throw new IllegalStateException("Entity has invalid rotation");
|
||||||
}
|
}
|
||||||
@@ -938,7 +938,7 @@
|
|||||||
} catch (Throwable var7) {
|
} catch (Throwable var7) {
|
||||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
|
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
|
||||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
||||||
@@ -2014,13 +_,24 @@
|
@@ -2013,13 +_,24 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public final String getEncodeId() {
|
public final String getEncodeId() {
|
||||||
@@ -964,7 +964,7 @@
|
|||||||
protected abstract void addAdditionalSaveData(ValueOutput output);
|
protected abstract void addAdditionalSaveData(ValueOutput output);
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -2040,11 +_,63 @@
|
@@ -2039,11 +_,63 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack, Vec3 offset) {
|
public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack, Vec3 offset) {
|
||||||
@@ -1029,7 +1029,7 @@
|
|||||||
level.addFreshEntity(itemEntity);
|
level.addFreshEntity(itemEntity);
|
||||||
return itemEntity;
|
return itemEntity;
|
||||||
}
|
}
|
||||||
@@ -2090,6 +_,15 @@
|
@@ -2089,6 +_,15 @@
|
||||||
|
|
||||||
for (Leashable leashable1 : list) {
|
for (Leashable leashable1 : list) {
|
||||||
if (leashable1.canHaveALeashAttachedTo(this)) {
|
if (leashable1.canHaveALeashAttachedTo(this)) {
|
||||||
@@ -1045,7 +1045,7 @@
|
|||||||
leashable1.setLeashedTo(this, true);
|
leashable1.setLeashedTo(this, true);
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
@@ -2117,11 +_,14 @@
|
@@ -2116,11 +_,14 @@
|
||||||
if (this.isAlive() && this instanceof Leashable leashable2) {
|
if (this.isAlive() && this instanceof Leashable leashable2) {
|
||||||
if (leashable2.getLeashHolder() == player) {
|
if (leashable2.getLeashHolder() == player) {
|
||||||
if (!this.level().isClientSide()) {
|
if (!this.level().isClientSide()) {
|
||||||
@@ -1064,7 +1064,7 @@
|
|||||||
|
|
||||||
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
|
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
|
||||||
this.playSound(SoundEvents.LEAD_UNTIED);
|
this.playSound(SoundEvents.LEAD_UNTIED);
|
||||||
@@ -2134,9 +_,24 @@
|
@@ -2133,9 +_,24 @@
|
||||||
if (itemInHand1.is(Items.LEAD) && !(leashable2.getLeashHolder() instanceof Player)) {
|
if (itemInHand1.is(Items.LEAD) && !(leashable2.getLeashHolder() instanceof Player)) {
|
||||||
if (!this.level().isClientSide() && leashable2.canHaveALeashAttachedTo(player)) {
|
if (!this.level().isClientSide() && leashable2.canHaveALeashAttachedTo(player)) {
|
||||||
if (leashable2.isLeashed()) {
|
if (leashable2.isLeashed()) {
|
||||||
@@ -1090,7 +1090,7 @@
|
|||||||
leashable2.setLeashedTo(player, true);
|
leashable2.setLeashedTo(player, true);
|
||||||
this.playSound(SoundEvents.LEAD_TIED);
|
this.playSound(SoundEvents.LEAD_TIED);
|
||||||
itemInHand1.shrink(1);
|
itemInHand1.shrink(1);
|
||||||
@@ -2151,7 +_,12 @@
|
@@ -2150,7 +_,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shearOffAllLeashConnections(@Nullable Player player) {
|
public boolean shearOffAllLeashConnections(@Nullable Player player) {
|
||||||
@@ -1104,7 +1104,7 @@
|
|||||||
if (flag && this.level() instanceof ServerLevel serverLevel) {
|
if (flag && this.level() instanceof ServerLevel serverLevel) {
|
||||||
serverLevel.playSound(null, this.blockPosition(), SoundEvents.SHEARS_SNIP, player != null ? player.getSoundSource() : this.getSoundSource());
|
serverLevel.playSound(null, this.blockPosition(), SoundEvents.SHEARS_SNIP, player != null ? player.getSoundSource() : this.getSoundSource());
|
||||||
}
|
}
|
||||||
@@ -2160,15 +_,36 @@
|
@@ -2159,15 +_,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean dropAllLeashConnections(@Nullable Player player) {
|
public boolean dropAllLeashConnections(@Nullable Player player) {
|
||||||
@@ -1145,7 +1145,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -2192,7 +_,9 @@
|
@@ -2191,7 +_,9 @@
|
||||||
this.gameEvent(GameEvent.SHEAR, player);
|
this.gameEvent(GameEvent.SHEAR, player);
|
||||||
this.playSound(equippable.shearingSound().value());
|
this.playSound(equippable.shearingSound().value());
|
||||||
if (this.level() instanceof ServerLevel serverLevel) {
|
if (this.level() instanceof ServerLevel serverLevel) {
|
||||||
@@ -1155,7 +1155,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -2264,11 +_,11 @@
|
@@ -2263,11 +_,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean startRiding(Entity vehicle, boolean force) {
|
public boolean startRiding(Entity vehicle, boolean force) {
|
||||||
@@ -1169,7 +1169,7 @@
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
for (Entity entity = vehicle; entity.vehicle != null; entity = entity.vehicle) {
|
for (Entity entity = vehicle; entity.vehicle != null; entity = entity.vehicle) {
|
||||||
@@ -2278,6 +_,27 @@
|
@@ -2277,6 +_,27 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force || this.canRide(vehicle) && vehicle.canAddPassenger(this)) {
|
if (force || this.canRide(vehicle) && vehicle.canAddPassenger(this)) {
|
||||||
@@ -1197,7 +1197,7 @@
|
|||||||
if (this.isPassenger()) {
|
if (this.isPassenger()) {
|
||||||
this.stopRiding();
|
this.stopRiding();
|
||||||
}
|
}
|
||||||
@@ -2306,15 +_,26 @@
|
@@ -2305,15 +_,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeVehicle() {
|
public void removeVehicle() {
|
||||||
@@ -1226,7 +1226,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void addPassenger(Entity passenger) {
|
protected void addPassenger(Entity passenger) {
|
||||||
@@ -2338,10 +_,43 @@
|
@@ -2337,10 +_,43 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1271,7 +1271,7 @@
|
|||||||
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
|
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
|
||||||
this.passengers = ImmutableList.of();
|
this.passengers = ImmutableList.of();
|
||||||
} else {
|
} else {
|
||||||
@@ -2351,6 +_,7 @@
|
@@ -2350,6 +_,7 @@
|
||||||
passenger.boardingCooldown = 60;
|
passenger.boardingCooldown = 60;
|
||||||
this.gameEvent(GameEvent.ENTITY_DISMOUNT, passenger);
|
this.gameEvent(GameEvent.ENTITY_DISMOUNT, passenger);
|
||||||
}
|
}
|
||||||
@@ -1279,7 +1279,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canAddPassenger(Entity passenger) {
|
protected boolean canAddPassenger(Entity passenger) {
|
||||||
@@ -2434,8 +_,8 @@
|
@@ -2433,8 +_,8 @@
|
||||||
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
|
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
|
||||||
if (portalDestination != null) {
|
if (portalDestination != null) {
|
||||||
ServerLevel level = portalDestination.newLevel();
|
ServerLevel level = portalDestination.newLevel();
|
||||||
@@ -1290,7 +1290,7 @@
|
|||||||
this.teleport(portalDestination);
|
this.teleport(portalDestination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2516,7 +_,7 @@
|
@@ -2515,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCrouching() {
|
public boolean isCrouching() {
|
||||||
@@ -1299,7 +1299,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSprinting() {
|
public boolean isSprinting() {
|
||||||
@@ -2532,7 +_,7 @@
|
@@ -2531,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVisuallySwimming() {
|
public boolean isVisuallySwimming() {
|
||||||
@@ -1308,7 +1308,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVisuallyCrawling() {
|
public boolean isVisuallyCrawling() {
|
||||||
@@ -2540,6 +_,13 @@
|
@@ -2539,6 +_,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSwimming(boolean swimming) {
|
public void setSwimming(boolean swimming) {
|
||||||
@@ -1322,7 +1322,7 @@
|
|||||||
this.setSharedFlag(4, swimming);
|
this.setSharedFlag(4, swimming);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2578,6 +_,7 @@
|
@@ -2577,6 +_,7 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public PlayerTeam getTeam() {
|
public PlayerTeam getTeam() {
|
||||||
@@ -1330,7 +1330,7 @@
|
|||||||
return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName());
|
return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2594,7 +_,11 @@
|
@@ -2593,7 +_,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInvisible(boolean invisible) {
|
public void setInvisible(boolean invisible) {
|
||||||
@@ -1343,7 +1343,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getSharedFlag(int flag) {
|
public boolean getSharedFlag(int flag) {
|
||||||
@@ -2611,7 +_,7 @@
|
@@ -2610,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxAirSupply() {
|
public int getMaxAirSupply() {
|
||||||
@@ -1352,7 +1352,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getAirSupply() {
|
public int getAirSupply() {
|
||||||
@@ -2619,10 +_,22 @@
|
@@ -2618,10 +_,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAirSupply(int air) {
|
public void setAirSupply(int air) {
|
||||||
@@ -1376,7 +1376,7 @@
|
|||||||
this.setTicksFrozen(0);
|
this.setTicksFrozen(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2649,11 +_,43 @@
|
@@ -2648,11 +_,43 @@
|
||||||
|
|
||||||
public void thunderHit(ServerLevel level, LightningBolt lightning) {
|
public void thunderHit(ServerLevel level, LightningBolt lightning) {
|
||||||
this.setRemainingFireTicks(this.remainingFireTicks + 1);
|
this.setRemainingFireTicks(this.remainingFireTicks + 1);
|
||||||
@@ -1424,7 +1424,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onAboveBubbleColumn(boolean downwards, BlockPos pos) {
|
public void onAboveBubbleColumn(boolean downwards, BlockPos pos) {
|
||||||
@@ -2809,26 +_,30 @@
|
@@ -2808,26 +_,30 @@
|
||||||
return this.removalReason != null
|
return this.removalReason != null
|
||||||
? String.format(
|
? String.format(
|
||||||
Locale.ROOT,
|
Locale.ROOT,
|
||||||
@@ -1458,7 +1458,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2852,6 +_,13 @@
|
@@ -2851,6 +_,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restoreFrom(Entity entity) {
|
public void restoreFrom(Entity entity) {
|
||||||
@@ -1472,7 +1472,7 @@
|
|||||||
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(this.problemPath(), LOGGER)) {
|
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(this.problemPath(), LOGGER)) {
|
||||||
TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector, entity.registryAccess());
|
TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector, entity.registryAccess());
|
||||||
entity.saveWithoutId(tagValueOutput);
|
entity.saveWithoutId(tagValueOutput);
|
||||||
@@ -2864,7 +_,56 @@
|
@@ -2863,7 +_,56 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Entity teleport(TeleportTransition teleportTransition) {
|
public Entity teleport(TeleportTransition teleportTransition) {
|
||||||
@@ -1529,7 +1529,7 @@
|
|||||||
ServerLevel level = teleportTransition.newLevel();
|
ServerLevel level = teleportTransition.newLevel();
|
||||||
boolean flag = level.dimension() != serverLevel.dimension();
|
boolean flag = level.dimension() != serverLevel.dimension();
|
||||||
if (!teleportTransition.asPassenger()) {
|
if (!teleportTransition.asPassenger()) {
|
||||||
@@ -2913,10 +_,15 @@
|
@@ -2912,10 +_,15 @@
|
||||||
profilerFiller.pop();
|
profilerFiller.pop();
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
@@ -1546,7 +1546,7 @@
|
|||||||
|
|
||||||
for (Entity entity2 : list) {
|
for (Entity entity2 : list) {
|
||||||
entity2.startRiding(entityx, true);
|
entity2.startRiding(entityx, true);
|
||||||
@@ -2999,9 +_,17 @@
|
@@ -2998,9 +_,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeAfterChangingDimensions() {
|
protected void removeAfterChangingDimensions() {
|
||||||
@@ -1567,7 +1567,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this instanceof WaypointTransmitter waypointTransmitter && this.level instanceof ServerLevel serverLevel) {
|
if (this instanceof WaypointTransmitter waypointTransmitter && this.level instanceof ServerLevel serverLevel) {
|
||||||
@@ -3013,11 +_,37 @@
|
@@ -3012,11 +_,37 @@
|
||||||
return PortalShape.getRelativePosition(portal, axis, this.position(), this.getDimensions(this.getPose()));
|
return PortalShape.getRelativePosition(portal, axis, this.position(), this.getDimensions(this.getPose()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1605,7 +1605,7 @@
|
|||||||
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
|
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
|
||||||
for (Entity entity : this.getPassengers()) {
|
for (Entity entity : this.getPassengers()) {
|
||||||
if (entity instanceof ServerPlayer serverPlayer && !serverPlayer.seenCredits) {
|
if (entity instanceof ServerPlayer serverPlayer && !serverPlayer.seenCredits) {
|
||||||
@@ -3125,8 +_,14 @@
|
@@ -3124,8 +_,14 @@
|
||||||
return this.entityData.get(DATA_CUSTOM_NAME_VISIBLE);
|
return this.entityData.get(DATA_CUSTOM_NAME_VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1622,7 +1622,7 @@
|
|||||||
return entity != null;
|
return entity != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3240,7 +_,26 @@
|
@@ -3239,7 +_,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setBoundingBox(AABB bb) {
|
public final void setBoundingBox(AABB bb) {
|
||||||
@@ -1650,7 +1650,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final float getEyeHeight(Pose pose) {
|
public final float getEyeHeight(Pose pose) {
|
||||||
@@ -3272,6 +_,12 @@
|
@@ -3271,6 +_,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopSeenByPlayer(ServerPlayer serverPlayer) {
|
public void stopSeenByPlayer(ServerPlayer serverPlayer) {
|
||||||
@@ -1663,7 +1663,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float rotate(Rotation transformRotation) {
|
public float rotate(Rotation transformRotation) {
|
||||||
@@ -3305,7 +_,7 @@
|
@@ -3304,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -1672,7 +1672,7 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3337,21 +_,32 @@
|
@@ -3336,21 +_,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream<Entity> getIndirectPassengersStream() {
|
private Stream<Entity> getIndirectPassengersStream() {
|
||||||
@@ -1706,7 +1706,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int countPlayerPassengers() {
|
public int countPlayerPassengers() {
|
||||||
@@ -3359,6 +_,7 @@
|
@@ -3358,6 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasExactlyOnePlayerPassenger() {
|
public boolean hasExactlyOnePlayerPassenger() {
|
||||||
@@ -1714,7 +1714,7 @@
|
|||||||
return this.countPlayerPassengers() == 1;
|
return this.countPlayerPassengers() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3441,9 +_,38 @@
|
@@ -3440,9 +_,38 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1754,7 +1754,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3501,6 +_,11 @@
|
@@ -3500,6 +_,11 @@
|
||||||
vec3 = vec3.add(flow);
|
vec3 = vec3.add(flow);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@@ -1766,7 +1766,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3598,7 +_,9 @@
|
@@ -3597,7 +_,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeltaMovement(Vec3 deltaMovement) {
|
public void setDeltaMovement(Vec3 deltaMovement) {
|
||||||
@@ -1776,7 +1776,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addDeltaMovement(Vec3 addend) {
|
public void addDeltaMovement(Vec3 addend) {
|
||||||
@@ -3661,9 +_,45 @@
|
@@ -3660,9 +_,45 @@
|
||||||
return this.getZ((2.0 * this.random.nextDouble() - 1.0) * scale);
|
return this.getZ((2.0 * this.random.nextDouble() - 1.0) * scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1822,7 +1822,7 @@
|
|||||||
int floor = Mth.floor(x);
|
int floor = Mth.floor(x);
|
||||||
int floor1 = Mth.floor(y);
|
int floor1 = Mth.floor(y);
|
||||||
int floor2 = Mth.floor(z);
|
int floor2 = Mth.floor(z);
|
||||||
@@ -3686,6 +_,12 @@
|
@@ -3685,6 +_,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1835,7 +1835,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void checkDespawn() {
|
public void checkDespawn() {
|
||||||
@@ -3739,6 +_,12 @@
|
@@ -3738,6 +_,12 @@
|
||||||
return this.getTicksFrozen() > 0;
|
return this.getTicksFrozen() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1848,7 +1848,7 @@
|
|||||||
public float getYRot() {
|
public float getYRot() {
|
||||||
return this.yRot;
|
return this.yRot;
|
||||||
}
|
}
|
||||||
@@ -3789,7 +_,9 @@
|
@@ -3788,7 +_,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1859,7 +1859,7 @@
|
|||||||
if (this.removalReason == null) {
|
if (this.removalReason == null) {
|
||||||
this.removalReason = removalReason;
|
this.removalReason = removalReason;
|
||||||
}
|
}
|
||||||
@@ -3801,12 +_,28 @@
|
@@ -3800,12 +_,28 @@
|
||||||
this.getPassengers().forEach(Entity::stopRiding);
|
this.getPassengers().forEach(Entity::stopRiding);
|
||||||
this.levelCallback.onRemove(removalReason);
|
this.levelCallback.onRemove(removalReason);
|
||||||
this.onRemoval(removalReason);
|
this.onRemoval(removalReason);
|
||||||
@@ -1888,7 +1888,7 @@
|
|||||||
@Override
|
@Override
|
||||||
public void setLevelCallback(EntityInLevelCallback levelCallback) {
|
public void setLevelCallback(EntityInLevelCallback levelCallback) {
|
||||||
this.levelCallback = levelCallback;
|
this.levelCallback = levelCallback;
|
||||||
@@ -3991,4 +_,14 @@
|
@@ -3990,4 +_,14 @@
|
||||||
return this.save;
|
return this.save;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/world/level/TicketStorage.java
|
--- a/net/minecraft/world/level/TicketStorage.java
|
||||||
+++ b/net/minecraft/world/level/TicketStorage.java
|
+++ b/net/minecraft/world/level/TicketStorage.java
|
||||||
@@ -161,7 +_,7 @@
|
@@ -163,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isTicketSameTypeAndLevel(Ticket first, Ticket second) {
|
private static boolean isTicketSameTypeAndLevel(Ticket first, Ticket second) {
|
||||||
@@ -9,16 +9,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getTicketLevelAt(long chunkPos, boolean requireSimulation) {
|
public int getTicketLevelAt(long chunkPos, boolean requireSimulation) {
|
||||||
@@ -264,7 +_,7 @@
|
@@ -272,7 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deactivateTicketsOnClosing() {
|
public void deactivateTicketsOnClosing() {
|
||||||
- this.removeTicketIf(ticket -> ticket.getType() != TicketType.UNKNOWN, this.deactivatedTickets);
|
- this.removeTicketIf((_long, ticket) -> ticket.getType() != TicketType.UNKNOWN, this.deactivatedTickets);
|
||||||
+ this.removeTicketIf(ticket -> ticket.getType() != TicketType.UNKNOWN && ticket.getType() != TicketType.CHUNK_LOAD && ticket.getType() != TicketType.FUTURE_AWAIT, this.deactivatedTickets);
|
+ this.removeTicketIf((_long, ticket) -> ticket.getType() != TicketType.UNKNOWN && ticket.getType() != TicketType.CHUNK_LOAD && ticket.getType() != TicketType.FUTURE_AWAIT, this.deactivatedTickets);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeTicketIf(Predicate<Ticket> predicate, @Nullable Long2ObjectOpenHashMap<List<Ticket>> tickets) {
|
public void removeTicketIf(BiPredicate<Long, Ticket> biPredicate, @Nullable Long2ObjectOpenHashMap<List<Ticket>> map) {
|
||||||
@@ -369,4 +_,19 @@
|
@@ -378,4 +_,19 @@
|
||||||
public interface ChunkUpdated {
|
public interface ChunkUpdated {
|
||||||
void update(long chunkPos, int i, boolean ticketLevel);
|
void update(long chunkPos, int i, boolean ticketLevel);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user