mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 01:47:42 +01:00
194
This commit is contained in:
parent
2055809b1e
commit
0b7552272a
@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
|||||||
which are limited in quantity.
|
which are limited in quantity.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
index 672301d47037f96f32c52fa400ed28694f3b138b..96240f8ed0675ebfd403fcef144657885c4bb9a9 100644
|
index 9358498491cd25ef760527ebd83188b76f8458f1..73a222d91dab1d5d1390b018f9537624aaff0798 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
@@ -1667,7 +1667,8 @@ public class VillagerTrades {
|
@@ -1828,7 +1828,8 @@ public class VillagerTrades {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
ServerLevel serverLevel = (ServerLevel)entity.level();
|
ServerLevel serverLevel = (ServerLevel)entity.level();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add API methods to control if armor stands can move
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
index c443fef645702e2a3eae8dcd1526d4bc4d269b0f..dd7ecba4525d90e6b9509d1c3cab24c1615e37a9 100644
|
index af954b2c0c7106a231fb15172da3fa8e1d281d56..dae6835696e90bc5a541cacd37ea7aa88c60f4f4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
@@ -96,6 +96,7 @@ public class ArmorStand extends LivingEntity {
|
@@ -95,6 +95,7 @@ public class ArmorStand extends LivingEntity {
|
||||||
public Rotations rightArmPose;
|
public Rotations rightArmPose;
|
||||||
public Rotations leftLegPose;
|
public Rotations leftLegPose;
|
||||||
public Rotations rightLegPose;
|
public Rotations rightLegPose;
|
||||||
@ -16,7 +16,7 @@ index c443fef645702e2a3eae8dcd1526d4bc4d269b0f..dd7ecba4525d90e6b9509d1c3cab24c1
|
|||||||
|
|
||||||
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -942,4 +943,13 @@ public class ArmorStand extends LivingEntity {
|
@@ -949,4 +950,13 @@ public class ArmorStand extends LivingEntity {
|
||||||
public boolean canBeSeenByAnyone() {
|
public boolean canBeSeenByAnyone() {
|
||||||
return !this.isInvisible() && !this.isMarker();
|
return !this.isInvisible() && !this.isMarker();
|
||||||
}
|
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] String based Action Bar API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 93e537aa401bc17f2a34da4f0119026ee34e2c1f..8a6ce3d9eda1aa14577c4441d3f3d76fb6750f69 100644
|
index b6c5636f21bfbade1dc9d048579e513f43642eb6..591dac203a4b93630fd4b1a95f44aaa364571cd8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -386,6 +386,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -388,6 +388,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
|||||||
Credit to prplz for figuring out the real issue
|
Credit to prplz for figuring out the real issue
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index eb04f9ae48d1122cd08ccdd2798131dd124221df..96bc2fa87502c363c68822d512e3c63c09a29513 100644
|
index 916ba7c09b077bc3c9ed9fad579e607e4c065e06..813c3bc9943e2700d2e4ad2335b7d235d21610fa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -2559,7 +2559,7 @@ public class ServerPlayer extends Player {
|
@@ -2624,7 +2624,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isImmobile() {
|
public boolean isImmobile() {
|
||||||
@ -19,10 +19,10 @@ index eb04f9ae48d1122cd08ccdd2798131dd124221df..96bc2fa87502c363c68822d512e3c63c
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 5f5d8ae29ff702eacc72341fae074a05d977e7cd..fc2fd0842e25fbe5c46ae07200c4b1a5950ae29a 100644
|
index d2061ea6f670edd33be2460eef0b489e88857690..e8d1ade5542dcf01476ba8580cc281b28f36c9a0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -178,7 +178,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -179,7 +179,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isDisconnected() {
|
public final boolean isDisconnected() {
|
@ -7,10 +7,10 @@ Subject: [PATCH] Firework API's
|
|||||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
index f525fafc638c7252c99b6d98cf579be11ca5463e..6671796d292fbc922a94271136f5a7a4bbdedaca 100644
|
index cc99d67bc52c89b50171b6c808c6e3bf293999f5..09d465947a5720e05c350d455c86002682104079 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
@@ -42,6 +42,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -44,6 +44,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
public int lifetime;
|
public int lifetime;
|
||||||
@Nullable
|
@Nullable
|
||||||
public LivingEntity attachedToEntity;
|
public LivingEntity attachedToEntity;
|
||||||
@ -18,7 +18,7 @@ index f525fafc638c7252c99b6d98cf579be11ca5463e..6671796d292fbc922a94271136f5a7a4
|
|||||||
|
|
||||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -299,6 +300,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -301,6 +302,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
nbt.putInt("LifeTime", this.lifetime);
|
nbt.putInt("LifeTime", this.lifetime);
|
||||||
nbt.put("FireworksItem", this.getItem().save(this.registryAccess()));
|
nbt.put("FireworksItem", this.getItem().save(this.registryAccess()));
|
||||||
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
|
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
|
||||||
@ -30,7 +30,7 @@ index f525fafc638c7252c99b6d98cf579be11ca5463e..6671796d292fbc922a94271136f5a7a4
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -315,7 +321,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -317,7 +323,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
if (nbt.contains("ShotAtAngle")) {
|
if (nbt.contains("ShotAtAngle")) {
|
||||||
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
|
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
|
||||||
}
|
}
|
||||||
@ -44,10 +44,10 @@ index f525fafc638c7252c99b6d98cf579be11ca5463e..6671796d292fbc922a94271136f5a7a4
|
|||||||
|
|
||||||
private List<FireworkExplosion> getExplosions() {
|
private List<FireworkExplosion> getExplosions() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
index c797fc980577d77e18cd5ea660e4c42ca0f21747..65f23bfb2de91be7560800ff87eab7ad88cb1849 100644
|
index 99a39f05e7aeefa2ea4372159b4837d80963eabf..f64cdfac1fc1333845ea4ea5efb7922f0ae39619 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
@@ -147,7 +147,11 @@ public class CrossbowItem extends ProjectileWeaponItem {
|
@@ -160,7 +160,11 @@ public class CrossbowItem extends ProjectileWeaponItem {
|
||||||
@Override
|
@Override
|
||||||
protected Projectile createProjectile(Level world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) {
|
protected Projectile createProjectile(Level world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) {
|
||||||
if (projectileStack.is(Items.FIREWORK_ROCKET)) {
|
if (projectileStack.is(Items.FIREWORK_ROCKET)) {
|
35
patches/server/0123-PlayerTeleportEndGatewayEvent.patch
Normal file
35
patches/server/0123-PlayerTeleportEndGatewayEvent.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Sat, 31 Dec 2016 21:44:50 -0500
|
||||||
|
Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||||
|
|
||||||
|
Allows you to access the Gateway being used in a teleport event
|
||||||
|
Fix the offset used for player teleportation
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
index 813c3bc9943e2700d2e4ad2335b7d235d21610fa..a2d35f7066d89f861c1b75ec8a62f03ed6f65dd8 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
@@ -1195,11 +1195,22 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
|
ResourceKey<LevelStem> resourcekey = worldserver1.getTypeKey();
|
||||||
|
|
||||||
|
if (worldserver != null && worldserver.dimension() == worldserver1.dimension()) { // CraftBukkit
|
||||||
|
+ // Paper start - gateway-specific teleport event
|
||||||
|
+ if (this.portalProcess != null && this.portalProcess.isSamePortal(((net.minecraft.world.level.block.EndGatewayBlock) net.minecraft.world.level.block.Blocks.END_GATEWAY)) && this.serverLevel().getBlockEntity(this.portalProcess.getEntryPosition()) instanceof net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
|
||||||
|
+ Location to = CraftLocation.toBukkit(teleportTarget.pos(), this.serverLevel().getWorld(), teleportTarget.yRot(), teleportTarget.xRot());
|
||||||
|
+ final com.destroystokyo.paper.event.player.PlayerTeleportEndGatewayEvent event = new com.destroystokyo.paper.event.player.PlayerTeleportEndGatewayEvent(this.getBukkitEntity(), this.getBukkitEntity().getLocation(), to, new org.bukkit.craftbukkit.block.CraftEndGateway(to.getWorld(), theEndGatewayBlockEntity));
|
||||||
|
+ if (!event.callEvent() || event.getTo() == null) {
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+ this.connection.teleport(event.getTo());
|
||||||
|
+ } else {
|
||||||
|
+ // Paper end - gateway-specific teleport event
|
||||||
|
boolean result = this.connection.teleport(teleportTarget.pos().x, teleportTarget.pos().y, teleportTarget.pos().z, teleportTarget.yRot(), teleportTarget.xRot(), teleportTarget.cause());
|
||||||
|
if (!result) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
+ } // Paper
|
||||||
|
this.connection.resetPosition();
|
||||||
|
teleportTarget.postDimensionTransition().onTransition(this);
|
||||||
|
return this;
|
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
|||||||
which creates copy of the collections.
|
which creates copy of the collections.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 004dd17181a49df5c2255a9eeca03f5a354920aa..ec6640bc761b6232d6b48a32fae11e60d5cdcbdf 100644
|
index 03b0720c6ebf1a876d56d18a941e0a06ed26dbf0..4fcbea7b8b12be10157da0c1f35c06e47c0334ad 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -113,7 +113,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -114,7 +114,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public static final int TICKS_PER_DAY = 24000;
|
public static final int TICKS_PER_DAY = 24000;
|
||||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||||
@ -20,7 +20,7 @@ index 004dd17181a49df5c2255a9eeca03f5a354920aa..ec6640bc761b6232d6b48a32fae11e60
|
|||||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||||
private boolean tickingBlockEntities;
|
private boolean tickingBlockEntities;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index ee5b61c476abc1f9a2babf350ac9dfa45b2c3253..8fea8bc0117b5b9ebff1979a73783446b7afe228 100644
|
index 1e8d93d81b7a391bbd1e9926ff35a68d4c563f0f..2794a7996147fce5533877a47cd1e7b6f7e7576f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
|
|||||||
the same way we handle async chunk loads.
|
the same way we handle async chunk loads.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 3fb300026e627313c65ea23b9c0a9f57a97fa310..2753b821f17ea8950a80c5d0e96d7b367d00e068 100644
|
index aaae646588a3a09c96a4bc481f15a44a96efbb8e..9d46c2241098959e30a2e45762a67386eeec6d5d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1060,11 +1060,13 @@ public abstract class PlayerList {
|
@@ -1029,11 +1029,13 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAll() {
|
public void saveAll() {
|
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
|
|||||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
index 344d22ae4067bccd6d42b444f6b057c9d1ea6e82..f4bf927477af23365a2d4618a1634195bd2054c8 100644
|
index 99771070840a545537fe352bda1c4aaeedd638ca..2fab84c5e2dc4de39281956390588a9a71d02f68 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
@@ -430,7 +430,7 @@ public class ServerPlayerGameMode {
|
@@ -435,7 +435,7 @@ public class ServerPlayerGameMode {
|
||||||
|
|
||||||
// Drop event experience
|
// Drop event experience
|
||||||
if (flag && event != null) {
|
if (flag && event != null) {
|
||||||
@ -21,10 +21,10 @@ index 344d22ae4067bccd6d42b444f6b057c9d1ea6e82..f4bf927477af23365a2d4618a1634195
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
index b919ae8602f54f6ec8c9c743f3e852cd4c00e97f..0dd931a082a972cd62f80f32ef0c7177b0daf599 100644
|
index 25a45e680f9fdea90f43d59de87a3a500f4ee8c0..0330a62a6a0060d2a96de191db68774588fc7ae5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
@@ -41,9 +41,63 @@ public class ExperienceOrb extends Entity {
|
@@ -44,9 +44,63 @@ public class ExperienceOrb extends Entity {
|
||||||
public int value;
|
public int value;
|
||||||
public int count;
|
public int count;
|
||||||
private Player followingPlayer;
|
private Player followingPlayer;
|
||||||
@ -88,7 +88,7 @@ index b919ae8602f54f6ec8c9c743f3e852cd4c00e97f..0dd931a082a972cd62f80f32ef0c7177
|
|||||||
this.setPos(x, y, z);
|
this.setPos(x, y, z);
|
||||||
this.setYRot((float) (this.random.nextDouble() * 360.0D));
|
this.setYRot((float) (this.random.nextDouble() * 360.0D));
|
||||||
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
|
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
|
||||||
@@ -167,12 +221,20 @@ public class ExperienceOrb extends Entity {
|
@@ -170,12 +224,20 @@ public class ExperienceOrb extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
||||||
@ -110,7 +110,7 @@ index b919ae8602f54f6ec8c9c743f3e852cd4c00e97f..0dd931a082a972cd62f80f32ef0c7177
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,6 +304,7 @@ public class ExperienceOrb extends Entity {
|
@@ -245,6 +307,7 @@ public class ExperienceOrb extends Entity {
|
||||||
nbt.putShort("Age", (short) this.age);
|
nbt.putShort("Age", (short) this.age);
|
||||||
nbt.putShort("Value", (short) this.value);
|
nbt.putShort("Value", (short) this.value);
|
||||||
nbt.putInt("Count", this.count);
|
nbt.putInt("Count", this.count);
|
||||||
@ -118,7 +118,7 @@ index b919ae8602f54f6ec8c9c743f3e852cd4c00e97f..0dd931a082a972cd62f80f32ef0c7177
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -250,6 +313,7 @@ public class ExperienceOrb extends Entity {
|
@@ -253,6 +316,7 @@ public class ExperienceOrb extends Entity {
|
||||||
this.age = nbt.getShort("Age");
|
this.age = nbt.getShort("Age");
|
||||||
this.value = nbt.getShort("Value");
|
this.value = nbt.getShort("Value");
|
||||||
this.count = Math.max(nbt.getInt("Count"), 1);
|
this.count = Math.max(nbt.getInt("Count"), 1);
|
||||||
@ -127,21 +127,20 @@ index b919ae8602f54f6ec8c9c743f3e852cd4c00e97f..0dd931a082a972cd62f80f32ef0c7177
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 51f6b7be6b8e65dbd8700ba2d7a40760b229f512..3cb452003cffd02a1ef88b0cb512a5c66d4e078b 100644
|
index 258e99365fd3c51c60b8adba46645f04111d96c2..65f75b10460563c1305d97fa5337f035ba915e4b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1813,7 +1813,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1788,7 +1788,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
protected void dropExperience() {
|
protected void dropExperience(@Nullable Entity attacker) {
|
||||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||||
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
if (!(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||||
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop);
|
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop);
|
||||||
+ LivingEntity attacker = this.lastHurtByPlayer != null ? this.lastHurtByPlayer : this.lastHurtByMob; // Paper
|
|
||||||
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper
|
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper
|
||||||
this.expToDrop = 0;
|
this.expToDrop = 0;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
index ec112d626a189aafb148455d097919e88af7ef28..3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f 100644
|
index 1af60680c512e0743920440215247d191f9a8385..370c444153d04fe7896952219604d83a19a996e2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
@@ -250,12 +250,14 @@ public abstract class Animal extends AgeableMob {
|
@@ -250,12 +250,14 @@ public abstract class Animal extends AgeableMob {
|
||||||
@ -173,7 +172,7 @@ index ec112d626a189aafb148455d097919e88af7ef28..3bd13c9b8c7573726ae7defdc3c0f328
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
index 40ea9af580f841c3aba61db7c34efb88d542a547..d2dfccd1e31b2f050c9f480220cf17df71c687c3 100644
|
index de2a25db9465bc4ae3cbf7ff6d3af756df679f4a..a6788da1505f9e119c03b94488f5e006da13e918 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
@@ -897,7 +897,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
@@ -897,7 +897,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||||
@ -186,7 +185,7 @@ index 40ea9af580f841c3aba61db7c34efb88d542a547..d2dfccd1e31b2f050c9f480220cf17df
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
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 e401efe0c15bbc6236259645447791142ea2fbda..cf565f3a4baf5898000d23eeedcf314b0c10db5a 100644
|
index d4659ce017692c6f8cabb56137a231bc566614b0..6f90ee749aed98b97868aa40fc233d164ddc2ef6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
@@ -455,7 +455,7 @@ public class Turtle extends Animal {
|
@@ -455,7 +455,7 @@ public class Turtle extends Animal {
|
||||||
@ -199,10 +198,10 @@ index e401efe0c15bbc6236259645447791142ea2fbda..cf565f3a4baf5898000d23eeedcf314b
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
index 993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0..963fdb4132001aa781eda45b75cb4df97d782ddc 100644
|
index dba973ba5088d253aa67f5577663cccda7f4edd1..5e83ca6fa874227b5d63148502405bb77f5345ba 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
@@ -672,7 +672,7 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -689,7 +689,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
|
|
||||||
if (this.level() instanceof ServerLevel) {
|
if (this.level() instanceof ServerLevel) {
|
||||||
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||||
@ -211,7 +210,7 @@ index 993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0..963fdb4132001aa781eda45b75cb4df9
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||||
@@ -701,7 +701,7 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -718,7 +718,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
||||||
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
||||||
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||||
@ -221,10 +220,10 @@ index 993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0..963fdb4132001aa781eda45b75cb4df9
|
|||||||
|
|
||||||
if (this.dragonFight != null) {
|
if (this.dragonFight != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index 0da329781f0afd4ec4a731889b892afe7e399d21..d1c3f5d076a3d560d02553d6a33e5890d0c2bfc7 100644
|
index 243eb1e54293c763a06febff551c051398d43535..79fdc8284f57a4f11e1954936ad574f7b8df5435 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -632,7 +632,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -634,7 +634,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offer.shouldRewardExp()) {
|
if (offer.shouldRewardExp()) {
|
||||||
@ -234,7 +233,7 @@ index 0da329781f0afd4ec4a731889b892afe7e399d21..d1c3f5d076a3d560d02553d6a33e5890
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
index c493c324a2606a40a3a04a55cb77790614d2707b..057eca881d279c610e933ebff5fb654625b036be 100644
|
index 0f2e2e42e732e942664d70a72dd9c4e47c7e95b6..e51cb9c96e1bd13c00bf938436f4fc26d80055a1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||||
@ -247,10 +246,10 @@ index c493c324a2606a40a3a04a55cb77790614d2707b..057eca881d279c610e933ebff5fb6546
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
index 1eeb61688cae52bb25ef6d9ac4f0a0df3d34f846..c3a035742271611f2d26cf4af0d5877369dd6558 100644
|
index ed43ad94ca007a54e3c32d5e17c141048eeb5835..0b4c67b9de6893601f032a8fae103e8a98f2c767 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
@@ -524,7 +524,7 @@ public class FishingHook extends Projectile {
|
@@ -525,7 +525,7 @@ public class FishingHook extends Projectile {
|
||||||
this.level().addFreshEntity(entityitem);
|
this.level().addFreshEntity(entityitem);
|
||||||
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||||
if (playerFishEvent.getExpToDrop() > 0) {
|
if (playerFishEvent.getExpToDrop() > 0) {
|
||||||
@ -273,10 +272,10 @@ index 9963db38420b91ae817a18ff084311cb45c0edee..70ceef96c6305324aef3b006f6603817
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
index 4e3c70f7cff0235dd58414e258567ef07661f53f..d41197db6bbf9e17b67bb1faa5d370eea0212bd3 100644
|
index 1c0a9ca0ccfd89dd26736012ce1c329dffb7f913..637d77d6b07ff9ee5ac1cb0470cbefcba5c7495e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
@@ -98,7 +98,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||||
public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
|
public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
|
||||||
context.execute((world, blockposition) -> {
|
context.execute((world, blockposition) -> {
|
||||||
if (world instanceof ServerLevel) {
|
if (world instanceof ServerLevel) {
|
||||||
@ -286,10 +285,10 @@ index 4e3c70f7cff0235dd58414e258567ef07661f53f..d41197db6bbf9e17b67bb1faa5d370ee
|
|||||||
|
|
||||||
world.levelEvent(1042, blockposition, 0);
|
world.levelEvent(1042, blockposition, 0);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index 946001c57c326f2d2f0677bca954e8558f1c851b..ed336112581ac77196ed3e60dc8aaf50312c078b 100644
|
index def3e28edc206e0ba41111e26332db468223fb2e..6d0a90e9c637edff5c5ce1355a3b45f0fb7f4154 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -361,8 +361,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -360,8 +360,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||||
@ -305,10 +304,10 @@ index 946001c57c326f2d2f0677bca954e8558f1c851b..ed336112581ac77196ed3e60dc8aaf50
|
|||||||
|
|
||||||
}
|
}
|
||||||
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
|
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 8bda1a42907132b1f3289f860530ded0a4e61f93..70e068c3d0f72f31df749add2c57450f793524ae 100644
|
index c0dea02bb38dffb5003293c2d91e28e998da0a9c..e2a587ca5b732c62c4956e6f39ad795cd1411cc4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
@@ -630,7 +630,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@@ -633,7 +633,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||||
j = event.getExpToDrop();
|
j = event.getExpToDrop();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -318,10 +317,10 @@ index 8bda1a42907132b1f3289f860530ded0a4e61f93..70e068c3d0f72f31df749add2c57450f
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
index 52d4eaf7c92b9b4252e0cae25128b5ae7b0092cc..3bbd314d94de3736e039b4b2d836afa8cc892511 100644
|
index 5b7bdf06ae6df1eeccb5a8da143745235f58e07e..9b2b0bbb1755b6be1c23cf56e29a68b0002fd755 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
@@ -371,7 +371,7 @@ public final class CraftEntityTypes {
|
@@ -372,7 +372,7 @@ public final class CraftEntityTypes {
|
||||||
return item;
|
return item;
|
||||||
}));
|
}));
|
||||||
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
|||||||
You can set this to 0 to disable collisions.
|
You can set this to 0 to disable collisions.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 2fcdd61e9669904756aa33b1ff8ab7160ea5e371..660a210c363fcb42145b273ea6b977ce4844505d 100644
|
index ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3..78cb145f72efaaf535b6f933b3ca990a3f909608 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -395,6 +395,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -401,6 +401,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -24,10 +24,10 @@ index 2fcdd61e9669904756aa33b1ff8ab7160ea5e371..660a210c363fcb42145b273ea6b977ce
|
|||||||
@javax.annotation.Nullable
|
@javax.annotation.Nullable
|
||||||
private org.bukkit.util.Vector origin;
|
private org.bukkit.util.Vector origin;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 3cb452003cffd02a1ef88b0cb512a5c66d4e078b..eafbe6fd829c2067b1e81ea8aad77fe3ba3df82f 100644
|
index 65f75b10460563c1305d97fa5337f035ba915e4b..57ba53cf9f84b21185bbaefd482f9d6dea2cb772 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3454,10 +3454,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3474,10 +3474,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator iterator1 = list.iterator();
|
Iterator iterator1 = list.iterator();
|
@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
|
|||||||
in corruption/dataloss.
|
in corruption/dataloss.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index fca7340f5b0dbbf072a752e7e7b589dbaeb17d50..1fdd088f0bb6606f2a9a482d276aa3e9261be012 100644
|
index 56d51073eb0cd902fa2c1e790201f74d120b149f..7335f9bb936eeb585ee077b0b9c461d7946d6134 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -242,6 +242,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||||
private PlayerList playerList;
|
private PlayerList playerList;
|
||||||
private volatile boolean running;
|
private volatile boolean running;
|
||||||
@ -41,7 +41,7 @@ index fca7340f5b0dbbf072a752e7e7b589dbaeb17d50..1fdd088f0bb6606f2a9a482d276aa3e9
|
|||||||
private boolean stopped;
|
private boolean stopped;
|
||||||
private int tickCount;
|
private int tickCount;
|
||||||
private int ticksUntilAutosave;
|
private int ticksUntilAutosave;
|
||||||
@@ -931,7 +932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -938,7 +939,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (this.playerList != null) {
|
if (this.playerList != null) {
|
||||||
MinecraftServer.LOGGER.info("Saving players");
|
MinecraftServer.LOGGER.info("Saving players");
|
||||||
this.playerList.saveAll();
|
this.playerList.saveAll();
|
||||||
@ -50,7 +50,7 @@ index fca7340f5b0dbbf072a752e7e7b589dbaeb17d50..1fdd088f0bb6606f2a9a482d276aa3e9
|
|||||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1011,6 +1012,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1018,6 +1019,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void halt(boolean waitForShutdown) {
|
public void halt(boolean waitForShutdown) {
|
||||||
@ -64,10 +64,10 @@ index fca7340f5b0dbbf072a752e7e7b589dbaeb17d50..1fdd088f0bb6606f2a9a482d276aa3e9
|
|||||||
if (waitForShutdown) {
|
if (waitForShutdown) {
|
||||||
try {
|
try {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 2753b821f17ea8950a80c5d0e96d7b367d00e068..5d7cf0bffae13ecbc460a0f0b74e110ef9380a14 100644
|
index 9d46c2241098959e30a2e45762a67386eeec6d5d..bad29b6f6bf2859a876799a053eef0374b9d7140 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1174,8 +1174,15 @@ public abstract class PlayerList {
|
@@ -1143,8 +1143,15 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAll() {
|
public void removeAll() {
|
||||||
@ -84,10 +84,10 @@ index 2753b821f17ea8950a80c5d0e96d7b367d00e068..5d7cf0bffae13ecbc460a0f0b74e110e
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||||
index 1e251d0f6de25a0a8c739c5f18ec5b949d4fc396..051b9e3a5d29a5840d596468e3ddd013bedc8da3 100644
|
index c30f9899ec5529e49919367ab4e0ae797b429afa..9a1fffa0c07c24eed8bd6ea8f3cd26c9f926c54d 100644
|
||||||
--- a/src/main/java/org/spigotmc/RestartCommand.java
|
--- a/src/main/java/org/spigotmc/RestartCommand.java
|
||||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||||
@@ -45,86 +45,134 @@ public class RestartCommand extends Command
|
@@ -46,86 +46,134 @@ public class RestartCommand extends Command
|
||||||
AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us
|
AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -119,7 +119,7 @@ index 1e251d0f6de25a0a8c739c5f18ec5b949d4fc396..051b9e3a5d29a5840d596468e3ddd013
|
|||||||
- // Kick all players
|
- // Kick all players
|
||||||
- for ( ServerPlayer p : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players )
|
- for ( ServerPlayer p : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players )
|
||||||
- {
|
- {
|
||||||
- p.connection.disconnect(SpigotConfig.restartMessage);
|
- p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage ) );
|
||||||
- }
|
- }
|
||||||
- // Give the socket a chance to send the packets
|
- // Give the socket a chance to send the packets
|
||||||
- try
|
- try
|
||||||
@ -138,7 +138,7 @@ index 1e251d0f6de25a0a8c739c5f18ec5b949d4fc396..051b9e3a5d29a5840d596468e3ddd013
|
|||||||
+ // Kick all players
|
+ // Kick all players
|
||||||
+ for ( ServerPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) )
|
+ for ( ServerPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) )
|
||||||
+ {
|
+ {
|
||||||
+ p.connection.disconnect(SpigotConfig.restartMessage);
|
+ p.connection.disconnect( CraftChatMessage.fromStringOrEmpty( SpigotConfig.restartMessage ) );
|
||||||
+ }
|
+ }
|
||||||
+ // Give the socket a chance to send the packets
|
+ // Give the socket a chance to send the packets
|
||||||
+ try
|
+ try
|
@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
|
|||||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index b4b775687ec47c0deeced7fbf1316e0766797d0d..df0cc552024c64c7e4f53386a75f8fee3008155b 100644
|
index be42d98848e79eca79fed0ee42a1b25b50347226..934faa4f5f40f3b0b63bc8be970b92d5219d9aeb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2242,6 +2242,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2259,6 +2259,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
switch (packet.getAction()) {
|
switch (packet.getAction()) {
|
||||||
case PRESS_SHIFT_KEY:
|
case PRESS_SHIFT_KEY:
|
||||||
this.player.setShiftKeyDown(true);
|
this.player.setShiftKeyDown(true);
|
||||||
@ -32,10 +32,10 @@ index b4b775687ec47c0deeced7fbf1316e0766797d0d..df0cc552024c64c7e4f53386a75f8fee
|
|||||||
case RELEASE_SHIFT_KEY:
|
case RELEASE_SHIFT_KEY:
|
||||||
this.player.setShiftKeyDown(false);
|
this.player.setShiftKeyDown(false);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
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 a1c5e5913430404838205bc4a04b2afcff9d9046..0654cca68acefccec82cc138acba30515a336cfb 100644
|
index 0d1d8ad353ff2f2bd478cfdc2f6bebad5203e190..c9423872c23f3334afad34e662041c5f5d1ad1a2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
|
@@ -592,6 +592,7 @@ public abstract class Player extends LivingEntity {
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||||
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 52dc0049d596287a089bd5397cdfd2c99c711f2a..e9aa21a1ca5a3406f8ab40e1ce75f9e0ab6ddf5a 100644
|
index a387fa6ce162531497788e0bbcec3c5ffdfa4c68..859719521b07f061103a5e27a2c134849ecb9b08 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2822,5 +2822,10 @@ public final class CraftServer implements Server {
|
@@ -2830,5 +2830,10 @@ public final class CraftServer implements Server {
|
||||||
commandMap.registerServerAliases();
|
commandMap.registerServerAliases();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
index 204685bc15650c1b40067d4374e2e6bb53948eb6..b76b637ff940dde21647d1f34acd59a23159bb3c 100644
|
index c7ca5af731e0b92a511b90cba2047b1ed7d4e144..92384c2da9a15a781794e16176349eb39d012696 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
@@ -286,7 +286,7 @@ public class Creeper extends Monster implements PowerableMob {
|
@@ -287,7 +287,7 @@ public class Creeper extends Monster implements PowerableMob {
|
||||||
private void spawnLingeringCloud() {
|
private void spawnLingeringCloud() {
|
||||||
Collection<MobEffectInstance> collection = this.getActiveEffects();
|
Collection<MobEffectInstance> collection = this.getActiveEffects();
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index d4559aea807e3ee76f9dd1ecde72f77644636923..6b802f8f214e5cf2bac145e88bf8e39040cec7ea 100644
|
index e81a25462239dbb3993f31ff927bd809aef0a124..25fd665f3b02edfcc9fc7092b93296a7c6e43338 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -715,6 +715,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
@@ -675,6 +675,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||||
|
|
||||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||||
@ -21,10 +21,10 @@ index d4559aea807e3ee76f9dd1ecde72f77644636923..6b802f8f214e5cf2bac145e88bf8e390
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 16e3bdf6a2789a0828fc9d879b441fa4bd12d428..707fe72003a254a84ceef8a0572fff52997a4129 100644
|
index c4cd7cf1567cdf57bfe9f2d80cd4a613efe10dc7..759c246540bbd5cb99c78a722c39b72fbc1951d4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -59,6 +59,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -60,6 +60,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
public UUID target;
|
public UUID target;
|
||||||
public final float bobOffs;
|
public final float bobOffs;
|
||||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 707fe72003a254a84ceef8a0572fff52997a4129..f63d1145be7b6fb76373a4ec1423fd7cedf73b63 100644
|
index 759c246540bbd5cb99c78a722c39b72fbc1951d4..f51f04758e135294bab5c7d1f891a8d67fea78f5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -435,6 +435,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -436,6 +436,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||||
int canHold = player.getInventory().canHold(itemstack);
|
int canHold = player.getInventory().canHold(itemstack);
|
||||||
int remaining = i - canHold;
|
int remaining = i - canHold;
|
||||||
@ -16,7 +16,7 @@ index 707fe72003a254a84ceef8a0572fff52997a4129..f63d1145be7b6fb76373a4ec1423fd7c
|
|||||||
|
|
||||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||||
itemstack.setCount(canHold);
|
itemstack.setCount(canHold);
|
||||||
@@ -442,8 +443,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -443,8 +444,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
||||||
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
||||||
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
||||||
@ -31,7 +31,7 @@ index 707fe72003a254a84ceef8a0572fff52997a4129..f63d1145be7b6fb76373a4ec1423fd7c
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,6 +480,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -474,6 +481,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index f63d1145be7b6fb76373a4ec1423fd7cedf73b63..d97e12a2dca072ae102b029fb67472dacc2c5b40 100644
|
index f51f04758e135294bab5c7d1f891a8d67fea78f5..f9dfd6e7b610cfee75524a525ab0e72bed5522da 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -39,6 +39,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
@@ -40,6 +40,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||||
import org.bukkit.event.entity.EntityRemoveEvent;
|
import org.bukkit.event.entity.EntityRemoveEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -16,7 +16,7 @@ index f63d1145be7b6fb76373a4ec1423fd7cedf73b63..d97e12a2dca072ae102b029fb67472da
|
|||||||
|
|
||||||
public class ItemEntity extends Entity implements TraceableEntity {
|
public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
@@ -437,6 +438,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -438,6 +439,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
int remaining = i - canHold;
|
int remaining = i - canHold;
|
||||||
boolean flyAtPlayer = false; // Paper
|
boolean flyAtPlayer = false; // Paper
|
||||||
|
|
@ -10,10 +10,10 @@ out due to a sync load, as the worldgen threads will be
|
|||||||
stalling on profile lookups.
|
stalling on profile lookups.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index 9d91e7890d8cba72f0aa2ca9661f6de7ae8a0dcd..cf54e2c8e8aadb9e7343382a5ba59c657234c9b9 100644
|
index 396f368a7e21a7c7b1630b4e20cdbc452c4b0f84..54562fa04d14a937451ea7aa9d80194f2c31b471 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -93,6 +93,22 @@ public class Util {
|
@@ -92,6 +92,22 @@ public class Util {
|
||||||
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
|
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
|
||||||
private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
|
private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
|
||||||
private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
|
private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
|
||||||
@ -35,7 +35,7 @@ index 9d91e7890d8cba72f0aa2ca9661f6de7ae8a0dcd..cf54e2c8e8aadb9e7343382a5ba59c65
|
|||||||
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||||
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
|
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
|
||||||
public static final int LINEAR_LOOKUP_THRESHOLD = 8;
|
public static final int LINEAR_LOOKUP_THRESHOLD = 8;
|
||||||
public static final long NANOS_PER_MILLI = 1000000L;
|
private static final Set<String> ALLOWED_UNTRUSTED_LINK_PROTOCOLS = Set.of("http", "https");
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index aeb0c7ce9b6f93dadd407dbdefba053568f2e2fe..416b26c2ab62b29d640169166980e398d5824b14 100644
|
index aeb0c7ce9b6f93dadd407dbdefba053568f2e2fe..416b26c2ab62b29d640169166980e398d5824b14 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@ -50,7 +50,7 @@ index aeb0c7ce9b6f93dadd407dbdefba053568f2e2fe..416b26c2ab62b29d640169166980e398
|
|||||||
}, this.executor);
|
}, this.executor);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
index 6097e0ab387cfa4c2c9ab0389fc5bb6cd899ecc3..ebba6bc5b337d19e32be5a78294501ed8300f2bd 100644
|
index f720c5ef71edd65de76bcac9632173184576ea9e..c278caa030ceccec8e2721068848a34be513de88 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
@@ -105,7 +105,7 @@ public class SkullBlockEntity extends BlockEntity {
|
@@ -105,7 +105,7 @@ public class SkullBlockEntity extends BlockEntity {
|
@ -625,10 +625,10 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d
|
|||||||
String s1 = name.toLowerCase(Locale.ROOT);
|
String s1 = name.toLowerCase(Locale.ROOT);
|
||||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index e9aa21a1ca5a3406f8ab40e1ce75f9e0ab6ddf5a..1182f5582b59a07a53a5b76b446326c05fe24411 100644
|
index 859719521b07f061103a5e27a2c134849ecb9b08..dc20e2a838d19b378f76592d8eeeb1eaf150393d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -261,6 +261,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
@@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||||
|
|
||||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ index e9aa21a1ca5a3406f8ab40e1ce75f9e0ab6ddf5a..1182f5582b59a07a53a5b76b446326c0
|
|||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
|
private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
@@ -305,6 +308,7 @@ public final class CraftServer implements Server {
|
@@ -307,6 +310,7 @@ public final class CraftServer implements Server {
|
||||||
static {
|
static {
|
||||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||||
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
||||||
@ -646,7 +646,7 @@ index e9aa21a1ca5a3406f8ab40e1ce75f9e0ab6ddf5a..1182f5582b59a07a53a5b76b446326c0
|
|||||||
CraftItemFactory.instance();
|
CraftItemFactory.instance();
|
||||||
CraftEntityFactory.instance();
|
CraftEntityFactory.instance();
|
||||||
}
|
}
|
||||||
@@ -2827,5 +2831,39 @@ public final class CraftServer implements Server {
|
@@ -2835,5 +2839,39 @@ public final class CraftServer implements Server {
|
||||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||||
}
|
}
|
@ -25,10 +25,10 @@ index ec34e402104d7a696ea95e0b11ee70189b678ab9..d9fc3c25bef251df6a53ee47ec224b07
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
index b81a4204a85e5b431cd6137fd8b80e43779c97b7..eec5279ac4386132fa053c57889e32e6b8141614 100644
|
index f94c0106b44d614483184e372c01c1504cb886b0..72756ef14b8ec8afd80313b9f6aaf76722cb18cf 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
@@ -331,7 +331,7 @@ public class Commands {
|
@@ -329,7 +329,7 @@ public class Commands {
|
||||||
commandlistenerwrapper.getServer().getProfiler().push(() -> {
|
commandlistenerwrapper.getServer().getProfiler().push(() -> {
|
||||||
return "/" + s;
|
return "/" + s;
|
||||||
});
|
});
|
||||||
@ -37,7 +37,7 @@ index b81a4204a85e5b431cd6137fd8b80e43779c97b7..eec5279ac4386132fa053c57889e32e6
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (contextchain != null) {
|
if (contextchain != null) {
|
||||||
@@ -365,14 +365,18 @@ public class Commands {
|
@@ -363,14 +363,18 @@ public class Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -58,7 +58,7 @@ index b81a4204a85e5b431cd6137fd8b80e43779c97b7..eec5279ac4386132fa053c57889e32e6
|
|||||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||||
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
||||||
@@ -391,7 +395,17 @@ public class Commands {
|
@@ -389,7 +393,17 @@ public class Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
|
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
|
||||||
@ -78,10 +78,10 @@ index b81a4204a85e5b431cd6137fd8b80e43779c97b7..eec5279ac4386132fa053c57889e32e6
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 1182f5582b59a07a53a5b76b446326c05fe24411..3c3f1b8b0885a1db6859718ee0ce0637153f012a 100644
|
index dc20e2a838d19b378f76592d8eeeb1eaf150393d..e782c6d776f467d29540851eef9428f4d7f80acb 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -936,7 +936,13 @@ public final class CraftServer implements Server {
|
@@ -939,7 +939,13 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
// Spigot start
|
// Spigot start
|
||||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
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 0654cca68acefccec82cc138acba30515a336cfb..e81acc5c982cd14bc8a3aa5bf06e9636179b8555 100644
|
index c9423872c23f3334afad34e662041c5f5d1ad1a2..d603a7211c7e7eb2567881a530ae7bcbc8def5a6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1982,20 +1982,45 @@ public abstract class Player extends LivingEntity {
|
@@ -1992,20 +1992,45 @@ public abstract class Player extends LivingEntity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index d342d569eb93707bc683c3373ea88ae6b885a476..da300bbe01399eec9d45f68aeb7c214cab4108fb 100644
|
index 6b490eb5b14cb2d3174aff79d1144c87665c7d38..556a7d082f0c33606a0231aa1b52d0c12d57035c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -95,6 +95,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -97,6 +97,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 660a210c363fcb42145b273ea6b977ce4844505d..655ce0b58cc327a8dac1b006bec7dcb34964da0a 100644
|
index 78cb145f72efaaf535b6f933b3ca990a3f909608..439e8b4f52ba88456fb8ae5ab960d715f5c0d131 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -396,6 +396,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -402,6 +402,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||||
@ -16,7 +16,7 @@ index 660a210c363fcb42145b273ea6b977ce4844505d..655ce0b58cc327a8dac1b006bec7dcb3
|
|||||||
// Paper start - Entity origin API
|
// Paper start - Entity origin API
|
||||||
@javax.annotation.Nullable
|
@javax.annotation.Nullable
|
||||||
private org.bukkit.util.Vector origin;
|
private org.bukkit.util.Vector origin;
|
||||||
@@ -2189,6 +2190,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -2259,6 +2260,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ index 660a210c363fcb42145b273ea6b977ce4844505d..655ce0b58cc327a8dac1b006bec7dcb3
|
|||||||
// Paper end
|
// Paper end
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -2329,6 +2334,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -2399,6 +2404,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.originWorld = originWorld;
|
this.originWorld = originWorld;
|
||||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||||
}
|
}
|
||||||
@ -49,10 +49,10 @@ index aa54237205989f619ac6a3faa2e4285427b9e31d..43d399e1a0ba2fb0541f851a28032fa6
|
|||||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||||
continue;
|
continue;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 3390033bbfc8fd0715458e5faa6a65477272a80b..88e0ac38214c537ea8be5d23a17ac5a58acd3682 100644
|
index df6da730134da754d0ff23bd1b57c82486b9ab73..69b5946625a53a1351ffc4bdf61c6874949bbeae 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -993,4 +993,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -1010,4 +1010,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
return originVector.toLocation(world);
|
return originVector.toLocation(world);
|
||||||
}
|
}
|
||||||
// Paper end - entity origin API
|
// Paper end - entity origin API
|
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
|||||||
to ensure it meets latest minecraft expectations.
|
to ensure it meets latest minecraft expectations.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
index e8dd4ba93c09c514f3594f0d4b5f1167b719a17d..aa1d144dfffc780284fc0a955ff18b711dc8c7bf 100644
|
index 78c96b43d611f70814b80a05dfded794858e2eda..612991750c89936790a4db64f9cc0e236d283d57 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
@@ -516,4 +516,12 @@ public final class CraftItemFactory implements ItemFactory {
|
@@ -527,4 +527,12 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
||||||
}
|
}
|
||||||
// Paper end - Adventure
|
// Paper end - Adventure
|
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
|||||||
You must replace the language file embedded in the server jar.
|
You must replace the language file embedded in the server jar.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
index aa1d144dfffc780284fc0a955ff18b711dc8c7bf..fa4de12ba4fdce7a632923af8007e888141904c8 100644
|
index 612991750c89936790a4db64f9cc0e236d283d57..d1a214e8d8fd7fd774a9629d5ca2d9f7a14de0e7 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
@@ -524,4 +524,19 @@ public final class CraftItemFactory implements ItemFactory {
|
@@ -535,4 +535,19 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
||||||
}
|
}
|
||||||
// Paper end - ensure server conversions API
|
// Paper end - ensure server conversions API
|
@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 5d7cf0bffae13ecbc460a0f0b74e110ef9380a14..d59f85d3a4385ebba1a93a9b10533f18b7386ab2 100644
|
index bad29b6f6bf2859a876799a053eef0374b9d7140..1c3b21eaff8481724858cf3013dbfc2f210f317b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -631,9 +631,9 @@ public abstract class PlayerList {
|
@@ -624,9 +624,9 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// return chatmessage;
|
// return chatmessage;
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||||
@ -21,7 +21,7 @@ index 5d7cf0bffae13ecbc460a0f0b74e110ef9380a14..d59f85d3a4385ebba1a93a9b10533f18
|
|||||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||||
|
|
||||||
@@ -1024,7 +1024,23 @@ public abstract class PlayerList {
|
@@ -993,7 +993,23 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWhiteListed(GameProfile profile) {
|
public boolean isWhiteListed(GameProfile profile) {
|
@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
|
|||||||
and to provide some level of hint without being disruptive.
|
and to provide some level of hint without being disruptive.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
index 26892378d27dadce25c178333188ba093dc1617b..a3a2097716430b30c9bac2581b9f67fe0c595bd2 100644
|
index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9fbac2fdfc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
@@ -44,7 +44,7 @@ public class Bootstrap {
|
@@ -43,7 +43,7 @@ public class Bootstrap {
|
||||||
public static void bootStrap() {
|
public static void bootStrap() {
|
||||||
if (!Bootstrap.isBootstrapped) {
|
if (!Bootstrap.isBootstrapped) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -21,7 +21,7 @@ index 26892378d27dadce25c178333188ba093dc1617b..a3a2097716430b30c9bac2581b9f67fe
|
|||||||
switch (name) {
|
switch (name) {
|
||||||
case "DispenserRegistry":
|
case "DispenserRegistry":
|
||||||
break;
|
break;
|
||||||
@@ -58,7 +58,7 @@ public class Bootstrap {
|
@@ -57,7 +57,7 @@ public class Bootstrap {
|
||||||
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
|
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
|
||||||
System.err.println("**********************************************************************");
|
System.err.println("**********************************************************************");
|
||||||
break;
|
break;
|
||||||
@ -31,12 +31,12 @@ index 26892378d27dadce25c178333188ba093dc1617b..a3a2097716430b30c9bac2581b9f67fe
|
|||||||
Bootstrap.isBootstrapped = true;
|
Bootstrap.isBootstrapped = true;
|
||||||
Instant instant = Instant.now();
|
Instant instant = Instant.now();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 04a12fc412693c689c2048e4d568225b10ccf17b..1f62158072d7503f0148a9af4e9fbebab30e6fd7 100644
|
index 9515a6f72b54bc8926f10182143b2aa9b684a341..faa228698c7dd60bde0f3767cc27957ece04b8be 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -260,10 +260,12 @@ public class Main {
|
@@ -260,10 +260,12 @@ public class Main {
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
- System.err.println("*** Error, this build is outdated ***");
|
- System.err.println("*** Error, this build is outdated ***");
|
||||||
+ // Paper start - This is some stupid bullshit
|
+ // Paper start - This is some stupid bullshit
|
@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
|||||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 4a2f49be0af5d88e0fe5dd8af00b77dd0da2f208..d77c31a8b41df69d11c1ce4b77975e9a38e317b3 100644
|
index c36e4c1802e304853320576e0521dbc53cd25425..fe631496aa551a0029eff7b4d4a5daf16dddac50 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -405,6 +405,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
index af9f6696f52b0f44f3b4f897a5dbd174034682c3..2c7491edbb60e7ec6a208ea7292cd28a3f8f9e31 100644
|
index 695f057d05d6651860d8d15be5a2b48a18a35d22..97f4cc522706ec5914672aa4fdfbc35edc94aeb6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index da300bbe01399eec9d45f68aeb7c214cab4108fb..a5b627ce61187696dfce3746c7c06cbaaf1149f5 100644
|
index 556a7d082f0c33606a0231aa1b52d0c12d57035c..d1a05c93ba7b9d1cb3427a4a90346b4364784846 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -301,7 +301,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -303,7 +303,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
ServerLoginPacketListenerImpl.LOGGER.warn("Authentication servers are down but will let them in anyway!");
|
ServerLoginPacketListenerImpl.LOGGER.warn("Authentication servers are down but will let them in anyway!");
|
||||||
ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot
|
ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot
|
||||||
} else {
|
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index df0cc552024c64c7e4f53386a75f8fee3008155b..196682a91c47ed2c4d2a8e1b71728200cc22191c 100644
|
index 934faa4f5f40f3b0b63bc8be970b92d5219d9aeb..3425921cc7b0ccfc10dbb52da54d39e7f0d701e5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1204,7 +1204,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1199,7 +1199,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
boolean flag1 = d7 > 0.0D;
|
boolean flag1 = d7 > 0.0D;
|
||||||
|
|
||||||
if (this.player.onGround() && !packet.isOnGround() && flag1) {
|
if (this.player.onGround() && !packet.isOnGround() && flag1) {
|
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
|
|||||||
random disconnections for clients.
|
random disconnections for clients.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index fc2fd0842e25fbe5c46ae07200c4b1a5950ae29a..8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f 100644
|
index e8d1ade5542dcf01476ba8580cc281b28f36c9a0..0ac9f9d4816767ced7928a7d79743d97870a21a4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -116,14 +116,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -117,14 +117,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15
|
|||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||||
index 0ccfdceea8e211c595be2dad2392876109b4eeef..1321b9adba4c9e45dce0f717d44a7cb4e64b9bf6 100644
|
index f5e6610d271ef2c997fb3d1a5f65e0bf0740805a..4ce0aaaeebe7b333491e3d8aece212c1378297c1 100644
|
||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -120,6 +120,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -120,6 +120,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
@ -75,10 +75,10 @@ index 0ccfdceea8e211c595be2dad2392876109b4eeef..1321b9adba4c9e45dce0f717d44a7cb4
|
|||||||
// Paper start - add utility methods
|
// Paper start - add utility methods
|
||||||
public final net.minecraft.server.level.ServerPlayer getPlayer() {
|
public final net.minecraft.server.level.ServerPlayer getPlayer() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
index 9214fb6b8e21ff6aee8be0691f1fe6e41c901ba3..65333e0244d7c3c415266f1740929761ca890af7 100644
|
index 7ae4279768b70a4fdc8f4438898871a17c8fe402..582bbb376c75ab5bf737f3015ce8ad453746e279 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
@@ -69,6 +69,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -70,6 +70,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
throw new UnsupportedOperationException("Invalid intention " + String.valueOf(packet.intention()));
|
throw new UnsupportedOperationException("Invalid intention " + String.valueOf(packet.intention()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,10 +90,10 @@ index 9214fb6b8e21ff6aee8be0691f1fe6e41c901ba3..65333e0244d7c3c415266f1740929761
|
|||||||
|
|
||||||
private void beginLogin(ClientIntentionPacket packet, boolean transfer) {
|
private void beginLogin(ClientIntentionPacket packet, boolean transfer) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 8a6ce3d9eda1aa14577c4441d3f3d76fb6750f69..01fd0d05eb2c71d12252eeeda87f88ee903dd167 100644
|
index 591dac203a4b93630fd4b1a95f44aaa364571cd8..a62a00e7f60f1fef625131597ca39bd5a10f7331 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -332,6 +332,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -334,6 +334,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
|
this.getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
|
||||||
}
|
}
|
||||||
|
|
@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
|
|||||||
at the cost of dead connections being kept open for longer.
|
at the cost of dead connections being kept open for longer.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..a0dc17702fb6c8c96f262bc917624a46a40920fa 100644
|
index 0ac9f9d4816767ced7928a7d79743d97870a21a4..e2a07d4e006d90132102a6449d57dd9e9642e6af 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -68,7 +68,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -69,7 +69,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
protected final MinecraftServer server;
|
protected final MinecraftServer server;
|
||||||
public final Connection connection; // Paper
|
public final Connection connection; // Paper
|
||||||
private final boolean transferred;
|
private final boolean transferred;
|
||||||
@ -29,7 +29,7 @@ index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..a0dc17702fb6c8c96f262bc917624a46
|
|||||||
private boolean keepAlivePending;
|
private boolean keepAlivePending;
|
||||||
private long keepAliveChallenge;
|
private long keepAliveChallenge;
|
||||||
private long closedListenerTime;
|
private long closedListenerTime;
|
||||||
@@ -76,6 +76,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -77,6 +77,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
private int latency;
|
private int latency;
|
||||||
private volatile boolean suspendFlushingOnServerThread = false;
|
private volatile boolean suspendFlushingOnServerThread = false;
|
||||||
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
|
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
|
||||||
@ -37,7 +37,7 @@ index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..a0dc17702fb6c8c96f262bc917624a46
|
|||||||
|
|
||||||
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
|
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
@@ -226,18 +227,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -227,18 +228,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
|
|
||||||
protected void keepConnectionAlive() {
|
protected void keepConnectionAlive() {
|
||||||
this.server.getProfiler().push("keepAlive");
|
this.server.getProfiler().push("keepAlive");
|
@ -0,0 +1,105 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Brokkonaut <hannos17@gmx.de>
|
||||||
|
Date: Tue, 31 Oct 2017 03:26:18 +0100
|
||||||
|
Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
||||||
|
attacker
|
||||||
|
|
||||||
|
|
||||||
|
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 d603a7211c7e7eb2567881a530ae7bcbc8def5a6..0e14f9f233a1f41e9b660e19950820c9cd1913a5 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
@@ -1256,7 +1256,7 @@ public abstract class Player extends LivingEntity {
|
||||||
|
boolean flag1;
|
||||||
|
|
||||||
|
if (this.isSprinting() && flag) {
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
flag1 = true;
|
||||||
|
} else {
|
||||||
|
flag1 = false;
|
||||||
|
@@ -1335,9 +1335,9 @@ public abstract class Player extends LivingEntity {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_SWEEP, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
- this.sweepAttack();
|
||||||
|
- }
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_SWEEP, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
+ this.sweepAttack();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (target instanceof ServerPlayer && target.hurtMarked) {
|
||||||
|
// CraftBukkit start - Add Velocity Event
|
||||||
|
@@ -1362,18 +1362,18 @@ public abstract class Player extends LivingEntity {
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (flag2) {
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_CRIT, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
- this.crit(target);
|
||||||
|
- }
|
||||||
|
+ if (flag2) {
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_CRIT, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
+ this.crit(target);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (!flag2 && !flag3) {
|
||||||
|
- if (flag) {
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_STRONG, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
- } else {
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_WEAK, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
+ if (!flag2 && !flag3) {
|
||||||
|
+ if (flag) {
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_STRONG, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
+ } else {
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_WEAK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
if (f1 > 0.0F) {
|
||||||
|
this.magicCrit(target);
|
||||||
|
@@ -1425,16 +1425,19 @@ public abstract class Player extends LivingEntity {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||||
|
- } else {
|
||||||
|
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F);
|
||||||
|
- // CraftBukkit start - resync on cancelled event
|
||||||
|
- if (this instanceof ServerPlayer) {
|
||||||
|
- ((ServerPlayer) this).getBukkitEntity().updateInventory();
|
||||||
|
+ this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||||
|
+ } else {
|
||||||
|
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
|
+ if (flag4) {
|
||||||
|
+ target.clearFire();
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit start - resync on cancelled event
|
||||||
|
+ if (this instanceof ServerPlayer) {
|
||||||
|
+ ((ServerPlayer) this).getBukkitEntity().updateInventory();
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
}
|
||||||
|
- // CraftBukkit end
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1822,6 +1825,14 @@ public abstract class Player extends LivingEntity {
|
||||||
|
public int getXpNeededForNextLevel() {
|
||||||
|
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||||
|
}
|
||||||
|
+ // Paper start - send while respecting visibility
|
||||||
|
+ private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) {
|
||||||
|
+ fromEntity.level().playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
||||||
|
+ if (fromEntity instanceof ServerPlayer) {
|
||||||
|
+ ((ServerPlayer) fromEntity).connection.send(new net.minecraft.network.protocol.game.ClientboundSoundPacket(net.minecraft.core.registries.BuiltInRegistries.SOUND_EVENT.wrapAsHolder(soundEffect), soundCategory, x, y, z, volume, pitch, fromEntity.random.nextLong()));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // Paper end - send while respecting visibility
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
public void causeFoodExhaustion(float exhaustion) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index eafbe6fd829c2067b1e81ea8aad77fe3ba3df82f..2bb22c70c52a98abc0f4839ae67e9d27c320251a 100644
|
index 57ba53cf9f84b21185bbaefd482f9d6dea2cb772..77365cfbaf6b9eb2ebefdf174066b40d120fc295 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3137,6 +3137,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3140,6 +3140,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
ItemStack itemstack2 = this.getItemBySlot(enumitemslot);
|
ItemStack itemstack2 = this.getItemBySlot(enumitemslot);
|
||||||
|
|
||||||
if (this.equipmentHasChanged(itemstack1, itemstack2)) {
|
if (this.equipmentHasChanged(itemstack1, itemstack2)) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index a5b627ce61187696dfce3746c7c06cbaaf1149f5..2640041bfacda7612908c41e1506bf6668eb274f 100644
|
index d1a05c93ba7b9d1cb3427a4a90346b4364784846..3bcce44fd8f7964a2f9b0d9c778b995975a8c049 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -102,7 +102,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -104,7 +104,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
}
|
}
|
||||||
// Paper end - Do not allow logins while the server is shutting down
|
// Paper end - Do not allow logins while the server is shutting down
|
||||||
if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) {
|
if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index ec6640bc761b6232d6b48a32fae11e60d5cdcbdf..917ee31fedd92184d97f2c0a11fd61583361de92 100644
|
index 4fcbea7b8b12be10157da0c1f35c06e47c0334ad..ab511f4c056f07aa79aab7b662073bb8db4b1526 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -721,6 +721,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -726,6 +726,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
boolean flag = this.tickRateManager().runsNormally();
|
boolean flag = this.tickRateManager().runsNormally();
|
||||||
|
|
||||||
int tilesThisCycle = 0;
|
int tilesThisCycle = 0;
|
||||||
@ -17,7 +17,7 @@ index ec6640bc761b6232d6b48a32fae11e60d5cdcbdf..917ee31fedd92184d97f2c0a11fd6158
|
|||||||
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||||
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
||||||
@@ -729,12 +731,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -734,12 +736,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
if (tickingblockentity.isRemoved()) {
|
if (tickingblockentity.isRemoved()) {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
tilesThisCycle--;
|
tilesThisCycle--;
|
@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping
|
|||||||
information on restoration when the event is cancelled.
|
information on restoration when the event is cancelled.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 917ee31fedd92184d97f2c0a11fd61583361de92..26adc305c5d5ef16dda141f931973666ee163d01 100644
|
index ab511f4c056f07aa79aab7b662073bb8db4b1526..27e2718124aad69546c1d9adb9c8e69fa4a43ca7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -149,7 +149,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -150,7 +150,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
|
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
|
||||||
public boolean captureBlockStates = false;
|
public boolean captureBlockStates = false;
|
||||||
public boolean captureTreeGeneration = false;
|
public boolean captureTreeGeneration = false;
|
||||||
@ -30,7 +30,7 @@ index 917ee31fedd92184d97f2c0a11fd61583361de92..26adc305c5d5ef16dda141f931973666
|
|||||||
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
|
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
|
||||||
public List<ItemEntity> captureDrops;
|
public List<ItemEntity> captureDrops;
|
||||||
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
||||||
@@ -383,7 +383,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -384,7 +384,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
||||||
// CraftBukkit start - tree generation
|
// CraftBukkit start - tree generation
|
||||||
if (this.captureTreeGeneration) {
|
if (this.captureTreeGeneration) {
|
||||||
@ -39,7 +39,7 @@ index 917ee31fedd92184d97f2c0a11fd61583361de92..26adc305c5d5ef16dda141f931973666
|
|||||||
if (blockstate == null) {
|
if (blockstate == null) {
|
||||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||||
@@ -404,7 +404,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -405,7 +405,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
// CraftBukkit start - capture blockstates
|
// CraftBukkit start - capture blockstates
|
||||||
boolean captured = false;
|
boolean captured = false;
|
||||||
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
|
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
|
||||||
@ -49,7 +49,7 @@ index 917ee31fedd92184d97f2c0a11fd61583361de92..26adc305c5d5ef16dda141f931973666
|
|||||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||||
captured = true;
|
captured = true;
|
||||||
}
|
}
|
||||||
@@ -605,7 +606,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -606,7 +607,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public BlockState getBlockState(BlockPos pos) {
|
public BlockState getBlockState(BlockPos pos) {
|
||||||
// CraftBukkit start - tree generation
|
// CraftBukkit start - tree generation
|
||||||
if (this.captureTreeGeneration) {
|
if (this.captureTreeGeneration) {
|
@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
|
|||||||
Co-authored-by: Aikar <aikar@aikar.co>
|
Co-authored-by: Aikar <aikar@aikar.co>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 196682a91c47ed2c4d2a8e1b71728200cc22191c..fffd671feb7a4e9805eafc473632b23225599b85 100644
|
index 3425921cc7b0ccfc10dbb52da54d39e7f0d701e5..61f6a2449b6fa52eef597f8725ae076bd23cd8ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -708,21 +708,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -711,21 +711,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,10 +80,10 @@ index 196682a91c47ed2c4d2a8e1b71728200cc22191c..fffd671feb7a4e9805eafc473632b232
|
|||||||
|
|
||||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 3c3f1b8b0885a1db6859718ee0ce0637153f012a..4dc7631babd1b433555fefbf33917af53868dec9 100644
|
index e782c6d776f467d29540851eef9428f4d7f80acb..3b3fe9282251774516c8eae5890bd56645dd38e4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2276,7 +2276,7 @@ public final class CraftServer implements Server {
|
@@ -2284,7 +2284,7 @@ public final class CraftServer implements Server {
|
||||||
offers = this.tabCompleteChat(player, message);
|
offers = this.tabCompleteChat(player, message);
|
||||||
}
|
}
|
||||||
|
|
@ -6,15 +6,15 @@ Subject: [PATCH] PlayerPickupExperienceEvent
|
|||||||
Allows plugins to cancel a player picking up an experience orb
|
Allows plugins to cancel a player picking up an experience orb
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
index 0dd931a082a972cd62f80f32ef0c7177b0daf599..e40a6bb2055a09d6bf1a91f69a2abb5f6877a122 100644
|
index 0330a62a6a0060d2a96de191db68774588fc7ae5..2d438cd3e69503fdc45a706f25c219af6f7a5db3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
@@ -319,7 +319,7 @@ public class ExperienceOrb extends Entity {
|
@@ -322,7 +322,7 @@ public class ExperienceOrb extends Entity {
|
||||||
@Override
|
@Override
|
||||||
public void playerTouch(Player player) {
|
public void playerTouch(Player player) {
|
||||||
if (!this.level().isClientSide) {
|
if (player instanceof ServerPlayer entityplayer) {
|
||||||
- if (player.takeXpDelay == 0) {
|
- if (player.takeXpDelay == 0) {
|
||||||
+ if (player.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
|
+ if (player.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(entityplayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
|
||||||
player.takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(player, 2, PlayerExpCooldownChangeEvent.ChangeReason.PICKUP_ORB).getNewCooldown(); // CraftBukkit - entityhuman.takeXpDelay = 2;
|
player.takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(player, 2, PlayerExpCooldownChangeEvent.ChangeReason.PICKUP_ORB).getNewCooldown(); // CraftBukkit - entityhuman.takeXpDelay = 2;
|
||||||
player.take(this, 1);
|
player.take(this, 1);
|
||||||
int i = this.repairPlayerItems(player, this.value);
|
int i = this.repairPlayerItems(entityplayer, this.value);
|
@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
|
|||||||
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
|
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 01fd0d05eb2c71d12252eeeda87f88ee903dd167..8b3e3d85ec11406143e7a9f447007615afecae2a 100644
|
index a62a00e7f60f1fef625131597ca39bd5a10f7331..a72a320b6dd7b4477f5764f5f32334b519ade294 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1624,7 +1624,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1637,7 +1637,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
|
|||||||
Also a highly more effecient way to blanket block spawns in a world
|
Also a highly more effecient way to blanket block spawns in a world
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 15c9f4822d1d11d05de6c2d6797ee3e845b3a1ab..46da628073e2bfb77b3deab623dba46228d92618 100644
|
index 6581566ca4e4fac0691e4f5851f8895d9ac7a38f..c96346bd0207537899d266fe2c8f29a1663e10c3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1221,7 +1221,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1101,7 +1101,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
|
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
|
||||||
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
|
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ index 15c9f4822d1d11d05de6c2d6797ee3e845b3a1ab..46da628073e2bfb77b3deab623dba462
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
|
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1236,6 +1238,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1116,6 +1118,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
entityplayer = (ServerPlayer) iterator.next();
|
entityplayer = (ServerPlayer) iterator.next();
|
||||||
@ -40,10 +40,10 @@ index 15c9f4822d1d11d05de6c2d6797ee3e845b3a1ab..46da628073e2bfb77b3deab623dba462
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index c4c85ba56c52a00e10e61fe0954d7fb8de471bdd..fe0521ad6f0601ebdf7a616c0500479ecb34cabb 100644
|
index 946cf6e186c6b283e705aa9a8cc9726889ebb954..6032cdc1b169c8ed0890091bce5066fbbb73ae30 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -558,6 +558,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -535,6 +535,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||||
|
|
||||||
Util.shuffle(list, this.level.random);
|
Util.shuffle(list, this.level.random);
|
||||||
@ -60,10 +60,10 @@ index c4c85ba56c52a00e10e61fe0954d7fb8de471bdd..fe0521ad6f0601ebdf7a616c0500479e
|
|||||||
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||||
Iterator iterator1 = list.iterator();
|
Iterator iterator1 = list.iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 96bc2fa87502c363c68822d512e3c63c09a29513..53246654bf8154e723b26097e864f83fd203caa5 100644
|
index a2d35f7066d89f861c1b75ec8a62f03ed6f65dd8..71eca7032aa2482bde7a2a00163f5547f3487b5e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -282,6 +282,7 @@ public class ServerPlayer extends Player {
|
@@ -286,6 +286,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
public boolean isRealPlayer; // Paper
|
public boolean isRealPlayer; // Paper
|
||||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
@ -55,7 +55,7 @@ index 3f2cad4c9c0400bf93932cb7f7219c2185fc7370..5c8e36ea8287029b1789719c687bac1a
|
|||||||
|
|
||||||
if (t0 != null) {
|
if (t0 != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index 606dbc398745b689f957e62ebd9eaa56a67a61f3..7df13199eacc8dec0ba8fbf10ea507b0d1c5f591 100644
|
index 474f020371bb9e5fd2c5b22e44d7902977c4fc18..69a661f01e43d17262fd2845dde5528416bbe456 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -430,6 +430,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -430,6 +430,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
@ -76,10 +76,10 @@ index 606dbc398745b689f957e62ebd9eaa56a67a61f3..7df13199eacc8dec0ba8fbf10ea507b0
|
|||||||
|
|
||||||
if (t0 != null) {
|
if (t0 != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index d1c3f5d076a3d560d02553d6a33e5890d0c2bfc7..4d7f95d2bd415bacccee145bfc47f2b480530c11 100644
|
index 79fdc8284f57a4f11e1954936ad574f7b8df5435..e23674dd5db3c429efd3b7c71fe36b420494c03a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -968,7 +968,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -970,7 +970,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
}).limit(5L).collect(Collectors.toList());
|
}).limit(5L).collect(Collectors.toList());
|
||||||
|
|
||||||
if (list1.size() >= requiredCount) {
|
if (list1.size() >= requiredCount) {
|
@ -59,7 +59,7 @@ index d8ed3404e8c3c61b2daff110ef32ef890a77a461..78863e72239a0f3535bc85758479da84
|
|||||||
return new ResolvableProfile(gameProfile);
|
return new ResolvableProfile(gameProfile);
|
||||||
}) : SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(profile -> {
|
}) : SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(profile -> {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
index ebba6bc5b337d19e32be5a78294501ed8300f2bd..81d9a4e6bc1bc4f992ecb77b176daf89d645bbf2 100644
|
index c278caa030ceccec8e2721068848a34be513de88..26e92e208ddd3122da6d44767b8841d7a8b90d98 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
@@ -41,7 +41,7 @@ public class SkullBlockEntity extends BlockEntity {
|
@@ -41,7 +41,7 @@ public class SkullBlockEntity extends BlockEntity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAdvancementCriterionGrantEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
index 5657391bfe6272b70fbf7d2732d46994832c39f9..6e8ccafe8966970d1665be21266f2ffe95e1d3ed 100644
|
index 81bef7427478fe911e81f024102654d8d540dbb7..4c85abf29441645039b6a554a50e1d3274229de6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
@@ -225,6 +225,12 @@ public class PlayerAdvancements {
|
@@ -225,6 +225,12 @@ public class PlayerAdvancements {
|
@ -13,10 +13,10 @@ starting point for future additions in this area.
|
|||||||
Fixes GH-559
|
Fixes GH-559
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
||||||
index 7c7b85972d6a97cc325bf86a836ef208f00dbb37..8d484ba6ed0f7917cf281ff67b1f2b0c2c5c81d8 100644
|
index 3006a6d19de35e7e0d6e542e80eb0406c5422c3e..fc522ae106d1172172c496da543b8ca403e73456 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
|
||||||
@@ -67,7 +67,7 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
|
@@ -66,7 +66,7 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
|
||||||
private Class<M> getItemMetaClass(Item item) {
|
private Class<M> getItemMetaClass(Item item) {
|
||||||
ItemMeta meta = new ItemStack(this.asMaterial()).getItemMeta();
|
ItemMeta meta = new ItemStack(this.asMaterial()).getItemMeta();
|
||||||
if (meta != null) {
|
if (meta != null) {
|
@ -10,10 +10,10 @@ Flower pots are also not updated on the client when interaction is cancelled, th
|
|||||||
also resolves this.
|
also resolves this.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
index f4bf927477af23365a2d4618a1634195bd2054c8..e2d8bb349591d103606b158bc116b09d333c87ce 100644
|
index 2fab84c5e2dc4de39281956390588a9a71d02f68..a5b0efd6142075ca1ecb604afbc1d0162199e7a4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
@@ -514,7 +514,11 @@ public class ServerPlayerGameMode {
|
@@ -519,7 +519,11 @@ public class ServerPlayerGameMode {
|
||||||
|
|
||||||
// send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
|
// send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
|
||||||
player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above()));
|
player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above()));
|
18
patches/server/0173-Toggleable-player-crits.patch
Normal file
18
patches/server/0173-Toggleable-player-crits.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MiniDigger <admin@benndorf.dev>
|
||||||
|
Date: Sat, 10 Mar 2018 00:50:24 +0100
|
||||||
|
Subject: [PATCH] Toggleable player crits
|
||||||
|
|
||||||
|
|
||||||
|
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 0e14f9f233a1f41e9b660e19950820c9cd1913a5..92ff2ccfbcc554281a70337a0a759bf6f2e2bca0 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
@@ -1265,6 +1265,7 @@ public abstract class Player extends LivingEntity {
|
||||||
|
f += itemstack.getItem().getAttackDamageBonus(target, f, damagesource);
|
||||||
|
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity && !this.isSprinting();
|
||||||
|
|
||||||
|
+ flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
|
||||||
|
if (flag2) {
|
||||||
|
f *= 1.5F;
|
||||||
|
}
|
@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread.
|
|||||||
Renable flushing by passing -Dpaper.explicit-flush=true
|
Renable flushing by passing -Dpaper.explicit-flush=true
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||||
index 1321b9adba4c9e45dce0f717d44a7cb4e64b9bf6..42c0723e2fe43e1f268119a16067e8bdfb971208 100644
|
index 4ce0aaaeebe7b333491e3d8aece212c1378297c1..c45b8b2c89ffec7bd6a6875963c61f11185d3ee1 100644
|
||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -123,6 +123,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -123,6 +123,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
@ -23,7 +23,7 @@ index 1321b9adba4c9e45dce0f717d44a7cb4e64b9bf6..42c0723e2fe43e1f268119a16067e8bd
|
|||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
// Paper start - add utility methods
|
// Paper start - add utility methods
|
||||||
@@ -449,7 +450,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -457,7 +458,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.channel != null) {
|
if (this.channel != null) {
|
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
|
|||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 1fdd088f0bb6606f2a9a482d276aa3e9261be012..b6c5656665e492a7fdec0ae15545ecbabf585336 100644
|
index 7335f9bb936eeb585ee077b0b9c461d7946d6134..1c024fb7f682c81c465f59f4ab5fbeac964d73e1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
||||||
@ -194,7 +194,7 @@ index 1fdd088f0bb6606f2a9a482d276aa3e9261be012..b6c5656665e492a7fdec0ae15545ecba
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -1490,7 +1493,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1518,7 +1521,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (this.hidesOnlinePlayers()) {
|
if (this.hidesOnlinePlayers()) {
|
||||||
return new ServerStatus.Players(i, list.size(), List.of());
|
return new ServerStatus.Players(i, list.size(), List.of());
|
||||||
} else {
|
} else {
|
||||||
@ -204,10 +204,10 @@ index 1fdd088f0bb6606f2a9a482d276aa3e9261be012..b6c5656665e492a7fdec0ae15545ecba
|
|||||||
int k = Mth.nextInt(this.random, 0, list.size() - j);
|
int k = Mth.nextInt(this.random, 0, list.size() - j);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
index 9e62aa13845f19faf0dc0b7b27d958626e77d96e..6f1c9fa89e718cbc01a8d72de34154f49c5f46db 100644
|
index 71540687b4212702cdaaad5fd4815fb3eb97ddd6..385457c7151f7e636e1ea2e38ef983f4f532b9b5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
@@ -48,6 +48,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
@@ -49,6 +49,8 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||||
this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON);
|
this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON);
|
||||||
} else {
|
} else {
|
||||||
this.hasRequestedStatus = true;
|
this.hasRequestedStatus = true;
|
||||||
@ -216,7 +216,7 @@ index 9e62aa13845f19faf0dc0b7b27d958626e77d96e..6f1c9fa89e718cbc01a8d72de34154f4
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
// this.connection.send(new PacketStatusOutServerInfo(this.status));
|
// this.connection.send(new PacketStatusOutServerInfo(this.status));
|
||||||
MinecraftServer server = MinecraftServer.getServer();
|
MinecraftServer server = MinecraftServer.getServer();
|
||||||
@@ -150,6 +152,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
@@ -151,6 +153,9 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||||
|
|
||||||
this.connection.send(new ClientboundStatusResponsePacket(ping));
|
this.connection.send(new ClientboundStatusResponsePacket(ping));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -227,7 +227,7 @@ index 9e62aa13845f19faf0dc0b7b27d958626e77d96e..6f1c9fa89e718cbc01a8d72de34154f4
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 27b01f7ed930baab466a5e4f9608e9e1a4da0978..7cd1f375b9ad9e6d6f2d26661519f12be064a9d2 100644
|
index ba621fdc82896245f6ce448e084847edc4d3fe08..d063d356388810fb6f0dddfbc8b5885b3e6442aa 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -289,7 +289,7 @@ public class SpigotConfig
|
@@ -289,7 +289,7 @@ public class SpigotConfig
|
@ -7,10 +7,10 @@ Co-authored-by: Connor Linfoot <connorlinfoot@me.com>
|
|||||||
Co-authored-by: MCMDEV <john-m.1@gmx.de>
|
Co-authored-by: MCMDEV <john-m.1@gmx.de>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 2640041bfacda7612908c41e1506bf6668eb274f..43c77bef408c016ee40454bdebb8662929a0b7f0 100644
|
index 3bcce44fd8f7964a2f9b0d9c778b995975a8c049..2d9db1ac80216a509a7590254e422b3c4792e3ec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -184,7 +184,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -186,7 +186,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
try {
|
try {
|
||||||
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot
|
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ index 2640041bfacda7612908c41e1506bf6668eb274f..43c77bef408c016ee40454bdebb86629
|
|||||||
ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
|
ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
|
||||||
ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
|
ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -287,7 +287,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -289,7 +289,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
if (!ServerLoginPacketListenerImpl.this.connection.isConnected()) {
|
if (!ServerLoginPacketListenerImpl.this.connection.isConnected()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ index 2640041bfacda7612908c41e1506bf6668eb274f..43c77bef408c016ee40454bdebb86629
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
|
ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
|
||||||
ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
|
ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
|
||||||
@@ -326,14 +326,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -328,14 +328,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -54,7 +54,7 @@ index 2640041bfacda7612908c41e1506bf6668eb274f..43c77bef408c016ee40454bdebb86629
|
|||||||
|
|
||||||
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
||||||
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
|
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
|
||||||
@@ -351,14 +360,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -353,14 +362,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
|
ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
|
||||||
if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
|
if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
|
||||||
this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
|
this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
|
@ -9,10 +9,10 @@ This can be useful for changing name or skins after a player has logged in.
|
|||||||
public-f net.minecraft.world.entity.player.Player gameProfile
|
public-f net.minecraft.world.entity.player.Player gameProfile
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index fffd671feb7a4e9805eafc473632b23225599b85..de772530d290d58c1d8270bd14915e37db8dbf42 100644
|
index 61f6a2449b6fa52eef597f8725ae076bd23cd8ea..ecc2ce39629f6edbd09e96c85e14ab2196ac3173 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1459,7 +1459,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1472,7 +1472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
|
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,10 +22,10 @@ index fffd671feb7a4e9805eafc473632b23225599b85..de772530d290d58c1d8270bd14915e37
|
|||||||
if (Float.isNaN(f)) {
|
if (Float.isNaN(f)) {
|
||||||
f = 0;
|
f = 0;
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 43c77bef408c016ee40454bdebb8662929a0b7f0..2ca467bd9c53a59f1ca9b8e1c2cf683182a71910 100644
|
index 2d9db1ac80216a509a7590254e422b3c4792e3ec..b31f00f2f0b7cec59301afe36c9dd7cdc120fc9d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -334,11 +334,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -336,11 +336,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
|
||||||
// Paper start - Add more fields to AsyncPlayerPreLoginEvent
|
// Paper start - Add more fields to AsyncPlayerPreLoginEvent
|
||||||
final InetAddress rawAddress = ((InetSocketAddress) this.connection.channel.remoteAddress()).getAddress();
|
final InetAddress rawAddress = ((InetSocketAddress) this.connection.channel.remoteAddress()).getAddress();
|
||||||
@ -40,10 +40,10 @@ index 43c77bef408c016ee40454bdebb8662929a0b7f0..2ca467bd9c53a59f1ca9b8e1c2cf6831
|
|||||||
playerName = gameprofile.getName();
|
playerName = gameprofile.getName();
|
||||||
uniqueId = gameprofile.getId();
|
uniqueId = gameprofile.getId();
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index d59f85d3a4385ebba1a93a9b10533f18b7386ab2..d25c762e449e2bce20487454ad52363b35b9af96 100644
|
index 1c3b21eaff8481724858cf3013dbfc2f210f317b..8ff6b8ada1cfb9a4b344ba7d77db95f3ddcff6c5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -862,10 +862,16 @@ public abstract class PlayerList {
|
@@ -831,10 +831,16 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendPlayerPermissionLevel(ServerPlayer player) {
|
public void sendPlayerPermissionLevel(ServerPlayer player) {
|
||||||
@ -77,10 +77,10 @@ index 818df09e9245b5d89b4180b1eaa51470b7539341..461656e1cb095243bfe7a9ee2906e5b0
|
|||||||
|
|
||||||
public Server getServer() {
|
public Server getServer() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a76be093e 100644
|
index a72a320b6dd7b4477f5764f5f32334b519ade294..286b060081fdc0912b52a29d2425d1d208c4be9a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -247,11 +247,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -249,11 +249,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this.server.getPlayer(this.getUniqueId()) != null;
|
return this.server.getPlayer(this.getUniqueId()) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
@Override
|
@Override
|
||||||
public InetSocketAddress getAddress() {
|
public InetSocketAddress getAddress() {
|
||||||
if (this.getHandle().connection.protocol() == null) return null;
|
if (this.getHandle().connection.protocol() == null) return null;
|
||||||
@@ -1774,8 +1769,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1787,8 +1782,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
|
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
|
||||||
// Remove this entity from the hidden player's EntityTrackerEntry
|
// Remove this entity from the hidden player's EntityTrackerEntry
|
||||||
@ -109,7 +109,7 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entry.removePlayer(this.getHandle());
|
entry.removePlayer(this.getHandle());
|
||||||
@@ -1788,8 +1790,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1801,8 +1803,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
|
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
}
|
}
|
||||||
|
|
||||||
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
|
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
|
||||||
@@ -1854,12 +1854,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1867,12 +1867,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
|
private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
|
||||||
@ -144,7 +144,7 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
}
|
}
|
||||||
|
|
||||||
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
||||||
@@ -1869,6 +1882,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1882,6 +1895,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
|
|
||||||
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
|
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
|
||||||
// SPIGOT-7312: Can't show/hide self
|
// SPIGOT-7312: Can't show/hide self
|
||||||
@@ -1880,6 +1926,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1893,6 +1939,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.trackAndShowEntity(entity);
|
this.trackAndShowEntity(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,10 +220,10 @@ index 8b3e3d85ec11406143e7a9f447007615afecae2a..627b957388bb52a779796b618fe8158a
|
|||||||
public void onEntityRemove(Entity entity) {
|
public void onEntityRemove(Entity entity) {
|
||||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
index f45498bf9841c31338b83270c1badc6d7a792d25..5b71ef6231c6c44ebeabfb1fb39941806cb22b5c 100644
|
index e8bdc9f97cc506ca8509480ea0c07facc778df8d..2d9453498531c99f4fa566a08099b4e5a7af25fa 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
@@ -374,6 +374,13 @@ public class Commodore {
|
@@ -379,6 +379,13 @@ public class Commodore {
|
||||||
}
|
}
|
||||||
// Paper end - Rewrite plugins
|
// Paper end - Rewrite plugins
|
||||||
|
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
|||||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 4dc7631babd1b433555fefbf33917af53868dec9..c02ebe1a8fbae4cd01f5ad355b3a5530494fab73 100644
|
index 3b3fe9282251774516c8eae5890bd56645dd38e4..dd1a6b7a65fe019ee71c659a165283ee9c0e7a4f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1875,6 +1875,25 @@ public final class CraftServer implements Server {
|
@@ -1878,6 +1878,25 @@ public final class CraftServer implements Server {
|
||||||
return recipients.size();
|
return recipients.size();
|
||||||
}
|
}
|
||||||
|
|
@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
|
|||||||
provide an optional flag to disable this check, at your own risk.
|
provide an optional flag to disable this check, at your own risk.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 627b957388bb52a779796b618fe8158a76be093e..137e5f9a0ccf7e2a73db9e88100dd258e71ec170 100644
|
index 286b060081fdc0912b52a29d2425d1d208c4be9a..a89bc6c124d05fd22848aaddac8ca496f3a324ca 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -207,6 +207,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -209,6 +209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
private CraftWorldBorder clientWorldBorder = null;
|
private CraftWorldBorder clientWorldBorder = null;
|
||||||
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
|
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
|
||||||
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; // Paper - more resource pack API
|
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; // Paper - more resource pack API
|
||||||
@ -20,7 +20,7 @@ index 627b957388bb52a779796b618fe8158a76be093e..137e5f9a0ccf7e2a73db9e88100dd258
|
|||||||
|
|
||||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
@@ -2251,7 +2252,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2264,7 +2265,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addChannel(String channel) {
|
public void addChannel(String channel) {
|
@ -6,19 +6,18 @@ Subject: [PATCH] Configurable sprint interruption on attack
|
|||||||
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
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 715a66018afa8d67f6e078e1157886390a2ad5dd..c7865bb6fa7fbeee365a70a4858b0addb36d4165 100644
|
index 92ff2ccfbcc554281a70337a0a759bf6f2e2bca0..6ff215c3d6db1627eda20ba09a3e10eaba589d99 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1299,8 +1299,12 @@ public abstract class Player extends LivingEntity {
|
@@ -1307,6 +1307,11 @@ public abstract class Player extends LivingEntity {
|
||||||
}
|
|
||||||
|
|
||||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||||
|
this.setSprinting(false);
|
||||||
+ // Paper start - Configurable sprint interruption on attack
|
+ // Paper start - Configurable sprint interruption on attack
|
||||||
+ if (!this.level().paperConfig().misc.disableSprintInterruptionOnAttack) {
|
+ if (!this.level().paperConfig().misc.disableSprintInterruptionOnAttack) {
|
||||||
this.setSprinting(false);
|
+ this.setSprinting(false);
|
||||||
}
|
|
||||||
+ // Paper end - Configurable sprint interruption on attack
|
|
||||||
+ }
|
+ }
|
||||||
|
+ // Paper end - Configurable sprint interruption on attack
|
||||||
|
}
|
||||||
|
|
||||||
if (flag3) {
|
LivingEntity entityliving2;
|
||||||
float f4 = 1.0F + EnchantmentHelper.getSweepingDamageRatio(this) * f;
|
|
@ -8,10 +8,10 @@ Fires an event anytime an enderman intends to teleport away from the player
|
|||||||
You may cancel this, enabling ranged attacks to damage the enderman for example.
|
You may cancel this, enabling ranged attacks to damage the enderman for example.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
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 7b6109348bbc44727ef7d0ef8fc08561f0dc328d..3e50f3dc5b9a45ee8f368f91fbd67b599d4435fb 100644
|
index bbe024a88d0feeb02a5cc4248f4bcdd3a06daf04..51e9988685b1a9a3d4d2effec63560b0ae9e8d3a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
@@ -119,6 +119,12 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -121,6 +121,12 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
this.setTarget(target, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
this.setTarget(target, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ index 7b6109348bbc44727ef7d0ef8fc08561f0dc328d..3e50f3dc5b9a45ee8f368f91fbd67b59
|
|||||||
@Override
|
@Override
|
||||||
public boolean setTarget(LivingEntity entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
public boolean setTarget(LivingEntity entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||||
if (!super.setTarget(entityliving, reason, fireEvent)) {
|
if (!super.setTarget(entityliving, reason, fireEvent)) {
|
||||||
@@ -268,7 +274,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -270,7 +276,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
if (this.level().isDay() && this.tickCount >= this.targetChangeTime + 600) {
|
if (this.level().isDay() && this.tickCount >= this.targetChangeTime + 600) {
|
||||||
float f = this.getLightLevelDependentMagicValue();
|
float f = this.getLightLevelDependentMagicValue();
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ index 7b6109348bbc44727ef7d0ef8fc08561f0dc328d..3e50f3dc5b9a45ee8f368f91fbd67b59
|
|||||||
this.setTarget((LivingEntity) null);
|
this.setTarget((LivingEntity) null);
|
||||||
this.teleport();
|
this.teleport();
|
||||||
}
|
}
|
||||||
@@ -394,11 +400,13 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -396,11 +402,13 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
} else {
|
} else {
|
||||||
flag1 = flag && this.hurtWithCleanWater(source, (ThrownPotion) source.getDirectEntity(), amount);
|
flag1 = flag && this.hurtWithCleanWater(source, (ThrownPotion) source.getDirectEntity(), amount);
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ index 7b6109348bbc44727ef7d0ef8fc08561f0dc328d..3e50f3dc5b9a45ee8f368f91fbd67b59
|
|||||||
|
|
||||||
return flag1;
|
return flag1;
|
||||||
}
|
}
|
||||||
@@ -623,7 +631,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -625,7 +633,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
} else {
|
} else {
|
||||||
if (this.target != null && !this.enderman.isPassenger()) {
|
if (this.target != null && !this.enderman.isPassenger()) {
|
||||||
if (this.enderman.isLookingAtMe((Player) this.target)) {
|
if (this.enderman.isLookingAtMe((Player) this.target)) {
|
@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
|||||||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 0a7dec5ff89c94503908ad011fe7da8dd8256685..f31d403420294f479e116013b200ea7e87ac901e 100644
|
index 7c835a9328b1ba8426663ed3e9575fcd35a0f748..6107b880612e88d96527ff8ea029875882fb19a1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2143,6 +2143,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2111,6 +2111,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
public void onTickingEnd(Entity entity) {
|
public void onTickingEnd(Entity entity) {
|
||||||
ServerLevel.this.entityTickList.remove(entity);
|
ServerLevel.this.entityTickList.remove(entity);
|
||||||
@ -33,10 +33,10 @@ index 0a7dec5ff89c94503908ad011fe7da8dd8256685..f31d403420294f479e116013b200ea7e
|
|||||||
|
|
||||||
public void onTrackingStart(Entity entity) {
|
public void onTrackingStart(Entity entity) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
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 1e7224d070fc48d93ce0c4e832d94c6a50019249..5e9ef75a14a91f01a1ae5b3fb591d7258740a75d 100644
|
index add45e6e95688649ba4b8d67747f763a261da51e..a39de724848d6dc796dd99dde5206f20e513fd18 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -102,6 +102,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
@@ -108,6 +108,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
if (nbt.hasUUID("Owner")) {
|
if (nbt.hasUUID("Owner")) {
|
||||||
this.ownerUUID = nbt.getUUID("Owner");
|
this.ownerUUID = nbt.getUUID("Owner");
|
||||||
this.cachedOwner = null;
|
this.cachedOwner = null;
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
|||||||
This adds a new Builder API which is much friendlier to use.
|
This adds a new Builder API which is much friendlier to use.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index f31d403420294f479e116013b200ea7e87ac901e..82947c9743433df9c03732e0a3229563de0ab53c 100644
|
index 6107b880612e88d96527ff8ea029875882fb19a1..5bf18ab5c397b32d880ea1827f62945d8d0e80ce 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1510,12 +1510,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1508,12 +1508,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||||
@ -34,7 +34,7 @@ index f31d403420294f479e116013b200ea7e87ac901e..82947c9743433df9c03732e0a3229563
|
|||||||
|
|
||||||
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
|
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 8fea8bc0117b5b9ebff1979a73783446b7afe228..6bca713e3cc3d63ec69b06cb7ec1820dd61cd88f 100644
|
index 2794a7996147fce5533877a47cd1e7b6f7e7576f..14fe2bf55b1d00c1f79a1dbbbd6d22bf30ecc277 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -1982,8 +1982,19 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -1982,8 +1982,19 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -8,10 +8,10 @@ Allow control over whether or not an enderman aggros a player.
|
|||||||
This allows you to override/extend the pumpkin/stare logic.
|
This allows you to override/extend the pumpkin/stare logic.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
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 3e50f3dc5b9a45ee8f368f91fbd67b599d4435fb..4d659fc8355542e6b9cadc6e1e86002e136702d2 100644
|
index 51e9988685b1a9a3d4d2effec63560b0ae9e8d3a..70888dd25b6a1d1ab7702d73a64a47eebafe76fe 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
@@ -231,7 +231,15 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -233,7 +233,15 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
this.readPersistentAngerSaveData(this.level(), nbt);
|
this.readPersistentAngerSaveData(this.level(), nbt);
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] WitchConsumePotionEvent
|
|||||||
Fires when a witch consumes the potion in their hand
|
Fires when a witch consumes the potion in their hand
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
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 a64727fa7159f3e95f4eb44f02cb836f169b9b92..3e070a61a3099601e57d70ec663c4c6fb291c024 100644
|
index a4d10409f06316ee628b683b231b3cc2a08bf593..f9cd71379a1d195731e7348ac6928372a4b2c29c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
@@ -122,6 +122,12 @@ public class Witch extends Raider implements RangedAttackMob {
|
@@ -123,6 +123,12 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||||
|
|
||||||
this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
|
this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
|
||||||
PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS);
|
PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS);
|
@ -6,10 +6,10 @@ Subject: [PATCH] WitchThrowPotionEvent
|
|||||||
Fired when a witch throws a potion at a player
|
Fired when a witch throws a potion at a player
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
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 3e070a61a3099601e57d70ec663c4c6fb291c024..c7470a5b95ee25078296c0443630c88a371b8a6f 100644
|
index f9cd71379a1d195731e7348ac6928372a4b2c29c..a14e00d55930628333cc63b18727ea56dbdc4ee3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
@@ -229,9 +229,16 @@ public class Witch extends Raider implements RangedAttackMob {
|
@@ -230,9 +230,16 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||||
holder = Potions.WEAKNESS;
|
holder = Potions.WEAKNESS;
|
||||||
}
|
}
|
||||||
|
|
@ -5,27 +5,26 @@ Subject: [PATCH] WitchReadyPotionEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
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 c7470a5b95ee25078296c0443630c88a371b8a6f..d286239d02b81624124c4e32ff4413bbac902d54 100644
|
index a14e00d55930628333cc63b18727ea56dbdc4ee3..a84f873b27bc3bc1ed3c2769e02a88fec37289fe 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||||
@@ -150,7 +150,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
@@ -151,6 +151,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (holder != null) {
|
if (holder != null) {
|
||||||
- this.setItemSlot(EquipmentSlot.MAINHAND, PotionContents.createItemStack(Items.POTION, holder));
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ ItemStack potion = PotionContents.createItemStack(Items.POTION, holder);
|
+ ItemStack potion = PotionContents.createItemStack(Items.POTION, holder);
|
||||||
+ potion = org.bukkit.craftbukkit.event.CraftEventFactory.handleWitchReadyPotionEvent(this, potion);
|
+ potion = org.bukkit.craftbukkit.event.CraftEventFactory.handleWitchReadyPotionEvent(this, potion);
|
||||||
+ this.setItemSlot(EquipmentSlot.MAINHAND, potion);
|
+ this.setItemSlot(EquipmentSlot.MAINHAND, potion);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.usingTime = this.getMainHandItem().getUseDuration();
|
this.setItemSlot(EquipmentSlot.MAINHAND, PotionContents.createItemStack(Items.POTION, holder));
|
||||||
|
this.usingTime = this.getMainHandItem().getUseDuration(this);
|
||||||
this.setUsingItem(true);
|
this.setUsingItem(true);
|
||||||
if (!this.isSilent()) {
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index a49abc180f76cb7aeb6eda86998acd00e9d3fdee..d4c44ff13f657343ec19de5e6cef7639330a5e88 100644
|
index 000a95dfd5c83b84fcd973a388a705d9470a4fe0..4e0db83bb6a4529b6e0727ea181bf79e06c2025a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1899,4 +1899,14 @@ public class CraftEventFactory {
|
@@ -1905,4 +1905,14 @@ public class CraftEventFactory {
|
||||||
).callEvent();
|
).callEvent();
|
||||||
}
|
}
|
||||||
// Paper end - PlayerUseUnknownEntityEvent
|
// Paper end - PlayerUseUnknownEntityEvent
|
@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
|||||||
Allows you to determine how long it takes to use a usable/consumable item
|
Allows you to determine how long it takes to use a usable/consumable item
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index dac1ff1387462b0125140a37d134d51c5e023bf5..92faa15f79f0541048e29254dcf3560616d3c0e7 100644
|
index f3f567bf61e655862fbeea4be87241d6f7f15785..9cf035486cedfc2e3ba522416e8fea3ad01cfec5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -187,6 +187,13 @@ public final class CraftItemStack extends ItemStack {
|
@@ -187,6 +187,13 @@ public final class CraftItemStack extends ItemStack {
|
29
patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch
Normal file
29
patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
|
Date: Sat, 9 Jun 2018 14:08:39 +0200
|
||||||
|
Subject: [PATCH] Add EntityTeleportEndGatewayEvent
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
index 439e8b4f52ba88456fb8ae5ab960d715f5c0d131..d790aec175e61bd9dd9c14cbbbd4c3c354bf867a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -3301,8 +3301,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
|
if (!this.isRemoved()) {
|
||||||
|
// CraftBukkit start
|
||||||
|
Location to = new Location(teleportTarget.newLevel().getWorld(), teleportTarget.pos().x, teleportTarget.pos().y, teleportTarget.pos().z, teleportTarget.yRot(), teleportTarget.xRot());
|
||||||
|
- EntityTeleportEvent teleEvent = CraftEventFactory.callEntityTeleportEvent(this, to);
|
||||||
|
- if (teleEvent.isCancelled()) {
|
||||||
|
+ // Paper start - gateway-specific teleport event
|
||||||
|
+ final EntityTeleportEvent teleEvent;
|
||||||
|
+ if (this.portalProcess != null && this.portalProcess.isSamePortal(((net.minecraft.world.level.block.EndGatewayBlock) net.minecraft.world.level.block.Blocks.END_GATEWAY)) && this.level.getBlockEntity(this.portalProcess.getEntryPosition()) instanceof net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
|
||||||
|
+ teleEvent = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(this.getBukkitEntity(), this.getBukkitEntity().getLocation(), to, new org.bukkit.craftbukkit.block.CraftEndGateway(to.getWorld(), theEndGatewayBlockEntity));
|
||||||
|
+ teleEvent.callEvent();
|
||||||
|
+ } else {
|
||||||
|
+ teleEvent = CraftEventFactory.callEntityTeleportEvent(this, to);
|
||||||
|
+ }
|
||||||
|
+ // Paper end - gateway-specific teleport event
|
||||||
|
+ if (teleEvent.isCancelled() || teleEvent.getTo() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
to = teleEvent.getTo();
|
@ -1,26 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aikar <aikar@aikar.co>
|
|
||||||
Date: Sat, 31 Dec 2016 21:44:50 -0500
|
|
||||||
Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
|
||||||
|
|
||||||
Allows you to access the Gateway being used in a teleport event
|
|
||||||
Fix the offset used for player teleportation
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
index 45aca9747557a94ac3e60ee9f23c30abb2367bff..9690416c2ffa7d1b7607d21ae0a990dcbcbcddae 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
@@ -202,11 +202,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
|
||||||
// CraftBukkit start - Fire PlayerTeleportEvent/EntityTeleportEvent
|
|
||||||
if (entity1 instanceof ServerPlayer) {
|
|
||||||
org.bukkit.craftbukkit.entity.CraftPlayer player = (CraftPlayer) entity1.getBukkitEntity();
|
|
||||||
- org.bukkit.Location location = CraftLocation.toBukkit(blockposition1, world.getWorld()).add(0.5D, 0.5D, 0.5D);
|
|
||||||
+ org.bukkit.Location location = CraftLocation.toBukkit(blockposition1, world.getWorld()).add(0.5D, 0, 0.5D); // Paper - use the right Y offset
|
|
||||||
location.setPitch(player.getLocation().getPitch());
|
|
||||||
location.setYaw(player.getLocation().getYaw());
|
|
||||||
|
|
||||||
- PlayerTeleportEvent teleEvent = new PlayerTeleportEvent(player, player.getLocation(), location, PlayerTeleportEvent.TeleportCause.END_GATEWAY);
|
|
||||||
+ PlayerTeleportEvent teleEvent = new com.destroystokyo.paper.event.player.PlayerTeleportEndGatewayEvent(player, player.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(worldserver.getWorld(), blockEntity)); // Paper
|
|
||||||
Bukkit.getPluginManager().callEvent(teleEvent);
|
|
||||||
if (teleEvent.isCancelled()) {
|
|
||||||
return;
|
|
@ -1,72 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Brokkonaut <hannos17@gmx.de>
|
|
||||||
Date: Tue, 31 Oct 2017 03:26:18 +0100
|
|
||||||
Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
|
||||||
attacker
|
|
||||||
|
|
||||||
|
|
||||||
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 e81acc5c982cd14bc8a3aa5bf06e9636179b8555..c1c0df2f4cf032a004568ab0e8f21db91e9dc705 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
||||||
@@ -1243,7 +1243,7 @@ public abstract class Player extends LivingEntity {
|
|
||||||
|
|
||||||
i += EnchantmentHelper.getKnockbackBonus(this);
|
|
||||||
if (this.isSprinting() && flag) {
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
++i;
|
|
||||||
flag1 = true;
|
|
||||||
}
|
|
||||||
@@ -1318,7 +1318,7 @@ public abstract class Player extends LivingEntity {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_SWEEP, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_SWEEP, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
this.sweepAttack();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1346,15 +1346,15 @@ public abstract class Player extends LivingEntity {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag2) {
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_CRIT, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_CRIT, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
this.crit(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!flag2 && !flag3) {
|
|
||||||
if (flag) {
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_STRONG, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_STRONG, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
} else {
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_WEAK, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_WEAK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1406,7 +1406,7 @@ public abstract class Player extends LivingEntity {
|
|
||||||
|
|
||||||
this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
|
||||||
} else {
|
|
||||||
- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F);
|
|
||||||
+ sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
|
||||||
if (flag4) {
|
|
||||||
target.clearFire();
|
|
||||||
}
|
|
||||||
@@ -1812,6 +1812,14 @@ public abstract class Player extends LivingEntity {
|
|
||||||
public int getXpNeededForNextLevel() {
|
|
||||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
|
||||||
}
|
|
||||||
+ // Paper start - send while respecting visibility
|
|
||||||
+ private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) {
|
|
||||||
+ fromEntity.level().playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
|
||||||
+ if (fromEntity instanceof ServerPlayer) {
|
|
||||||
+ ((ServerPlayer) fromEntity).connection.send(new net.minecraft.network.protocol.game.ClientboundSoundPacket(net.minecraft.core.registries.BuiltInRegistries.SOUND_EVENT.wrapAsHolder(soundEffect), soundCategory, x, y, z, volume, pitch, fromEntity.random.nextLong()));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ // Paper end - send while respecting visibility
|
|
||||||
|
|
||||||
// CraftBukkit start
|
|
||||||
public void causeFoodExhaustion(float exhaustion) {
|
|
@ -1,18 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: MiniDigger <admin@benndorf.dev>
|
|
||||||
Date: Sat, 10 Mar 2018 00:50:24 +0100
|
|
||||||
Subject: [PATCH] Toggleable player crits
|
|
||||||
|
|
||||||
|
|
||||||
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 c1c0df2f4cf032a004568ab0e8f21db91e9dc705..715a66018afa8d67f6e078e1157886390a2ad5dd 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
||||||
@@ -1251,6 +1251,7 @@ public abstract class Player extends LivingEntity {
|
|
||||||
f += this.getItemInHand(InteractionHand.MAIN_HAND).getItem().getAttackDamageBonus(this, f);
|
|
||||||
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity && !this.isSprinting();
|
|
||||||
|
|
||||||
+ flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
|
|
||||||
if (flag2) {
|
|
||||||
f *= 1.5F;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
|
||||||
Date: Sat, 9 Jun 2018 14:08:39 +0200
|
|
||||||
Subject: [PATCH] Add EntityTeleportEndGatewayEvent
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
index 9690416c2ffa7d1b7607d21ae0a990dcbcbcddae..f8053b42fbf144d427cc4ed44b3b735358c58a20 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
||||||
@@ -219,8 +219,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- org.bukkit.event.entity.EntityTeleportEvent teleEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTeleportEvent(entity1, blockposition1.getX() + 0.5, blockposition1.getY() + 0.5, blockposition1.getZ() + 0.5);
|
|
||||||
- if (teleEvent.isCancelled()) {
|
|
||||||
+ // Paper start - EntityTeleportEndGatewayEvent
|
|
||||||
+ org.bukkit.Location location = new org.bukkit.Location(world.getWorld(), blockposition1.getX() + 0.5D, blockposition1.getY(), blockposition1.getZ() + 0.5D);
|
|
||||||
+ location.setPitch(entity1.getXRot());
|
|
||||||
+ location.setYaw(entity1.getBukkitYaw());
|
|
||||||
+ org.bukkit.entity.Entity bukkitEntity = entity1.getBukkitEntity();
|
|
||||||
+ org.bukkit.event.entity.EntityTeleportEvent teleEvent = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(world.getWorld(), blockEntity));
|
|
||||||
+ if (!teleEvent.callEvent() || teleEvent.getTo() == null) {
|
|
||||||
+ // Paper end - EntityTeleportEndGatewayEvent
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user