mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 21:47:55 +01:00
More more more more more more more work
This commit is contained in:
parent
7f384988cd
commit
c1f313b273
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
index b26a6354eaf2a699ab10da71afafebc807b4b06d..d3e91faee8805e88d850740fb5de9e5c8288c48b 100644
|
||||
index 61afe72beb9f17a6c2b09d2aed9dd6aa4c36a816..0035461aff86fa3f44c860e7d77589b974446048 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
@@ -129,7 +129,9 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
|
@ -11,7 +11,7 @@ to the nearest Integer when updating its current cook time.
|
||||
Modified by: Eric Su <ericsu@alumni.usc.edu>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 4ed87cc5a46d9e10c755631a16f0e0cb388fb7f2..faa5beffb29e416f2a9af96ac66b5f88729e4705 100644
|
||||
index d56a64b058d8848e405e33d9884a61ea952a8f71..40dc29288a13ae9c1f8b0434922fdb5c7d02daa9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -77,11 +77,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@ -5,7 +5,7 @@ Subject: [PATCH] Honor EntityAgeable.ageLock
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
||||
index ea71049ebe3d135b4ff0a7b288221e2ceccd5035..63d5913c431e4cef733240a928465d90a542e6c7 100644
|
||||
index be5e603d505566feac61cc7e591d35ce483a92df..2061d7ae62c1335c87aa67fd0cc004c42e34e3a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
||||
@@ -85,6 +85,7 @@ public abstract class AgeableMob extends PathfinderMob {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index cca08b8c6e1e15f13326a2a7e33e7f3225ad894b..50521cbd2af1c723d7caaf298fd052af905802b6 100644
|
||||
index a3b610cb1ed97a635677bc46ccdf0463c9918585..94b062874ef9d4935a7ad2c7b45b2e6b786eaa81 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -51,7 +51,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@ -9,7 +9,7 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
|
||||
spawners.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 4e1d28fbe67bc7a3d0741acd490be8db787480ae..405f36e9e115ad44bb91aad885785761786204ca 100644
|
||||
index 3294e5b5ed0288af08067c36ca34514d02d200d3..b5d605feff68181269f23d95d60a3ed555133d85 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -134,11 +134,11 @@ public abstract class BaseSpawner {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 73cefc7ec582cb0fbfcff32cb9311f34ec2f31f0..eb58b3230b46ade4403c31113d244b933b8a4a71 100644
|
||||
index e1780e5eec0171cc39b0bc27d48c0ce167ebec5d..6be24dea49918cb377cd21e55927c304e288ed2b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -115,6 +115,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||
@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -16,7 +16,7 @@ index 73cefc7ec582cb0fbfcff32cb9311f34ec2f31f0..eb58b3230b46ade4403c31113d244b93
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@@ -3792,6 +3793,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3840,6 +3841,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return level.clip(raytrace);
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API
|
||||
public net.minecraft.world.entity.Mob isSunBurnTick()Z
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index ba4f1012c2046921c2c48583a5384fd7e4c05af7..4421392702304514c2cb26f32817ed150c9dc947 100644
|
||||
index d88464af8b98ad12e90c423abe5e483ab0455666..728f9046648411580b81773f59ac6cf95a3053e7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -687,6 +687,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -697,6 +697,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public net.minecraft.world.entity.animal.Turtle isTravelling()Z
|
||||
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f75d7ddbe1 100644
|
||||
index 60e291abb3ebdf8676c13a2138d8eb436d033fa2..d27e5f9dac4703b839ab8444f6b54bf54d58af86 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
@@ -14,7 +14,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
@ -25,7 +25,7 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7
|
||||
private final int searchRange;
|
||||
private final int verticalSearchRange;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
index fb5af59559bc18ce2850d95ef73e5545dcab5ebc..b03c919edc33f308409ceeea0dd1064d1c6d7906 100644
|
||||
index fcd760cb88f84ff79811631612956fde79905132..8ad2fc2e4c958f63712d9a66b1de18cf6c48d8e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
@@ -487,15 +487,18 @@ public class Turtle extends Animal {
|
||||
@ -35,7 +35,7 @@ index fb5af59559bc18ce2850d95ef73e5545dcab5ebc..b03c919edc33f308409ceeea0dd1064d
|
||||
- this.turtle.setLayingEgg(true);
|
||||
+ this.turtle.setLayingEgg(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.turtle.getBukkitEntity(), io.papermc.paper.util.MCUtil.toLocation(this.turtle.level, this.getTargetPosition())).callEvent()); // Paper
|
||||
} else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
|
||||
Level world = this.turtle.level;
|
||||
Level world = this.turtle.level();
|
||||
|
||||
// CraftBukkit start
|
||||
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1)).isCancelled()) {
|
@ -19,10 +19,10 @@ spectate the target entity.
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3f9ae61ac16a4ec13c6a571ab3d5188f37d205f2..9f6531a2d20583355587dab1503573024a12144d 100644
|
||||
index e41abf22992d9348cc3c63866b01a5dbf02d6a2c..a15eca1b3280495b71012b42d94f5ad0b53d9e24 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1933,6 +1933,19 @@ public class ServerPlayer extends Player {
|
||||
@@ -1936,6 +1936,19 @@ public class ServerPlayer extends Player {
|
||||
|
||||
this.camera = (Entity) (entity == null ? this : entity);
|
||||
if (entity1 != this.camera) {
|
||||
@ -39,10 +39,10 @@ index 3f9ae61ac16a4ec13c6a571ab3d5188f37d205f2..9f6531a2d20583355587dab150357302
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
Level world = this.camera.getLevel();
|
||||
Level world = this.camera.level();
|
||||
|
||||
if (world instanceof ServerLevel) {
|
||||
@@ -1948,7 +1961,6 @@ public class ServerPlayer extends Player {
|
||||
@@ -1951,7 +1964,6 @@ public class ServerPlayer extends Player {
|
||||
this.connection.send(new ClientboundSetCameraPacket(this.camera));
|
||||
this.connection.resetPosition();
|
||||
}
|
@ -11,17 +11,17 @@ If the projectile fails to find the shooter in the current world, check
|
||||
other worlds.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 621ecd0f3cac52d3e4cecd003c67401ec7f0a6f7..a85175190c1ebb14b496a0bfe2f7136e06d0072c 100644
|
||||
index f49dd279ba9e8970f116f956466feb072c4f8420..e5da57b35cd82ee7b4e844cfe74289a71d38779a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -60,6 +60,18 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
return this.cachedOwner;
|
||||
} else if (this.ownerUUID != null && this.level instanceof ServerLevel) {
|
||||
this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID);
|
||||
} else if (this.ownerUUID != null && this.level() instanceof ServerLevel) {
|
||||
this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID);
|
||||
+ // Paper start - check all worlds
|
||||
+ if (this.cachedOwner == null) {
|
||||
+ for (final ServerLevel level : this.level.getServer().getAllLevels()) {
|
||||
+ if (level == this.level) continue;
|
||||
+ for (final ServerLevel level : this.level().getServer().getAllLevels()) {
|
||||
+ if (level == this.level()) continue;
|
||||
+ final Entity entity = level.getEntity(this.ownerUUID);
|
||||
+ if (entity != null) {
|
||||
+ this.cachedOwner = entity;
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add more Witch API
|
||||
public net.minecraft.world.entity.monster.Witch usingTime
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d522766719 100644
|
||||
index df024c3108df807772fc487f5c59004a59938bf2..701f6bf1d558cf0ec4bc1abb9e1f66d96ea5a6c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
@@ -157,21 +157,24 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
@@ -157,21 +157,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
}
|
||||
|
||||
if (potionregistry != null) {
|
||||
@ -20,24 +20,11 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5
|
||||
- this.setItemSlot(EquipmentSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack));
|
||||
+ // Paper start - logic moved into setDrinkingPotion, copy exact impl into the method and then comment out
|
||||
+ this.setDrinkingPotion(potion);
|
||||
+// org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion));
|
||||
+// this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack));
|
||||
+// // Paper end
|
||||
+// this.bq = this.getItemInMainHand().k();
|
||||
+// this.v(true);
|
||||
+// if (!this.isSilent()) {
|
||||
+// this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
+// }
|
||||
+//
|
||||
+// AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
+//
|
||||
+// attributemodifiable.removeModifier(EntityWitch.bo);
|
||||
+// attributemodifiable.b(EntityWitch.bo);
|
||||
// Paper end
|
||||
- this.usingTime = this.getMainHandItem().getUseDuration();
|
||||
- this.setUsingItem(true);
|
||||
- if (!this.isSilent()) {
|
||||
- this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
- }
|
||||
-
|
||||
- AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
@ -47,7 +34,7 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,6 +186,24 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
@@ -183,6 +173,24 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
super.aiStep();
|
||||
}
|
||||
|
||||
@ -59,7 +46,7 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5
|
||||
+ this.usingTime = this.getMainHandItem().getUseDuration();
|
||||
+ this.setUsingItem(true);
|
||||
+ if (!this.isSilent()) {
|
||||
+ this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
+ this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
+ }
|
||||
+
|
||||
+ AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||
index 966eb1e2fc747965d15bb1cfc0d812d10afbf43f..f00773e05654bdeb5463f448293aac99d2208813 100644
|
||||
index 3e4fde2736feb03af2116cd218358845cd8f99d8..a1dec28207e4289c8cd5eb3d6c56358055ebecfb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||
@@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2d10290d1 100644
|
||||
index 1aec3ec3debe3adfd5fda424761b559614dfdc84..ad1fa44281b8ce907fd7434a13d29c3717296877 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -567,9 +567,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -39,7 +39,7 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2
|
||||
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
// CraftBukkit end
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
|
||||
@@ -1253,9 +1263,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1250,9 +1260,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.allowedPlayerTicks = 20; // CraftBukkit
|
||||
} else {
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
@ -52,7 +52,7 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2
|
||||
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
|
||||
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
|
||||
|
||||
@@ -1311,6 +1321,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1307,6 +1317,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
} else {
|
||||
speed = this.player.getAbilities().walkingSpeed * 10f;
|
||||
}
|
||||
@ -63,5 +63,5 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
if (!this.player.isChangingDimension() && (!this.player.getLevel().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9f6531a2d20583355587dab1503573024a12144d..fbd470bb9fccf1f923c55f3b7906bc65aa34c01e 100644
|
||||
index a15eca1b3280495b71012b42d94f5ad0b53d9e24..069aebb9297b4d77524481d891fa35fb71b8183c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2369,6 +2369,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2412,6 +2412,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
|
@ -35,10 +35,10 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9a6f849bd 100644
|
||||
index 0f05d26248d8c999048a88796df227a6a1e3755f..7354711e194ab58b11b68f447c1fc795fe611a65 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -80,7 +80,7 @@ public class Util {
|
||||
@@ -81,7 +81,7 @@ public class Util {
|
||||
private static final int DEFAULT_MAX_THREADS = 255;
|
||||
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||
@ -47,7 +47,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9
|
||||
// Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||
public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() {
|
||||
|
||||
@@ -143,14 +143,18 @@ public class Util {
|
||||
@@ -144,14 +144,18 @@ public class Util {
|
||||
return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now());
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9
|
||||
@Override
|
||||
protected void onTermination(Throwable throwable) {
|
||||
if (throwable != null) {
|
||||
@@ -166,6 +170,7 @@ public class Util {
|
||||
@@ -167,6 +171,7 @@ public class Util {
|
||||
return forkJoinWorkerThread;
|
||||
}, Util::onThreadException, true);
|
||||
}
|
||||
@ -79,7 +79,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9
|
||||
return executorService;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 387c423dfe69a3310f8e7aa3dbb7faafc9501e50..852b148a37a8ef632a02a2c264f2b3a8fa4175ac 100644
|
||||
index a6d0d3b4f9d69391fb33c4d13388ad573939a36f..1bc5b64af1f6430ae5ac41efbd8cd9309f2ad44d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -321,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@ -8,24 +8,24 @@ the updates per world, so that we can re-use the same packet
|
||||
object for every player unless they have per-player time enabled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 852b148a37a8ef632a02a2c264f2b3a8fa4175ac..d95a618dfdb50a6c6a5fc086cb5e88e0b0a91b71 100644
|
||||
index 1bc5b64af1f6430ae5ac41efbd8cd9309f2ad44d..12c2fe5c64a5d6b93e405fa6c84b00f015a9f8eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1391,12 +1391,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1395,12 +1395,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
- if (this.tickCount % 20 == 0) {
|
||||
- for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
- ServerPlayer entityplayer = (ServerPlayer) this.getPlayerList().players.get(i);
|
||||
- entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||
- entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||
+ // Paper start - optimize time updates
|
||||
+ for (final ServerLevel world : this.getAllLevels()) {
|
||||
+ final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
||||
+ final long dayTime = world.getDayTime();
|
||||
+ long worldTime = world.getGameTime();
|
||||
+ for (final ServerLevel level : this.getAllLevels()) {
|
||||
+ final boolean doDaylight = level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
||||
+ final long dayTime = level.getDayTime();
|
||||
+ long worldTime = level.getGameTime();
|
||||
+ final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
|
||||
+ for (Player entityhuman : world.players()) {
|
||||
+ for (Player entityhuman : level.players()) {
|
||||
+ if (!(entityhuman instanceof ServerPlayer) || (tickCount + entityhuman.getId()) % 20 != 0) {
|
||||
+ continue;
|
||||
+ }
|
@ -161,7 +161,7 @@ index 0000000000000000000000000000000000000000..224d4b2cc45b0d02230a76caee9c8857
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index fe54d5cb2414c7b6f42d192c74f810e7b5e43f0e..04088918e172eecb8d53b0e6de9be0071ccf33b5 100644
|
||||
index 8ea031537c27b219c22316bff191670c48ebd602..bdaa739aa18a95894a165e9333a3e9d596fd7dc3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -49,7 +49,7 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
@ -182,7 +182,7 @@ index fe54d5cb2414c7b6f42d192c74f810e7b5e43f0e..04088918e172eecb8d53b0e6de9be007
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -248,6 +248,10 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
@@ -246,6 +246,10 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
this.lastSlots = delegate.lastSlots;
|
||||
this.slots = delegate.slots;
|
||||
this.remoteSlots = delegate.remoteSlots;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
|
||||
CraftBukkit changed the values on flying speed, restore back to vanilla
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index 09157d234616faaf66546b02b281f9fb7e5c57c0..b66f06d0442ed65023f84ea15651ddfc72f056a5 100644
|
||||
index 700db80055d93274aeccbe4a57a1a98f261442fb..c2a18a8e52f897bc96227854646e53e4dc189362 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -103,9 +103,9 @@ public abstract class AbstractMinecart extends Entity {
|
||||
@@ -104,9 +104,9 @@ public abstract class AbstractMinecart extends Entity {
|
||||
private double derailedX = 0.5;
|
||||
private double derailedY = 0.5;
|
||||
private double derailedZ = 0.5;
|
@ -6,20 +6,18 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
|
||||
Only process drops when the block is actually going to be removed
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
index 8fe119f1ce36ce9ee63a1ba32df0ae8645b6a669..7304b2659eb45bc4bc9fa7c43e6ca07221d0fc73 100644
|
||||
index 305803d54058c0bd48808d3b2dec8b474d9c2591..2bf1334ea6414557b099302f9414253ae4dba229 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
|
||||
@@ -129,8 +129,11 @@ public class SpongeBlock extends Block {
|
||||
// NOP
|
||||
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition2) : null;
|
||||
-
|
||||
- dropResources(iblockdata, world, blockposition2, tileentity);
|
||||
@@ -124,7 +124,11 @@ public class SpongeBlock extends Block {
|
||||
} else if (iblockdata.is(Blocks.KELP) || iblockdata.is(Blocks.KELP_PLANT) || iblockdata.is(Blocks.SEAGRASS) || iblockdata.is(Blocks.TALL_SEAGRASS)) {
|
||||
BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
|
||||
|
||||
+ // Paper start
|
||||
+ if (block.getHandle().getMaterial() == Material.AIR) {
|
||||
+ dropResources(iblockdata, world, blockposition2, tileentity);
|
||||
dropResources(iblockdata, world, blockposition1, tileentity);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
world.setBlock(blockposition2, block.getHandle(), block.getFlag());
|
||||
world.setBlock(blockposition1, block.getHandle(), block.getFlag());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 21401c872035d4dc46a05c066b321d99e0d94b72..618888eac8381b174850e351577601f1d881528d 100644
|
||||
index 0d72be376615f84934b031243ef283b6efc0bd13..562534d15f6f70ff286be90fb512b807e00ad807 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -119,8 +119,8 @@ public class ServerPlayerGameMode {
|
||||
@ -59,19 +59,19 @@ index 21401c872035d4dc46a05c066b321d99e0d94b72..618888eac8381b174850e351577601f1
|
||||
|
||||
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dce8658b06b5c86aebd5df8aa9b40eb2d10290d1..a69f7ea461ccfd6d6f842a4b33672187f10264ec 100644
|
||||
index ad1fa44281b8ce907fd7434a13d29c3717296877..294e12ac06a5292eda818aabbf3a019f35ca50e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1660,6 +1660,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1652,6 +1652,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
case START_DESTROY_BLOCK:
|
||||
case ABORT_DESTROY_BLOCK:
|
||||
case STOP_DESTROY_BLOCK:
|
||||
+ // Paper start - Don't allow digging in unloaded chunks
|
||||
+ if (this.player.level.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) == null) {
|
||||
+ if (this.player.level().getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) == null) {
|
||||
+ this.player.connection.ackBlockChangesUpTo(packet.getSequence());
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Don't allow digging in unloaded chunks
|
||||
this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level.getMaxBuildHeight(), packet.getSequence());
|
||||
this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level().getMaxBuildHeight(), packet.getSequence());
|
||||
this.player.connection.ackBlockChangesUpTo(packet.getSequence());
|
||||
return;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
index e3467aaf6d0c8d486b84362e3c20b3fe631b50ff..8f16640fc2f1233c10392d7e32a54d784fd8e370 100644
|
||||
index a52e6e8be323863ece6624a8ae7f9455279bdc23..ae046aff4b9d2ced37ee3e8e908780a807b5c4dd 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
@@ -76,7 +76,7 @@ public final class PaperCommand extends Command {
|
||||
@@ -75,7 +75,7 @@ public final class PaperCommand extends Command {
|
||||
if (sender.hasPermission(BASE_PERM + permission) || sender.hasPermission("bukkit.command.paper")) {
|
||||
return true;
|
||||
}
|
||||
@ -18,10 +18,10 @@ index e3467aaf6d0c8d486b84362e3c20b3fe631b50ff..8f16640fc2f1233c10392d7e32a54d78
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 195b3f20617f9ad1e1fa522d138be3b570aa49a4..03a175ce27f7d816ce1f157f41674cd4dbcc5fe2 100644
|
||||
index 56d090f5635a790bc856438edc16153b2e1f66f9..9020f6ab2391e67670333bb4bdf0125cd392f4ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2691,6 +2691,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2689,6 +2689,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ If a players inventory is too big to send in a single packet,
|
||||
split the inventory set into multiple packets instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index b1a9c75081f7e61212ea9395b35375e067fd7fc6..6f903ad884db68f654a9f2501e336123699c11a3 100644
|
||||
index 0a4a875cd3d7f8f864d583d94b6f3869139db48e..53023ccc2ff3c512634b3413665318c3c3669f5b 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -152,6 +152,18 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -130,6 +130,18 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
|
||||
public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) {
|
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
|
||||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aefe5f42e7b 100644
|
||||
index b1697cf2501f75620bf82d3b9eb8ca81491baff0..53559c8cbf6df35255cb231b5eaa6cd4d940bd84 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2423,11 +2423,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2490,11 +2490,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void removeVehicle() {
|
||||
@ -41,7 +41,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2491,7 +2496,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2558,7 +2563,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2501,7 +2509,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2568,7 +2576,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) this.getBukkitEntity(),
|
||||
@ -62,7 +62,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef
|
||||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2515,7 +2523,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2582,7 +2590,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
@ -72,10 +72,10 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef
|
||||
if (this.valid) {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 30abef77152b77b563b3da0df8e5bf5731999e53..406d495a410c23d43cf72444e8f0c2dc8b3fa52c 100644
|
||||
index 6be24dea49918cb377cd21e55927c304e288ed2b..724e4a870d0bbe4c1895ea6a745972ebdd9f5c52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3396,9 +3396,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3445,9 +3445,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void stopRiding() {
|
||||
@ -89,14 +89,14 @@ index 30abef77152b77b563b3da0df8e5bf5731999e53..406d495a410c23d43cf72444e8f0c2dc
|
||||
|
||||
- super.stopRiding();
|
||||
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
||||
if (entity != null && entity != this.getVehicle() && !this.level.isClientSide) {
|
||||
if (entity != null && entity != this.getVehicle() && !this.level().isClientSide) {
|
||||
this.dismountVehicle(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 9c12fc197c5367a35acda4155707c602f043e571..a7e0203cc4bf7d98b65230fdbc4d873eeabdf9da 100644
|
||||
index c7bcbc3f0542a74c30e29bded3bfc0e94daeab25..078986fb32eeecacc954ad6719e981ed8b3a2350 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1147,7 +1147,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1148,7 +1148,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void removeVehicle() {
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add more Zombie API
|
||||
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 8ecbb64f9db9346757c5597404489496a0945508..f0bad2264df3a4b4631d66dad46ec03470a206ee 100644
|
||||
index d07e321a3836a15058f11c88cc0deedb124bb407..69c54b68b364f58a3319154cd984069dd5b6c901 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -95,6 +95,7 @@ public class Zombie extends Monster {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
|
||||
Puts some limits on the size of books.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a69f7ea461ccfd6d6f842a4b33672187f10264ec..3b5384e27436b93351fcf4b4d938bc13cca9fd58 100644
|
||||
index 294e12ac06a5292eda818aabbf3a019f35ca50e0..013341102d81cbd03f6da5f702acd90191560e94 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1120,6 +1120,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1117,6 +1117,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
@ -39,10 +39,10 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl state
|
||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 6f903ad884db68f654a9f2501e336123699c11a3..e1eea381a2ebcc32424d31c42a45287d2a1cb16a 100644
|
||||
index 53023ccc2ff3c512634b3413665318c3c3669f5b..7e11cf7d6871b6125ccccae2b765cd4dfcf38d3b 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -490,6 +490,26 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -464,6 +464,26 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
this.getPacketListener().onDisconnect(Component.translatable("multiplayer.disconnect.generic"));
|
||||
}
|
||||
this.queue.clear(); // Free up packet queue.
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Enderman from loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 908ef284f17296c72009a5803dfefff13664fb1c..c8fe9126f0b6e973aae04d825613fcf67e0838d2 100644
|
||||
index acd41b474fadee12c571f390b937f455cbe393ad..fd608b1461ef28a5181ed3beb31f356272f8328f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -506,7 +506,8 @@ public class EnderMan extends Monster implements NeutralMob {
|
@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
|
||||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index fbd470bb9fccf1f923c55f3b7906bc65aa34c01e..140fdbdcc20b53d7dc3e1d4d027878d9d2db4ef7 100644
|
||||
index 069aebb9297b4d77524481d891fa35fb71b8183c..561b02d0dfbf3d20bf8f318bdb883ab35c634b4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -243,6 +243,7 @@ public class ServerPlayer extends Player {
|
||||
@ -28,7 +28,7 @@ index fbd470bb9fccf1f923c55f3b7906bc65aa34c01e..140fdbdcc20b53d7dc3e1d4d027878d9
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 952e0735bf1e66a812c90f283203c4f73e3905a5..06961cb5cf7c3e8898c93b4f4d0449e7c3edc4b4 100644
|
||||
index 2167303e425b5921240e35757dc634c561875e8b..2aaa8b4f89ce5c2d2e3d931e1c16b630e7863cc4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -189,6 +189,7 @@ public abstract class PlayerList {
|
||||
@ -38,7 +38,7 @@ index 952e0735bf1e66a812c90f283203c4f73e3905a5..06961cb5cf7c3e8898c93b4f4d0449e7
|
||||
+ player.loginTime = System.currentTimeMillis(); // Paper
|
||||
GameProfile gameprofile = player.getGameProfile();
|
||||
GameProfileCache usercache = this.server.getProfileCache();
|
||||
Optional<GameProfile> optional = usercache.get(gameprofile.getId());
|
||||
String s;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd96394f87 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
@ -106,7 +106,7 @@ index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd
|
||||
public Location getLastDeathLocation() {
|
||||
if (this.getData().contains("LastDeathLocation", 10)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa7314f9e583 100644
|
||||
index a33262e0bcc98321cb7acef533973629de5278a6..52de6df905babf9e7546f1428fd39df988812fe4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -183,6 +183,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -117,7 +117,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73
|
||||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||
@@ -1933,6 +1934,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1864,6 +1865,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.firstPlayed = firstPlayed;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73
|
||||
public void readExtraData(CompoundTag nbttagcompound) {
|
||||
this.hasPlayedBefore = true;
|
||||
if (nbttagcompound.contains("bukkit")) {
|
||||
@@ -1955,6 +1968,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1886,6 +1899,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setExtraData(CompoundTag nbttagcompound) {
|
||||
@ -145,7 +145,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73
|
||||
if (!nbttagcompound.contains("bukkit")) {
|
||||
nbttagcompound.put("bukkit", new CompoundTag());
|
||||
}
|
||||
@@ -1969,6 +1984,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1900,6 +1915,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
data.putLong("firstPlayed", this.getFirstPlayed());
|
||||
data.putLong("lastPlayed", System.currentTimeMillis());
|
||||
data.putString("lastKnownName", handle.getScoreboardName());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 140fdbdcc20b53d7dc3e1d4d027878d9d2db4ef7..4a4c9bcfa24e116aa242de2cc4291cf4480331b1 100644
|
||||
index 561b02d0dfbf3d20bf8f318bdb883ab35c634b4f..04ce33975b8ed83c3d803cd319228bcadf94f1de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1598,6 +1598,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1602,6 +1602,13 @@ public class ServerPlayer extends Player {
|
||||
public void disconnect() {
|
||||
this.disconnected = true;
|
||||
this.ejectPassengers();
|
@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
|
||||
be unintentional in the few cases we've seen so far.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a87007a67ee1188150abab643329fa7314f9e583..fefe3dc1597d7449e0138be2f60918b06864108a 100644
|
||||
index 52de6df905babf9e7546f1428fd39df988812fe4..0ee73b66c47767f734dee86b0ba5fb9501ab811a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2848,6 +2848,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2779,6 +2779,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetAttackStrengthTicker();
|
||||
}
|
@ -11,7 +11,7 @@ floating in the air.
|
||||
This can replace many uses of BlockPhysicsEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2..d0fe8a99163c924c44983a9a575bd76714865cab 100644
|
||||
index 9f64020550a721ae01f9ffbe870b75762bfbd423..1fa76e005c39698a48068baa430a9c1f48e1bb85 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
@ -20,9 +20,9 @@ index e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2..d0fe8a99163c924c44983a9a575bd767
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
+import io.papermc.paper.util.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.FullChunkStatus;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@@ -589,8 +590,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -577,8 +578,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return false;
|
||||
} else {
|
||||
FluidState fluid = this.getFluidState(pos);
|
@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues
|
||||
due to the shutdown logic generally being much later.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e1456b04f7b 100644
|
||||
index e3394864e29357fec036f9e616472aeab95d035e..b7f1569c662df13f278fc704cabec0400ba7c382 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -396,6 +396,24 @@ public class Commands {
|
||||
@@ -398,6 +398,24 @@ public class Commands {
|
||||
if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
|
||||
// CraftBukkit start
|
||||
// Register Vanilla commands into builtRoot as before
|
||||
@ -37,7 +37,7 @@ index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e14
|
||||
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||
RootCommandNode vanillaRoot = new RootCommandNode();
|
||||
|
||||
@@ -413,7 +431,14 @@ public class Commands {
|
||||
@@ -415,7 +433,14 @@ public class Commands {
|
||||
for (CommandNode node : rootcommandnode.getChildren()) {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
@ -53,10 +53,10 @@ index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e14
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d95a618dfdb50a6c6a5fc086cb5e88e0b0a91b71..d11ba8d081861b852bf74662d5e963ac89c226ca 100644
|
||||
index 12c2fe5c64a5d6b93e405fa6c84b00f015a9f8eb..04b4173d33fc56e3ad3d958e7ffad967d4890bf0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -900,6 +900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -888,6 +888,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
@ -10,7 +10,7 @@ Adds CommandRegisteredEvent
|
||||
- Allows manipulating the CommandNode to add more children/metadata for the client
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 6ca33c80c8bd4d87953103c06804fa9a0eef4f3c..b6b077262132be3b30f81a2a6c9288afbd11c358 100644
|
||||
index 89bdaf0da412eb13c33039599df90b9ac86b02bf..d86a4eebb4fd4144d762407aaccc7de497d0a5c1 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -8,6 +8,7 @@ plugins {
|
||||
@ -59,10 +59,10 @@ index da6250df1c5f3385b683cffde47754bca4606f5e..3384501f83d445f45aa8233e98c7597d
|
||||
public void removeCommand(String name) {
|
||||
this.children.remove(name);
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 65d8c7d5aab8c6afe3c5671a90ad0fbc03bedfdd..efad6dc30ff2731fdaed9c7f8d974aba8d8a4bcf 100644
|
||||
index 34fdef41d1eb3fe78bf688d69aae437d89a337bb..66bd75ee66840f17cc7d00ff89adcb88d83e4dc9 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -41,7 +41,7 @@ import net.minecraft.world.phys.Vec2;
|
||||
@@ -43,7 +43,7 @@ import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import com.mojang.brigadier.tree.CommandNode; // CraftBukkit
|
||||
|
||||
@ -71,7 +71,7 @@ index 65d8c7d5aab8c6afe3c5671a90ad0fbc03bedfdd..efad6dc30ff2731fdaed9c7f8d974aba
|
||||
|
||||
public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player"));
|
||||
public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity"));
|
||||
@@ -171,6 +171,26 @@ public class CommandSourceStack implements SharedSuggestionProvider {
|
||||
@@ -180,6 +180,26 @@ public class CommandSourceStack implements SharedSuggestionProvider {
|
||||
return this.textName;
|
||||
}
|
||||
|
||||
@ -99,10 +99,10 @@ index 65d8c7d5aab8c6afe3c5671a90ad0fbc03bedfdd..efad6dc30ff2731fdaed9c7f8d974aba
|
||||
public boolean hasPermission(int level) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29d00117cb 100644
|
||||
index b7f1569c662df13f278fc704cabec0400ba7c382..87ce129e1d592bcf68169feb559f44d5cda7c486 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -432,6 +432,7 @@ public class Commands {
|
||||
@@ -434,6 +434,7 @@ public class Commands {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
// Paper start - Async command map building
|
||||
@ -110,7 +110,7 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29
|
||||
net.minecraft.server.MinecraftServer.getServer().execute(() -> {
|
||||
runSync(player, bukkit, rootcommandnode);
|
||||
});
|
||||
@@ -439,6 +440,7 @@ public class Commands {
|
||||
@@ -441,6 +442,7 @@ public class Commands {
|
||||
|
||||
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||
// Paper end - Async command map building
|
||||
@ -118,7 +118,7 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29
|
||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -457,6 +459,11 @@ public class Commands {
|
||||
@@ -459,6 +461,11 @@ public class Commands {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
|
||||
@ -131,10 +131,10 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29
|
||||
|
||||
if (commandnode2.canUse(source)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3b5384e27436b93351fcf4b4d938bc13cca9fd58..0b61a213eeae7d39b6478b732ebb8d9ecd8c994a 100644
|
||||
index 013341102d81cbd03f6da5f702acd90191560e94..7468c3b92f76bde9259f817370be5106ecb3887a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -832,8 +832,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -833,8 +833,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
||||
|
||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||
@ -149,7 +149,7 @@ index 3b5384e27436b93351fcf4b4d938bc13cca9fd58..0b61a213eeae7d39b6478b732ebb8d9e
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -848,7 +852,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -849,7 +853,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
|
||||
}
|
||||
});
|
@ -10,7 +10,7 @@ This made the Bukkit RecipeChoice API not work for Shapeless.
|
||||
This reimplements vanilla logic using the same test logic as Shaped
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
index 95eb0d2c624f196e4c4d3d4367a47af881e946a8..f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2 100644
|
||||
index 1023dcb80dfb978dd496ed0f96ca5832fadf0f87..7f174bb89bf4d700a5ae1b65d8abd4f5b1e7b5ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
@@ -85,16 +85,49 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
||||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b834142d8b7eae50b8b9a1b0edaa41f64b950f43..e9cbca84ad7c2c48445fbd0266c5792b12227cd7 100644
|
||||
index 7468c3b92f76bde9259f817370be5106ecb3887a..73af810aa0fe6c17244a23585a92e3cad97b7ab3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -300,6 +300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -33,7 +33,7 @@ index b834142d8b7eae50b8b9a1b0edaa41f64b950f43..e9cbca84ad7c2c48445fbd0266c5792b
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -3199,7 +3200,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3191,7 +3192,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
@ -1,29 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 2 Mar 2019 11:11:29 -0500
|
||||
Subject: [PATCH] Don't check ConvertSigns boolean every sign save
|
||||
|
||||
property lookups arent super cheap. they synchronize, validate
|
||||
and check security managers.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index 149728fa6371b4d8b0afaae769aacac27401ea03..aca2da47651a76f3e5593d71c500d749d92ccc3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class SignBlockEntity extends BlockEntity implements CommandSource { // CraftBukkit - implements
|
||||
+ private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper
|
||||
|
||||
public static final int LINES = 4;
|
||||
private static final int MAX_TEXT_LINE_WIDTH = 90;
|
||||
@@ -84,7 +85,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
- if (Boolean.getBoolean("convertLegacySigns")) {
|
||||
+ if (CONVERT_LEGACY_SIGNS) { // Paper
|
||||
nbt.putBoolean("Bukkit.isConverted", true);
|
||||
}
|
||||
// CraftBukkit end
|
Loading…
Reference in New Issue
Block a user