Archiviert
13
0

[ci skip] Add more patch identifying comments

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-01-21 19:37:09 +01:00
Ursprung d9df6bc5e6
Commit 27cabc19a0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
855 geänderte Dateien mit 813 neuen und 847 gelöschten Zeilen

Datei anzeigen

@ -1427,7 +1427,7 @@ index 87a814f63c3f35be35bfa210c9248ad211c0dd8f..14543c2238b45c526dd9aebea2aa5c22
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/ZombieVillager.java b/src/main/java/org/bukkit/entity/ZombieVillager.java
index 7cc1d9a966454af70b7c25735fe474fe3eb97eb4..ad2eaee347cd2864aef30d2af48c1be6dc115c22 100644
index 7cc1d9a966454af70b7c25735fe474fe3eb97eb4..ac6fd8ca95771c185c145f4589ddd5b2a6e8c2da 100644
--- a/src/main/java/org/bukkit/entity/ZombieVillager.java
+++ b/src/main/java/org/bukkit/entity/ZombieVillager.java
@@ -90,4 +90,22 @@ public interface ZombieVillager extends Zombie {
@ -1451,7 +1451,7 @@ index 7cc1d9a966454af70b7c25735fe474fe3eb97eb4..ad2eaee347cd2864aef30d2af48c1be6
+ * org.bukkit.{@link org.bukkit.Sound#ENTITY_ZOMBIE_VILLAGER_CURE} from playing.
+ */
+ void setConversionTime(int time, boolean broadcastEntityEvent);
+ // Paper stop - missing entity behaviour api - converting without entity event
+ // Paper end - missing entity behaviour api - converting without entity event
}
diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
index db69687a7ad4b18d17ab1677cae5d8dd4dcd3678..304b05aeaea5febf493fc40d433a23acb384b4f0 100644

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 2e29da775e60c149d2c251d78ee7c60b494215a4..c5ac78c4a4711e9c44d5eb7f66b28f448bcda63a 100644
index 2e29da775e60c149d2c251d78ee7c60b494215a4..27fd3ea4d0f96efa24167623c756f463995161bd 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2056,6 +2056,24 @@ public final class Bukkit {
@ -28,7 +28,7 @@ index 2e29da775e60c149d2c251d78ee7c60b494215a4..c5ac78c4a4711e9c44d5eb7f66b28f44
+ public static ChunkGenerator.ChunkData createVanillaChunkData(@NotNull World world, int x, int z) {
+ return server.createVanillaChunkData(world, x, z);
+ }
+ // Paper stop
+ // Paper end
+
/**
* Creates a boss bar instance to display to players. The progress

Datei anzeigen

@ -10,43 +10,43 @@ Adds an option to control the force mode of the particle.
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
index 8afcd4e3a3805c7bccffaf6ff751e23101db6ed8..e96abf6afd434c104437e2461431f8b4c82c1d00 100644
index c6fd543d03813d6edc12aa919e77bb9a7c7315e7..d5ff2037fd2756da1aac9660e65453913be172cd 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1742,12 +1742,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) {
+ // Paper start - Particle API Expansion
+ // Paper start - Particle API
+ return sendParticles(players, sender, t0, d0, d1, d2, i, d3, d4, d5, d6, force);
+ }
+ public <T extends ParticleOptions> int sendParticles(List<ServerPlayer> receivers, @Nullable ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
+ // Paper end
+ // Paper end - Particle API
ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(t0, force, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
// CraftBukkit end
int j = 0;
- for (int k = 0; k < this.players.size(); ++k) {
- ServerPlayer entityplayer = (ServerPlayer) this.players.get(k);
+ for (Player entityhuman : receivers) { // Paper - Particle API Expansion
+ ServerPlayer entityplayer = (ServerPlayer) entityhuman; // Paper - Particle API Expansion
+ for (Player entityhuman : receivers) { // Paper - Particle API
+ ServerPlayer entityplayer = (ServerPlayer) entityhuman; // Paper - Particle API
if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity())) continue; // 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
index eeb62a48a4c56d3465f74f63278bf76c6abe84ec..ac6bafab570738db2b706bf2b045ea4eec12131c 100644
index 35ac3878b4391da29e248d26a6c76bf1582ea09d..c8e13ea3bc256b112fa5fd916c0fb583322c081b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1948,13 +1948,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
+ // Paper start - Particle API Expansion
+ // Paper start - Particle API
+ spawnParticle(particle, null, null, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, force);
+ }
+ @Override
+ public <T> void spawnParticle(Particle particle, List<Player> receivers, Player sender, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
+ // Paper end
+ // Paper end - Particle API
particle = CraftParticle.convertLegacy(particle);
data = CraftParticle.convertLegacy(data);
if (data != null) {
@ -54,8 +54,8 @@ index eeb62a48a4c56d3465f74f63278bf76c6abe84ec..ac6bafab570738db2b706bf2b045ea4e
}
this.getHandle().sendParticles(
- null, // Sender
+ receivers == null ? getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API Expansion
+ sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API Expansion
+ receivers == null ? getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API
+ sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API
CraftParticle.createParticleParam(particle, data), // Particle
x, y, z, // Position
count, // Count

Datei anzeigen

@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player.
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
index c897d55acdceae54bc2e7f3f3694ce421a8df687..5c620989acaff4fdb842944ea2d8ae331699a2b4 100644
index c897d55acdceae54bc2e7f3f3694ce421a8df687..259ba77dcbc8ed5f7e4015a6683799cc4604dfb8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -236,7 +236,15 @@ public class EnderMan extends Monster implements NeutralMob {
@ -24,7 +24,7 @@ index c897d55acdceae54bc2e7f3f3694ce421a8df687..5c620989acaff4fdb842944ea2d8ae33
+ return event.callEvent();
+ }
+ private boolean isLookingAtMe_check(Player player) {
+ // Paper end
+ // Paper end - EndermanAttackPlayerEvent
ItemStack itemstack = (ItemStack) player.getInventory().armor.get(3);
if (itemstack.is(Blocks.CARVED_PUMPKIN.asItem())) {

Datei anzeigen

@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 10 Mar 2018 16:33:15 -0500
Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded.
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
index 0d08a9d5555ebc296a1461aefbf48e8eee6b462d..7f1946d371f9be2662788957c6f11a2e087df616 100644
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
@@ -46,7 +46,8 @@ public class FrostedIceBlock extends IceBlock {
for(Direction direction : Direction.values()) {
mutableBlockPos.setWithOffset(pos, direction);
- BlockState blockState = world.getBlockState(mutableBlockPos);
+ BlockState blockState = world.getBlockStateIfLoaded(mutableBlockPos); // Paper
+ if (blockState == null) { continue; } // Paper
if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) {
world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig().environment.frostedIce.delay.min, world.paperConfig().environment.frostedIce.delay.max)); // Paper - use configurable min/max delay
}
@@ -83,7 +84,10 @@ public class FrostedIceBlock extends IceBlock {
for(Direction direction : Direction.values()) {
mutableBlockPos.setWithOffset(pos, direction);
- if (world.getBlockState(mutableBlockPos).is(this)) {
+ // Paper start
+ BlockState blockState = world.getBlockStateIfLoaded(mutableBlockPos);
+ if (blockState != null && blockState.is(this)) {
+ // Paper end
++i;
if (i >= maxNeighbors) {
return false;

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] WitchConsumePotionEvent
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
index eeecb9057e039b4696ca4de1cd7191a95d17a1a6..a949e8546ecc2d6fd6690d8a00207dc187e2451a 100644
index eeecb9057e039b4696ca4de1cd7191a95d17a1a6..d2cff117f178a370a7056865246276e795b6bace 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
@@ -126,7 +126,11 @@ public class Witch extends Raider implements RangedAttackMob {
@ -14,11 +14,11 @@ index eeecb9057e039b4696ca4de1cd7191a95d17a1a6..a949e8546ecc2d6fd6690d8a00207dc1
this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
if (itemstack.is(Items.POTION)) {
- List<MobEffectInstance> list = PotionUtils.getMobEffects(itemstack);
+ // Paper start
+ // Paper start - WitchConsumePotionEvent
+ com.destroystokyo.paper.event.entity.WitchConsumePotionEvent event = new com.destroystokyo.paper.event.entity.WitchConsumePotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
+
+ List<MobEffectInstance> list = event.callEvent() ? PotionUtils.getMobEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null;
+ // Paper end
+ // Paper end - WitchConsumePotionEvent
if (list != null) {
Iterator iterator = list.iterator();

Datei anzeigen

@ -6,14 +6,14 @@ Subject: [PATCH] WitchThrowPotionEvent
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
index a949e8546ecc2d6fd6690d8a00207dc187e2451a..40876df2503eed53c5d7769931f8201fb709cf6f 100644
index d2cff117f178a370a7056865246276e795b6bace..96a87db9f8976d3f1ff09beb9598db31fff72d5b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
@@ -239,9 +239,16 @@ public class Witch extends Raider implements RangedAttackMob {
potionregistry = Potions.WEAKNESS;
}
+ // Paper start
+ // Paper start - WitchThrowPotionEvent
+ ItemStack potion = PotionUtils.setPotion(new ItemStack(Items.SPLASH_POTION), potionregistry);
+ com.destroystokyo.paper.event.entity.WitchThrowPotionEvent event = new com.destroystokyo.paper.event.entity.WitchThrowPotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), (org.bukkit.entity.LivingEntity) target.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion));
+ if (!event.callEvent()) {
@ -24,7 +24,7 @@ index a949e8546ecc2d6fd6690d8a00207dc187e2451a..40876df2503eed53c5d7769931f8201f
-
- entitypotion.setItem(PotionUtils.setPotion(new ItemStack(Items.SPLASH_POTION), potionregistry));
+ entitypotion.setItem(potion);
+ // Paper end
+ // Paper end - WitchThrowPotionEvent
entitypotion.setXRot(entitypotion.getXRot() - -20.0F);
entitypotion.shoot(d0, d1 + d3 * 0.2D, d2, 0.75F, 8.0F);
if (!this.isSilent()) {

Datei anzeigen

@ -5,7 +5,7 @@ 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
index 40876df2503eed53c5d7769931f8201fb709cf6f..ca24b592273208e61e0e0ba59b7e5a3c11ebf952 100644
index 96a87db9f8976d3f1ff09beb9598db31fff72d5b..f45b46e30e1ad0516c5b380e476bc7dacb91391a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
@@ -160,7 +160,11 @@ public class Witch extends Raider implements RangedAttackMob {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
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
index 7dd0c000fa7f363997178ffa6de7d39e17702348..ae7c3ad0597e5115b43458a91765a176f2d80227 100644
index a05f01ca9a9bc88e414c8cf89c01c7e993e27dd2..07f011a968592ba5b38a0a2723189824ba5d0938 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -184,6 +184,13 @@ public final class CraftItemStack extends ItemStack {

Datei anzeigen

@ -1,7 +1,7 @@
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] Implement EntityTeleportEndGatewayEvent
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

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event
Otherwise the creeper infinite explodes
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 6594d501f51d18f5850999cceb9febfe206ec596..17ce05e7f9d2615be28a095ef6d3126885df8771 100644
index 864854a677d6f498909b70c12babd190a8b1eb36..d85095117d7837e75640f0e447242b45e24cf00e 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
@@ -278,6 +278,7 @@ public class Creeper extends Monster implements PowerableMob {

Datei anzeigen

@ -21,7 +21,7 @@ check is essentially the same as this.getHandle() == other.getHandle()
However, replaced it too to make it clearer of intent.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index b96f65776155f57d599a0a0d06456c95088d38fb..594eeb83425787e160f8051f15c7cdf61a7bb090 100644
index deb355b2188a49f818aaddad6c4ce60de94428e0..388c9db9d130071122e9f80749fb2eef05455408 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -499,14 +499,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 15 Jun 2018 00:30:32 -0400
Subject: [PATCH] Configurable Alternative LootPool Luck Formula
Subject: [PATCH] Configurable LootPool luck formula
Rewrites the Vanilla luck application formula so that luck can be
applied to items that do not have any quality defined.
@ -36,7 +36,7 @@ This change will result in some major changes to fishing formulas.
I would love to see this change in Vanilla, so Mojang please pull :)
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java b/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
index 6d5a2806345ff86e143e16ecedc2f1e8d80f5b85..d3de18b1f856a99aa4f2a556956af7e5511164bf 100644
index 6d5a2806345ff86e143e16ecedc2f1e8d80f5b85..0cf437dd75b97b9ba39f5134ae2ae5f33b94f653 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
@@ -122,9 +122,35 @@ public abstract class LootPoolSingletonContainer extends LootPoolEntryContainer
@ -44,7 +44,7 @@ index 6d5a2806345ff86e143e16ecedc2f1e8d80f5b85..d3de18b1f856a99aa4f2a556956af7e5
@Override
public int getWeight(float luck) {
- return Math.max(Mth.floor((float)LootPoolSingletonContainer.this.weight + (float)LootPoolSingletonContainer.this.quality * luck), 0);
+ // Paper start - Offer an alternative loot formula to refactor how luck bonus applies
+ // Paper start - Configurable LootPool luck formula
+ // SEE: https://luckformula.emc.gs for details and data
+ if (LootPoolSingletonContainer.this.lastLuck != null && LootPoolSingletonContainer.this.lastLuck == luck) {
+ return lastWeight;
@ -72,7 +72,7 @@ index 6d5a2806345ff86e143e16ecedc2f1e8d80f5b85..d3de18b1f856a99aa4f2a556956af7e5
}
+ private Float lastLuck = null;
+ private int lastWeight = 0;
+ // Paper end
+ // Paper end - Configurable LootPool luck formula
@FunctionalInterface
protected interface EntryConstructor {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Print Error details when failing to save player data
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
index 08f4cc47ec3aa4dd6980ba543219891a510b010b..b3a90d6ef0e17c236e0b3c46e2d0012671afdaa7 100644
index 08f4cc47ec3aa4dd6980ba543219891a510b010b..63e187c65cb855031f286aad0d25ac4694f7a331 100644
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
@@ -47,7 +47,7 @@ public class PlayerDataStorage {
@ -13,7 +13,7 @@ index 08f4cc47ec3aa4dd6980ba543219891a510b010b..b3a90d6ef0e17c236e0b3c46e2d00126
Util.safeReplaceFile(path2, path1, path3);
} catch (Exception exception) {
- PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getName().getString());
+ PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), exception); // Paper
+ PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), exception); // Paper - Print exception
}
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 39e02e922e67915c23ce4565eba33f656cbe81b6..dff2427e32b92a6deca0df81d0820353c5fc242a 100644
index 39e02e922e67915c23ce4565eba33f656cbe81b6..0c0f8385a64e4b90dbd4e6363f3d0478a7f437e3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3808,12 +3808,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -13,13 +13,13 @@ index 39e02e922e67915c23ce4565eba33f656cbe81b6..dff2427e32b92a6deca0df81d0820353
Item item = this.useItem.getItem();
- return item.getUseAnimation(this.useItem) != UseAnim.BLOCK ? false : item.getUseDuration(this.useItem) - this.useItemRemaining >= 5;
+ return item.getUseAnimation(this.useItem) != UseAnim.BLOCK ? false : item.getUseDuration(this.useItem) - this.useItemRemaining >= getShieldBlockingDelay(); // Paper - shieldBlockingDelay
+ return item.getUseAnimation(this.useItem) != UseAnim.BLOCK ? false : item.getUseDuration(this.useItem) - this.useItemRemaining >= getShieldBlockingDelay(); // Paper - Make shield blocking delay configurable
} else {
return false;
}
}
+ // Paper start
+ // Paper start - Make shield blocking delay configurable
+ public int shieldBlockingDelay = this.level().paperConfig().misc.shieldBlockingDelay;
+
+ public int getShieldBlockingDelay() {
@ -29,7 +29,7 @@ index 39e02e922e67915c23ce4565eba33f656cbe81b6..dff2427e32b92a6deca0df81d0820353
+ public void setShieldBlockingDelay(int shieldBlockingDelay) {
+ this.shieldBlockingDelay = shieldBlockingDelay;
+ }
+ // Paper end
+ // Paper end - Make shield blocking delay configurable
+
public boolean isSuppressingSlidingDownLadder() {
return this.isShiftKeyDown();

Datei anzeigen

@ -22,14 +22,14 @@ index 8a668d36bafa5ba172b0ce510b46096ec2fd116a..dadb419a04b343d6ba59353c6caa1a50
event.getProjectile().remove();
return;
diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
index 421ed4daed9a61b9e9395538ff36606b196ca1f1..63fce7e3d9f59f36e29bc827a46396d73143bb8b 100644
index 421ed4daed9a61b9e9395538ff36606b196ca1f1..fb84b35e34063075e69e00e430bc00e7c3b9d62c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
@@ -196,8 +196,18 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob {
double d3 = Math.sqrt(d0 * d0 + d2 * d2);
entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4));
+ // Paper start
+ // Paper start - EntityShootBowEvent
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), entityarrow.getPickupItem(), entityarrow, target.getUsedItemHand(), 0.8F, true);
+ if (event.isCancelled()) {
+ event.getProjectile().remove();
@ -39,7 +39,7 @@ index 421ed4daed9a61b9e9395538ff36606b196ca1f1..63fce7e3d9f59f36e29bc827a46396d7
+ if (event.getProjectile() == entityarrow.getBukkitEntity()) {
+ this.level().addFreshEntity(entityarrow);
+ }
+ // Paper end
+ // Paper end - EntityShootBowEvent
this.playSound(SoundEvents.SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F));
- this.level().addFreshEntity(entityarrow);
}

Datei anzeigen

@ -7,14 +7,14 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
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 729c960a18a77b744eba0c9319cf5c2a9e84b707..45098aa460370669abdb3619fa4b1adef6fbf282 100644
index 729c960a18a77b744eba0c9319cf5c2a9e84b707..695f241372eb0fe457cf91595520cbed9a5cdc3e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2177,18 +2177,29 @@ public abstract class Player extends LivingEntity {
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
}
+ // Paper start
+ // Paper start - PlayerReadyArrowEvent
+ protected boolean tryReadyArrow(ItemStack bow, ItemStack itemstack) {
+ return !(this instanceof ServerPlayer) ||
+ new com.destroystokyo.paper.event.player.PlayerReadyArrowEvent(
@ -22,8 +22,8 @@ index 729c960a18a77b744eba0c9319cf5c2a9e84b707..45098aa460370669abdb3619fa4b1ade
+ org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(bow),
+ org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)
+ ).callEvent();
+ // Paper end
+ }
+ // Paper end - PlayerReadyArrowEvent
+
@Override
public ItemStack getProjectile(ItemStack stack) {
@ -31,14 +31,14 @@ index 729c960a18a77b744eba0c9319cf5c2a9e84b707..45098aa460370669abdb3619fa4b1ade
return ItemStack.EMPTY;
} else {
- Predicate<ItemStack> predicate = ((ProjectileWeaponItem) stack.getItem()).getSupportedHeldProjectiles();
+ Predicate<ItemStack> predicate = ((ProjectileWeaponItem) stack.getItem()).getSupportedHeldProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper
+ Predicate<ItemStack> predicate = ((ProjectileWeaponItem) stack.getItem()).getSupportedHeldProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
ItemStack itemstack1 = ProjectileWeaponItem.getHeldProjectile(this, predicate);
if (!itemstack1.isEmpty()) {
return itemstack1;
} else {
- predicate = ((ProjectileWeaponItem) stack.getItem()).getAllSupportedProjectiles();
+ predicate = ((ProjectileWeaponItem) stack.getItem()).getAllSupportedProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper
+ predicate = ((ProjectileWeaponItem) stack.getItem()).getAllSupportedProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
ItemStack itemstack2 = this.inventory.getItem(i);

Datei anzeigen

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Mon, 18 Jun 2018 15:46:23 +0200
Subject: [PATCH] Implement EntityKnockbackByEntityEvent and
Subject: [PATCH] Add EntityKnockbackByEntityEvent and
EntityPushedByEntityAttackEvent
Co-authored-by: aerulion <aerulion@gmail.com>
@ -9,7 +9,7 @@ Co-authored-by: aerulion <aerulion@gmail.com>
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d66d30a016ac04d5f051e59ca168a6c2bb8794ab..dd4afab77500277b7697ca988e34b526d28d97c0 100644
index d66d30a016ac04d5f051e59ca168a6c2bb8794ab..d9abd56d3802033bfd440f13640350b2fba017aa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1909,8 +1909,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -18,7 +18,7 @@ index d66d30a016ac04d5f051e59ca168a6c2bb8794ab..dd4afab77500277b7697ca988e34b526
public void push(double deltaX, double deltaY, double deltaZ) {
- this.setDeltaMovement(this.getDeltaMovement().add(deltaX, deltaY, deltaZ));
- this.hasImpulse = true;
+ // Paper start - call EntityPushedByEntityEvent
+ // Paper start - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
+ this.push(deltaX, deltaY, deltaZ, null);
+ }
+
@ -28,12 +28,12 @@ index d66d30a016ac04d5f051e59ca168a6c2bb8794ab..dd4afab77500277b7697ca988e34b526
+ this.setDeltaMovement(this.getDeltaMovement().add(delta.getX(), delta.getY(), delta.getZ()));
+ this.hasImpulse = true;
+ }
+ // Paper end - call EntityPushedByEntityEvent
+ // Paper end - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
protected void markHurt() {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4071cf3e8 100644
index 0c0f8385a64e4b90dbd4e6363f3d0478a7f437e3..b8c4e7d81b20887e5a05b93a1bbe01e72ff55ba7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1513,7 +1513,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -41,7 +41,7 @@ index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4
}
- this.knockback(0.4000000059604645D, d0, d1);
+ this.knockback(0.4000000059604645D, d0, d1, entity1); // Paper
+ this.knockback(0.4000000059604645D, d0, d1, entity1); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
if (!flag) {
this.indicateDamage(d0, d1);
}
@ -50,7 +50,7 @@ index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4
protected void blockedByShield(LivingEntity target) {
- target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ());
+ target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ(), this); // Paper
+ target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ(), this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
private boolean checkTotemDeathProtection(DamageSource source) {
@ -58,11 +58,11 @@ index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4
}
public void knockback(double strength, double x, double z) {
+ // Paper start - add knockbacking entity parameter
+ // Paper start - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
+ this.knockback(strength, x, z, null);
+ }
+ public void knockback(double strength, double x, double z, Entity knockingBackEntity) {
+ // Paper end - add knockbacking entity parameter
+ // Paper end - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
if (strength > 0.0D) {
this.hasImpulse = true;
@ -70,7 +70,7 @@ index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4
Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength);
this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
+ // Paper start - call EntityKnockbackByEntityEvent
+ // Paper start - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEventt
+ Vec3 currentMovement = this.getDeltaMovement();
+ org.bukkit.util.Vector delta = new org.bukkit.util.Vector(currentMovement.x - vec3d.x, currentMovement.y - vec3d.y, currentMovement.z - vec3d.z);
+ // Restore old velocity to be able to access it in the event
@ -78,12 +78,12 @@ index dff2427e32b92a6deca0df81d0820353c5fc242a..f17d6a208477daeb01b66b2894e871f4
+ if (knockingBackEntity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((org.bukkit.entity.LivingEntity) getBukkitEntity(), knockingBackEntity.getBukkitEntity(), (float) strength, delta).callEvent()) {
+ this.setDeltaMovement(vec3d.x + delta.getX(), vec3d.y + delta.getY(), vec3d.z + delta.getZ());
+ }
+ // Paper end
+ // Paper end - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index fbcf5ddb655e6d070f24d71bd076115739cf0254..a6b89a12471a8c7277b7a5aa50447ff275a667c6 100644
index fa0e96fd884a0338b44f68506b1d3ee6c42f17b1..524f99eeefb1ab95d1752df2faea76837f2e3787 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1646,7 +1646,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
@ -91,12 +91,12 @@ index fbcf5ddb655e6d070f24d71bd076115739cf0254..a6b89a12471a8c7277b7a5aa50447ff2
if (flag) {
if (f1 > 0.0F && target instanceof LivingEntity) {
- ((LivingEntity) target).knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
+ ((LivingEntity) target).knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper
+ ((LivingEntity) target).knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
index e319a46a21a94314c5d496820b1ac4879dcf56b9..4a3bcd988cf63452c4277ad55ba604ad43c8a623 100644
index e319a46a21a94314c5d496820b1ac4879dcf56b9..4f78e7fbb7a082069b44f7b28f0048e856e5c773 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
@@ -77,7 +77,7 @@ public class RamTarget extends Behavior<Goat> {
@ -104,12 +104,12 @@ index e319a46a21a94314c5d496820b1ac4879dcf56b9..4a3bcd988cf63452c4277ad55ba604ad
float g = Mth.clamp(entity.getSpeed() * 1.65F, 0.2F, 3.0F) + f;
float h = livingEntity.isDamageSourceBlocked(world.damageSources().mobAttack(entity)) ? 0.5F : 1.0F;
- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z());
+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z(), entity); // Paper
+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z(), entity); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
this.finishRam(world, entity);
world.playSound((Player)null, entity, this.getImpactSound.apply(entity), SoundSource.NEUTRAL, 1.0F, 1.0F);
} else if (this.hasRammedHornBreakingBlock(world, entity)) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..03ec02f9a2fb5abb5387cd0d83c9481d6cbb0bd2 100644
index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..771d798fa3b367043129f41101c65f13f0b466fa 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
@@ -68,7 +68,7 @@ public class SonicBoom extends Behavior<Warden> {
@ -117,12 +117,12 @@ index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..03ec02f9a2fb5abb5387cd0d83c9481d
double d = 0.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
double e = 2.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
- target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e);
+ target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e, entity); // Paper
+ target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e, entity); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
});
}
}
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 f5ce6423b8146cc741023e15004fe9814a035da8..de27517e13ecb15865aaa83257eaffb41c3eecfc 100644
index f5ce6423b8146cc741023e15004fe9814a035da8..666c62d796cae9a70516680e26196f7e02c53918 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -458,7 +458,7 @@ public class EnderDragon extends Mob implements Enemy {
@ -130,12 +130,12 @@ index f5ce6423b8146cc741023e15004fe9814a035da8..de27517e13ecb15865aaa83257eaffb4
double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D);
- entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D);
+ entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D, this); // Paper
+ entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D, this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
if (!this.phaseManager.getCurrentPhase().isSitting() && ((LivingEntity) entity).getLastHurtByMobTimestamp() < entity.tickCount - 2) {
entity.hurt(this.damageSources().mobAttack(this), 5.0F);
this.doEnchantDamageEffects(this, entity);
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
index 041f1650b853138e4286fe83a08d79d276054ce7..344e933311f5cdccb66069d486b111a003639dfe 100644
index 041f1650b853138e4286fe83a08d79d276054ce7..aba20a4352d8983b01ab5d329187588f68d3e405 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
@@ -265,7 +265,7 @@ public class Ravager extends Raider {
@ -143,12 +143,12 @@ index 041f1650b853138e4286fe83a08d79d276054ce7..344e933311f5cdccb66069d486b111a0
double d2 = Math.max(d0 * d0 + d1 * d1, 0.001D);
- entity.push(d0 / d2 * 4.0D, 0.2D, d1 / d2 * 4.0D);
+ entity.push(d0 / d2 * 4.0D, 0.2D, d1 / d2 * 4.0D, this); // Paper
+ entity.push(d0 / d2 * 4.0D, 0.2D, d1 / d2 * 4.0D, this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..004382377ee364143a34287e7b6546ae1df4e88e 100644
index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..cae7e3e85c3b911f50f8a06badf695c3df2847e5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
@@ -40,7 +40,7 @@ public interface HoglinBase {
@ -156,12 +156,12 @@ index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..004382377ee364143a34287e7b6546ae
Vec3 vec3 = (new Vec3(g, 0.0D, h)).normalize().scale(j).yRot(i);
double k = f * (double)attacker.level().random.nextFloat() * 0.5D;
- target.push(vec3.x, k, vec3.z);
+ target.push(vec3.x, k, vec3.z, attacker); // Paper
+ target.push(vec3.x, k, vec3.z, attacker); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
target.hurtMarked = true;
}
}
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 45098aa460370669abdb3619fa4b1adef6fbf282..8d40021ce31d5f8fd8a5462a80e92fb919b4b162 100644
index 695f241372eb0fe457cf91595520cbed9a5cdc3e..0704fad49e680d3274b23024497963c4d0ad353b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1285,9 +1285,9 @@ public abstract class Player extends LivingEntity {
@ -169,10 +169,10 @@ index 45098aa460370669abdb3619fa4b1adef6fbf282..8d40021ce31d5f8fd8a5462a80e92fb9
if (i > 0) {
if (target instanceof LivingEntity) {
- ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
+ ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper
+ ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
} else {
- target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
+ target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F), this); // Paper
+ target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F), this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
@ -181,7 +181,7 @@ index 45098aa460370669abdb3619fa4b1adef6fbf282..8d40021ce31d5f8fd8a5462a80e92fb9
// CraftBukkit start - Only apply knockback if the damage hits
if (entityliving.hurt(this.damageSources().playerAttack(this).sweep(), f4)) {
- entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
+ entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Pa
+ entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
}
// CraftBukkit end
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 713bfbe76e3f888cd41e71256ec70af78e64121c..b1fe86645fa9e6f4398c8466cb3243154146f29f 100644
index c8e13ea3bc256b112fa5fd916c0fb583322c081b..ed851ec919c18d724d3376e893eca09259ad9bf3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -719,6 +719,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,17 +5,17 @@ Subject: [PATCH] Add config to disable ender dragon legacy check
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index f310098b0a59fa5341198bb8282b23dfa4a7fc3a..e70273664b4a38ef4ba803c60409a24a07d5bed7 100644
index f310098b0a59fa5341198bb8282b23dfa4a7fc3a..d6b6c83a6d660107956a28c16fde2260583722aa 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -106,6 +106,10 @@ public class EndDragonFight {
this.ticksSinceLastPlayerScan = 21;
this.skipArenaLoadedCheck = false;
this.needsStateScanning = true;
+ // Paper start
+ // Paper start - Add config to disable ender dragon legacy check
+ this.needsStateScanning = world.paperConfig().entities.spawning.scanForLegacyEnderDragon;
+ if (!this.needsStateScanning) this.dragonKilled = true;
+ // Paper end
+ // Paper end - Add config to disable ender dragon legacy check
this.level = world;
this.origin = origin;
this.validPlayer = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance((double) origin.getX(), (double) (128 + origin.getY()), (double) origin.getZ(), 192.0D));

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b1fe86645fa9e6f4398c8466cb3243154146f29f..982231fcc788b99798e8361a53d77c4ed1920396 100644
index ed851ec919c18d724d3376e893eca09259ad9bf3..fda8fd0d69a3889909e804798a49c19e2a9d49a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1048,6 +1048,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e96abf6afd434c104437e2461431f8b4c82c1d00..e91ce13c4dbea719e567018ace8908d2c7b51b30 100644
index d5ff2037fd2756da1aac9660e65453913be172cd..0bb2ed82e8a3dffa9fd9d7aa41685dd50dafac0c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1474,7 +1474,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -15,7 +15,7 @@ index e96abf6afd434c104437e2461431f8b4c82c1d00..e91ce13c4dbea719e567018ace8908d2
if (tileentity instanceof net.minecraft.world.Container) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
- h.closeInventory();
+ h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
+ h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper - Inventory close reason
}
}
}
@ -24,12 +24,12 @@ index e96abf6afd434c104437e2461431f8b4c82c1d00..e91ce13c4dbea719e567018ace8908d2
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
- h.closeInventory();
+ h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
+ h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper - Inventory close reason
}
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3014467f1c9159e04afd0bb816e02af6599f1f71..29f91654226ae349e310121c8fef20d9c1f6c183 100644
index 3014467f1c9159e04afd0bb816e02af6599f1f71..e144adc6e5e2a195174ed7617c29993804ab87ff 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -692,7 +692,7 @@ public class ServerPlayer extends Player {
@ -37,7 +37,7 @@ index 3014467f1c9159e04afd0bb816e02af6599f1f71..29f91654226ae349e310121c8fef20d9
// Paper end
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
- this.closeContainer();
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
@ -46,7 +46,7 @@ index 3014467f1c9159e04afd0bb816e02af6599f1f71..29f91654226ae349e310121c8fef20d9
// SPIGOT-943 - only call if they have an inventory open
if (this.containerMenu != this.inventoryMenu) {
- this.closeContainer();
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DEATH); // Paper
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DEATH); // Paper - Inventory close reason
}
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
@ -55,7 +55,7 @@ index 3014467f1c9159e04afd0bb816e02af6599f1f71..29f91654226ae349e310121c8fef20d9
// CraftBukkit end
if (this.containerMenu != this.inventoryMenu) {
- this.closeContainer();
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.OPEN_NEW); // Paper
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
}
// this.nextContainerCounter(); // CraftBukkit - moved up
@ -64,18 +64,18 @@ index 3014467f1c9159e04afd0bb816e02af6599f1f71..29f91654226ae349e310121c8fef20d9
@Override
public void closeContainer() {
- CraftEventFactory.handleInventoryCloseEvent(this); // CraftBukkit
+ // Paper start
+ // Paper start - Inventory close reason
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNKNOWN);
+ }
+ @Override
+ public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
+ CraftEventFactory.handleInventoryCloseEvent(this, reason); // CraftBukkit
+ // Paper end
+ // Paper end - Inventory close reason
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8fb792d88852e78fded9f7ae2da26a1d9d09c959..6f6fee0ad12c8a251f86be0fbef32c005e354ee3 100644
index c1c9076be05cd4b0b19d16aabbf0320c2531cca1..d1c2dad79f6e265e184d374494b3f45414c5fafc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
@ -90,11 +90,11 @@ index 8fb792d88852e78fded9f7ae2da26a1d9d09c959..6f6fee0ad12c8a251f86be0fbef32c00
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {
+ // Paper start
+ // Paper start - Inventory close reason
+ this.handleContainerClose(packet, InventoryCloseEvent.Reason.PLAYER);
+ }
+ public void handleContainerClose(ServerboundContainerClosePacket packet, InventoryCloseEvent.Reason reason) {
+ // Paper end
+ // Paper end - Inventory close reason
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (this.player.isImmobile()) return; // CraftBukkit
@ -104,7 +104,7 @@ index 8fb792d88852e78fded9f7ae2da26a1d9d09c959..6f6fee0ad12c8a251f86be0fbef32c00
this.player.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 782cc6d910efe5bc5498d0083afab42fad6c4fa2..49e3252d6af633d69bdf05ce71dc2a1b3d24f05a 100644
index 782cc6d910efe5bc5498d0083afab42fad6c4fa2..b4643717c98193884a43089ec7a7e362b7153d20 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -518,7 +518,7 @@ public abstract class PlayerList {
@ -112,12 +112,12 @@ index 782cc6d910efe5bc5498d0083afab42fad6c4fa2..49e3252d6af633d69bdf05ce71dc2a1b
// See SPIGOT-5799, SPIGOT-6145
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
- entityplayer.closeContainer();
+ entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
+ entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason
}
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
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 8d40021ce31d5f8fd8a5462a80e92fb919b4b162..0d8261e15a1a66df17727788c387dca8fbe2ae84 100644
index 0704fad49e680d3274b23024497963c4d0ad353b..636c8d53e5c07f5d75881113b8cfb366a007a162 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -265,7 +265,7 @@ public abstract class Player extends LivingEntity {
@ -125,7 +125,7 @@ index 8d40021ce31d5f8fd8a5462a80e92fb919b4b162..0d8261e15a1a66df17727788c387dca8
super.tick();
if (!this.level().isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
- this.closeContainer();
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
@ -133,18 +133,18 @@ index 8d40021ce31d5f8fd8a5462a80e92fb919b4b162..0d8261e15a1a66df17727788c387dca8
}
+ // Paper start - unused code, but to keep signatures aligned
+ // Paper start - Inventory close reason; unused code, but to keep signatures aligned
+ public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
+ closeContainer();
+ this.containerMenu = this.inventoryMenu;
+ }
+ // Paper end
+ // Paper end - Inventory close reason
+
public void closeContainer() {
this.containerMenu = this.inventoryMenu;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index f0194d4431821638e43a0f1b12b39f668ad147d1..21e3070a9aab9b4d8d352655d0145c9921857c0e 100644
index 092d2bfab7e8fd9840e853f09adc85311ab29046..af6f8d11f0384c353332f5c5bb0967e518deccbe 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -376,7 +376,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -152,7 +152,7 @@ index f0194d4431821638e43a0f1b12b39f668ad147d1..21e3070a9aab9b4d8d352655d0145c99
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
// fire INVENTORY_CLOSE if one already open
- ((ServerPlayer) this.getHandle()).connection.handleContainerClose(new ServerboundContainerClosePacket(this.getHandle().containerMenu.containerId));
+ ((ServerPlayer) this.getHandle()).connection.handleContainerClose(new ServerboundContainerClosePacket(this.getHandle().containerMenu.containerId), org.bukkit.event.inventory.InventoryCloseEvent.Reason.OPEN_NEW); // Paper
+ ((ServerPlayer) this.getHandle()).connection.handleContainerClose(new ServerboundContainerClosePacket(this.getHandle().containerMenu.containerId), org.bukkit.event.inventory.InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
}
ServerPlayer player = (ServerPlayer) this.getHandle();
AbstractContainerMenu container;
@ -161,19 +161,19 @@ index f0194d4431821638e43a0f1b12b39f668ad147d1..21e3070a9aab9b4d8d352655d0145c99
@Override
public void closeInventory() {
- this.getHandle().closeContainer();
+ // Paper start
+ // Paper start - Inventory close reason
+ this.getHandle().closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.PLUGIN);
}
+ @Override
+ public void closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
+ getHandle().closeContainer(reason);
+ }
+ // Paper end
+ // Paper end - Inventory close reason
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f929327522b98c12823ebbf94531c1c3681b1efa..701c8c8320f922c6227046d8275595279e5dba9a 100644
index f929327522b98c12823ebbf94531c1c3681b1efa..f0392f2562ee2b65011da556dbe1a8369c5f954c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1194,7 +1194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -181,12 +181,12 @@ index f929327522b98c12823ebbf94531c1c3681b1efa..701c8c8320f922c6227046d827559527
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
- this.getHandle().closeContainer();
+ this.getHandle().closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.TELEPORT); // Paper
+ this.getHandle().closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.TELEPORT); // Paper - Inventory close reason
}
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 73963d1e17fa09f17913a2b9fdce0845949e3bec..fc9cf505f32b7cd5f7785314ce16d71c9236b640 100644
index 848bcabb5922c99ee78cb541c87b464cea032749..3ec8302c569ef923ddca3f9bfb3c506832fe7659 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1331,7 +1331,7 @@ public class CraftEventFactory {
@ -194,7 +194,7 @@ index 73963d1e17fa09f17913a2b9fdce0845949e3bec..fc9cf505f32b7cd5f7785314ce16d71c
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
- player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId));
+ player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper
+ player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
}
CraftServer server = player.level().getCraftServer();

Datei anzeigen

@ -16,14 +16,14 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6f6fee0ad12c8a251f86be0fbef32c005e354ee3..70c5255038f5db2a11d8248df59c310e8a1725d0 100644
index d1c2dad79f6e265e184d374494b3f45414c5fafc..a00f68b058d6d7aa28ce34ad726c5b228e5c2e64 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2419,6 +2419,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (event.isCancelled()) {
+ ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote(); // Paper - Refresh player inventory
+ ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote(); // Paper - Refresh player inventory
return;
}
// CraftBukkit end

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d47ada5544478dcfcb49f6b437e634105397fdfe..17cae197f76e02491791c55554bd57592a30aa1d 100644
index d9abd56d3802033bfd440f13640350b2fba017aa..ad2e61c7fd7906477e30e91c826d9ce4fb6bffc0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3202,7 +3202,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -14,7 +14,7 @@ index d47ada5544478dcfcb49f6b437e634105397fdfe..17cae197f76e02491791c55554bd5759
String s = this.level() == null ? "~NULL~" : this.level().toString();
- return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ(), this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ());
+ return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid, this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid);
+ return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid, this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid); // Paper - add more info
}
public boolean isInvulnerableTo(DamageSource damageSource) {

Datei anzeigen

@ -5,49 +5,49 @@ Subject: [PATCH] EnderDragon Events
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..7b96cf748b69db98cb1bc3dc0430e39b9ffc93f2 100644
index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..bb8f50a47a88f4e4d440ae0b70a56e7f9c1467ca 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
@@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
this.flame.setDuration(200);
this.flame.setParticle(ParticleTypes.DRAGON_BREATH);
this.flame.addEffect(new MobEffectInstance(MobEffects.HARM));
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.dragon.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.flame.getBukkitEntity()).callEvent()) { // Paper
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.dragon.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.flame.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
this.dragon.level().addFreshEntity(this.flame);
+ // Paper start
+ // Paper start - EnderDragon Events
+ } else {
+ this.end();
+ }
+ // Paper end
+ // Paper end - EnderDragon Events
}
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..a3456b35db4e938f91d6bc32d4d202a011bf13c4 100644
index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..9bf04f18d37356cdef1ef3a7f1e38a1801ad5713 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
@@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance {
DragonFireball dragonFireball = new DragonFireball(this.dragon.level(), this.dragon, r, s, t);
dragonFireball.moveTo(o, p, q, 0.0F, 0.0F);
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper - EnderDragon Events
this.dragon.level().addFreshEntity(dragonFireball);
+ else dragonFireball.discard(); // Paper
+ else dragonFireball.discard(); // Paper - EnderDragon Events
this.fireballCharge = 0;
if (this.currentPath != null) {
while(!this.currentPath.isDone()) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
index 796a2a88134eee4021423fef132537a5e0680bc5..9652e3385ad10e5d825dd141f6be3522c596916d 100644
index 796a2a88134eee4021423fef132537a5e0680bc5..61a36c4e97ee532e53eee4da00a9aa7e4b3438f5 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
@@ -52,8 +52,10 @@ public class DragonFireball extends AbstractHurtingProjectile {
}
}
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
this.level().addFreshEntity(areaEffectCloud);
+ } else areaEffectCloud.discard(); // Paper
+ } else areaEffectCloud.discard(); // Paper - EnderDragon Events
this.discard();
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerElytraBoostEvent
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
index 7c627d27300247db9122ab2081049345ef306073..f17e9c6c91c02e0d36f58851522a5d3e5e423121 100644
index 7c627d27300247db9122ab2081049345ef306073..6e6c9477b70b0e1ab36bca9fa91806a283ebedd1 100644
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
@@ -61,12 +61,19 @@ public class FireworkRocketItem extends Item {
@ -14,7 +14,7 @@ index 7c627d27300247db9122ab2081049345ef306073..f17e9c6c91c02e0d36f58851522a5d3e
fireworkRocketEntity.spawningEntity = user.getUUID(); // Paper
- world.addFreshEntity(fireworkRocketEntity);
- if (!user.getAbilities().instabuild) {
+ // Paper start
+ // Paper start - PlayerElytraBoostEvent
+ com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Firework) fireworkRocketEntity.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(fireworkRocketEntity)) {
+ user.awardStat(Stats.ITEM_USED.get(this));
@ -23,11 +23,11 @@ index 7c627d27300247db9122ab2081049345ef306073..f17e9c6c91c02e0d36f58851522a5d3e
+ } else ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
+ } else if (user instanceof net.minecraft.server.level.ServerPlayer) {
+ ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
+ // Paper end
+ // Paper end - PlayerElytraBoostEvent
}
- user.awardStat(Stats.ITEM_USED.get(this));
+ // user.awardStat(Stats.ITEM_USED.get(this)); // Paper - move up
+ // user.awardStat(Stats.ITEM_USED.get(this)); // Paper - PlayerElytraBoostEvent; move up
}
return InteractionResultHolder.sidedSuccess(user.getItemInHand(hand), world.isClientSide());

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
diff --git a/src/main/java/net/minecraft/world/item/EggItem.java b/src/main/java/net/minecraft/world/item/EggItem.java
index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..58cb992c5defec2f092755cbde661ff10f38bf9d 100644
index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..a3bd507793994e9cc87a956871a8afbb8ca9460d 100644
--- a/src/main/java/net/minecraft/world/item/EggItem.java
+++ b/src/main/java/net/minecraft/world/item/EggItem.java
@@ -25,21 +25,33 @@ public class EggItem extends Item {
@ -14,7 +14,7 @@ index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..58cb992c5defec2f092755cbde661ff1
entityegg.shootFromRotation(user, user.getXRot(), user.getYRot(), 0.0F, 1.5F, 1.0F);
- // CraftBukkit start
- if (!world.addFreshEntity(entityegg)) {
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityegg.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(entityegg)) {
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
@ -32,21 +32,21 @@ index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..58cb992c5defec2f092755cbde661ff1
return InteractionResultHolder.fail(itemstack);
}
- // CraftBukkit end
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.EGG_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ /* // Paper start - moved up
+ /* // Paper start - PlayerLaunchProjectileEvent; moved up
user.awardStat(Stats.ITEM_USED.get(this));
if (!user.getAbilities().instabuild) {
itemstack.shrink(1);
}
+ */ // Paper end
+ */ // Paper end - PlayerLaunchProjectileEvent
return InteractionResultHolder.sidedSuccess(itemstack, world.isClientSide());
}
diff --git a/src/main/java/net/minecraft/world/item/EnderpearlItem.java b/src/main/java/net/minecraft/world/item/EnderpearlItem.java
index c7d4745aed77b23562cde7c68b8870fa239428d4..749ab72edc0d2e9c6f1161415ab8d59d3d6ca976 100644
index c7d4745aed77b23562cde7c68b8870fa239428d4..8c8cf8705107c95d9a4eab28b5845ae13c4ffb3c 100644
--- a/src/main/java/net/minecraft/world/item/EnderpearlItem.java
+++ b/src/main/java/net/minecraft/world/item/EnderpearlItem.java
@@ -25,7 +25,20 @@ public class EnderpearlItem extends Item {
@ -54,8 +54,8 @@ index c7d4745aed77b23562cde7c68b8870fa239428d4..749ab72edc0d2e9c6f1161415ab8d59d
entityenderpearl.setItem(itemstack);
entityenderpearl.shootFromRotation(user, user.getXRot(), user.getYRot(), 0.0F, 1.5F, 1.0F);
- if (!world.addFreshEntity(entityenderpearl)) {
+ // Paper start
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityenderpearl.getBukkitEntity());
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityenderpearl.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(entityenderpearl)) {
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
+ itemstack.shrink(1);
@ -67,7 +67,7 @@ index c7d4745aed77b23562cde7c68b8870fa239428d4..749ab72edc0d2e9c6f1161415ab8d59d
+ user.awardStat(Stats.ITEM_USED.get(this));
+ user.getCooldowns().addCooldown(this, 20);
+ } else {
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
if (user instanceof net.minecraft.server.level.ServerPlayer) {
((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
}
@ -75,7 +75,7 @@ index c7d4745aed77b23562cde7c68b8870fa239428d4..749ab72edc0d2e9c6f1161415ab8d59d
}
}
+ /* // Paper start - moved up
+ /* // Paper start - PlayerLaunchProjectileEvent; moved up
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENDER_PEARL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
user.getCooldowns().addCooldown(this, 20);
// CraftBukkit end
@ -83,12 +83,12 @@ index c7d4745aed77b23562cde7c68b8870fa239428d4..749ab72edc0d2e9c6f1161415ab8d59d
if (!user.getAbilities().instabuild) {
itemstack.shrink(1);
}
+ */ // Paper end - moved up
+ */ // Paper end - PlayerLaunchProjectileEvent; moved up
return InteractionResultHolder.sidedSuccess(itemstack, world.isClientSide());
}
diff --git a/src/main/java/net/minecraft/world/item/ExperienceBottleItem.java b/src/main/java/net/minecraft/world/item/ExperienceBottleItem.java
index 72dfb7b652f515bf9df201d524a851ab56706544..b80bedb5f27b474d7f66e9e1cc38ca3b692fc92b 100644
index 72dfb7b652f515bf9df201d524a851ab56706544..39fe6734c8dcd34c563e33e717937bbd91882e1e 100644
--- a/src/main/java/net/minecraft/world/item/ExperienceBottleItem.java
+++ b/src/main/java/net/minecraft/world/item/ExperienceBottleItem.java
@@ -22,18 +22,37 @@ public class ExperienceBottleItem extends Item {
@ -96,13 +96,13 @@ index 72dfb7b652f515bf9df201d524a851ab56706544..b80bedb5f27b474d7f66e9e1cc38ca3b
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
ItemStack itemStack = user.getItemInHand(hand);
- world.playSound((Player)null, user.getX(), user.getY(), user.getZ(), SoundEvents.EXPERIENCE_BOTTLE_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ // world.playSound((Player)null, user.getX(), user.getY(), user.getZ(), SoundEvents.EXPERIENCE_BOTTLE_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); // Paper - moved down
+ // world.playSound((Player)null, user.getX(), user.getY(), user.getZ(), SoundEvents.EXPERIENCE_BOTTLE_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); // Paper - PlayerLaunchProjectileEvent; moved down
if (!world.isClientSide) {
ThrownExperienceBottle thrownExperienceBottle = new ThrownExperienceBottle(world, user);
thrownExperienceBottle.setItem(itemStack);
thrownExperienceBottle.shootFromRotation(user, user.getXRot(), user.getYRot(), -20.0F, 0.7F, 1.0F);
- world.addFreshEntity(thrownExperienceBottle);
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Projectile) thrownExperienceBottle.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(thrownExperienceBottle)) {
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
@ -119,20 +119,20 @@ index 72dfb7b652f515bf9df201d524a851ab56706544..b80bedb5f27b474d7f66e9e1cc38ca3b
+ }
+ return InteractionResultHolder.fail(itemStack);
+ }
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
+ /* // Paper start - moved up
+ /* // Paper start - PlayerLaunchProjectileEvent; moved up
user.awardStat(Stats.ITEM_USED.get(this));
if (!user.getAbilities().instabuild) {
itemStack.shrink(1);
}
+ */ // Paper end
+ */ // Paper end - PlayerLaunchProjectileEvent
return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
}
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
index f17e9c6c91c02e0d36f58851522a5d3e5e423121..82b0bda3e35ec2157a477e1a17b2b46baadc97d9 100644
index 6e6c9477b70b0e1ab36bca9fa91806a283ebedd1..0821c06a4c66edc8fcee09fc192335a588d2944b 100644
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
@@ -47,8 +47,12 @@ public class FireworkRocketItem extends Item {
@ -146,30 +146,30 @@ index f17e9c6c91c02e0d36f58851522a5d3e5e423121..82b0bda3e35ec2157a477e1a17b2b46b
+ if (!event.callEvent() || !level.addFreshEntity(fireworkRocketEntity)) return InteractionResult.PASS;
+ if (event.shouldConsume() && !context.getPlayer().getAbilities().instabuild) itemStack.shrink(1);
+ else if (context.getPlayer() instanceof net.minecraft.server.level.ServerPlayer) ((net.minecraft.server.level.ServerPlayer) context.getPlayer()).getBukkitEntity().updateInventory();
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
return InteractionResult.sidedSuccess(level.isClientSide);
diff --git a/src/main/java/net/minecraft/world/item/LingeringPotionItem.java b/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
index 04370590e6c8051ad17f937576b4cd88f6afb5d9..95ee59a831bdbf7364d917e7169d736fecf76076 100644
index 04370590e6c8051ad17f937576b4cd88f6afb5d9..8526251e45899499bc4d9b6254fa1b190a3843d8 100644
--- a/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
+++ b/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
@@ -23,7 +23,12 @@ public class LingeringPotionItem extends ThrowablePotionItem {
@Override
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ InteractionResultHolder<ItemStack> wrapper = super.use(world, user, hand);
+ if (wrapper.getResult() != net.minecraft.world.InteractionResult.FAIL) {
world.playSound((Player)null, user.getX(), user.getY(), user.getZ(), SoundEvents.LINGERING_POTION_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
- return super.use(world, user, hand);
+ }
+ return wrapper;
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
}
diff --git a/src/main/java/net/minecraft/world/item/SnowballItem.java b/src/main/java/net/minecraft/world/item/SnowballItem.java
index d60e57e84f7d66e1858ab50ac33777feedf1c54d..ef3f90a5bcdd7b9815a4053cff166f9d2552f55d 100644
index d60e57e84f7d66e1858ab50ac33777feedf1c54d..bc8186a5bc3a98b35fad570729dd4ba52efab238 100644
--- a/src/main/java/net/minecraft/world/item/SnowballItem.java
+++ b/src/main/java/net/minecraft/world/item/SnowballItem.java
@@ -26,18 +26,26 @@ public class SnowballItem extends Item {
@ -178,28 +178,28 @@ index d60e57e84f7d66e1858ab50ac33777feedf1c54d..ef3f90a5bcdd7b9815a4053cff166f9d
entitysnowball.shootFromRotation(user, user.getXRot(), user.getYRot(), 0.0F, 1.5F, 1.0F);
- if (world.addFreshEntity(entitysnowball)) {
- if (!user.getAbilities().instabuild) {
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitysnowball.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(entitysnowball)) {
+ user.awardStat(Stats.ITEM_USED.get(this));
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
itemstack.shrink(1);
+ } else if (user instanceof net.minecraft.server.level.ServerPlayer) { // Paper
+ ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory(); // Paper
+ } else if (user instanceof net.minecraft.server.level.ServerPlayer) { // Paper - PlayerLaunchProjectileEvent
+ ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory(); // Paper - PlayerLaunchProjectileEvent
}
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.SNOWBALL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
- } else if (user instanceof net.minecraft.server.level.ServerPlayer) {
- ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
+ } else { // Paper
+ if (user instanceof net.minecraft.server.level.ServerPlayer) ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory(); // Paper
+ return InteractionResultHolder.fail(itemstack); // Paper
+ } else { // Paper - PlayerLaunchProjectileEvent
+ if (user instanceof net.minecraft.server.level.ServerPlayer) ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory(); // Paper - PlayerLaunchProjectileEvent
+ return InteractionResultHolder.fail(itemstack); // Paper - PlayerLaunchProjectileEvent
}
}
// CraftBukkit end
+ /* // Paper tart - moved up
+ /* // Paper start - PlayerLaunchProjectileEvent; moved up
user.awardStat(Stats.ITEM_USED.get(this));
// CraftBukkit start - moved up
/*
@ -207,30 +207,30 @@ index d60e57e84f7d66e1858ab50ac33777feedf1c54d..ef3f90a5bcdd7b9815a4053cff166f9d
itemstack.shrink(1);
}
*/
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
return InteractionResultHolder.sidedSuccess(itemstack, world.isClientSide());
}
diff --git a/src/main/java/net/minecraft/world/item/SplashPotionItem.java b/src/main/java/net/minecraft/world/item/SplashPotionItem.java
index 317e20052bcac9118e1adeb619bedaacc6fcd690..ece19f30064e9f59d4df077683e1f894455a84b7 100644
index 317e20052bcac9118e1adeb619bedaacc6fcd690..3bd127780091c6bb9ec17c88f0cf57b0b8f37e11 100644
--- a/src/main/java/net/minecraft/world/item/SplashPotionItem.java
+++ b/src/main/java/net/minecraft/world/item/SplashPotionItem.java
@@ -14,7 +14,12 @@ public class SplashPotionItem extends ThrowablePotionItem {
@Override
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ InteractionResultHolder<ItemStack> wrapper = super.use(world, user, hand);
+ if (wrapper.getResult() != net.minecraft.world.InteractionResult.FAIL) {
world.playSound((Player)null, user.getX(), user.getY(), user.getZ(), SoundEvents.SPLASH_POTION_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
- return super.use(world, user, hand);
+ }
+ return wrapper;
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
}
diff --git a/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java b/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae509e46dc 100644
index 0673f62f25532955f3552b64f122e644d42027e4..f47f793c62a919fb65c081ddb82d597a978d3b20 100644
--- a/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
+++ b/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
@@ -19,13 +19,31 @@ public class ThrowablePotionItem extends PotionItem {
@ -238,7 +238,7 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae
thrownPotion.setItem(itemStack);
thrownPotion.shootFromRotation(user, user.getXRot(), user.getYRot(), -20.0F, 0.5F, 1.0F);
- world.addFreshEntity(thrownPotion);
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Projectile) thrownPotion.getBukkitEntity());
+ if (event.callEvent() && world.addFreshEntity(thrownPotion)) {
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
@ -254,10 +254,10 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae
+ }
+ return InteractionResultHolder.fail(itemStack);
+ }
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
}
+ /* // Paper start - moved up
+ /* // Paper start - PlayerLaunchProjectileEvent; moved up
user.awardStat(Stats.ITEM_USED.get(this));
if (!user.getAbilities().instabuild) {
itemStack.shrink(1);
@ -267,7 +267,7 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae
return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
}
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
index 2ccbba4775d7550c5c7277aee9cab9ff7d665693..5fab851b319847035fb1eefd0ab999de3ccc2cd8 100644
index 2ccbba4775d7550c5c7277aee9cab9ff7d665693..fa876ddf54780728e7f3ecfe02aa8a16b8ef6f8d 100644
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
@@ -83,21 +83,26 @@ public class TridentItem extends Item implements Vanishable {
@ -275,27 +275,27 @@ index 2ccbba4775d7550c5c7277aee9cab9ff7d665693..5fab851b319847035fb1eefd0ab999de
// CraftBukkit start
- if (!world.addFreshEntity(entitythrowntrident)) {
+ // Paper start
+ // Paper start - PlayerLaunchProjectileEvent
+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), (org.bukkit.entity.Projectile) entitythrowntrident.getBukkitEntity());
+ if (!event.callEvent() || !world.addFreshEntity(entitythrowntrident)) {
+ // Paper end
+ // Paper end - PlayerLaunchProjectileEvent
if (entityhuman instanceof net.minecraft.server.level.ServerPlayer) {
((net.minecraft.server.level.ServerPlayer) entityhuman).getBukkitEntity().updateInventory();
}
return;
}
+ if (event.shouldConsume()) { // Paper
+ if (event.shouldConsume()) { // Paper - PlayerLaunchProjectileEvent
stack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
entityhuman1.broadcastBreakEvent(user.getUsedItemHand());
});
+ } // Paper
+ } // Paper - PlayerLaunchProjectileEvent
entitythrowntrident.pickupItemStack = stack.copy(); // SPIGOT-4511 update since damage call moved
// CraftBukkit end
world.playSound((Player) null, (Entity) entitythrowntrident, SoundEvents.TRIDENT_THROW, SoundSource.PLAYERS, 1.0F, 1.0F);
- if (!entityhuman.getAbilities().instabuild) {
+ if (event.shouldConsume() && !entityhuman.getAbilities().instabuild) { // Paper
+ if (event.shouldConsume() && !entityhuman.getAbilities().instabuild) { // Paper - PlayerLaunchProjectileEvent
entityhuman.getInventory().removeItem(stack);
}
// CraftBukkit start - SPIGOT-5458 also need in this branch :(

Datei anzeigen

@ -21,7 +21,7 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
index 40950db0c242c65dfd4de247c86249354d12108f..e87ef99260bff134529e00b9a75381cecaec01a4 100644
index 40950db0c242c65dfd4de247c86249354d12108f..6d760fa1dbd13a66bff4695edc28f4ab4b3e44a3 100644
--- a/src/main/java/net/minecraft/core/Vec3i.java
+++ b/src/main/java/net/minecraft/core/Vec3i.java
@@ -44,7 +44,7 @@ public class Vec3i implements Comparable<Vec3i> {
@ -29,7 +29,7 @@ index 40950db0c242c65dfd4de247c86249354d12108f..e87ef99260bff134529e00b9a75381ce
@Override
- public boolean equals(Object object) {
+ public final boolean equals(Object object) { // Paper
+ public final boolean equals(Object object) { // Paper - Perf: Final for inline
if (this == object) {
return true;
} else if (!(object instanceof Vec3i)) {
@ -38,7 +38,7 @@ index 40950db0c242c65dfd4de247c86249354d12108f..e87ef99260bff134529e00b9a75381ce
@Override
- public int hashCode() {
+ public final int hashCode() { // Paper
+ public final int hashCode() { // Paper - Perf: Final for inline
return (this.getY() + this.getZ() * 31) * 31 + this.getX();
}
@ -47,17 +47,17 @@ index 40950db0c242c65dfd4de247c86249354d12108f..e87ef99260bff134529e00b9a75381ce
}
- public int getX() {
+ public final int getX() { // Paper
+ public final int getX() { // Paper - Perf: Final for inline
return this.x;
}
- public int getY() {
+ public final int getY() { // Paper
+ public final int getY() { // Paper - Perf: Final for inline
return this.y;
}
- public int getZ() {
+ public final int getZ() { // Paper
+ public final int getZ() { // Paper - Perf: Final for inline
return this.z;
}

Datei anzeigen

@ -5,32 +5,32 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups
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 d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..aff1b2195d2f187739394886d4c0bdbf0cb306b4 100644
index d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..e6e3a7ae08f7346ccbce02b9d36239485133e93a 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity {
@Override
protected void pushEntities() {
+ if (!this.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper
+ if (!this.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper - Option to prevent armor stands from doing entity lookups
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS);
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index dfdbe171509cc4098e8a14bd8bb65a3a2a44354c..fa504824948c42b7feeca50b407f1f07b2b1a73e 100644
index 4c48be9f98d75758e582e37ba45d0e8c5737adeb..d7dfbd198e16533aab8db3ee64daf26996380331 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -854,6 +854,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end
}
}
+ // Paper start - Prevent armor stands from doing entity lookups
+ // Paper start - Option to prevent armor stands from doing entity lookups
+ @Override
+ public boolean noCollision(@Nullable Entity entity, AABB box) {
+ if (entity instanceof net.minecraft.world.entity.decoration.ArmorStand && !entity.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return false;
+ return LevelAccessor.super.noCollision(entity, box);
+ }
+ // Paper end
+ // Paper end - Option to prevent armor stands from doing entity lookups
public boolean shouldTickDeath(Entity entity) {
return true;

Datei anzeigen

@ -39,7 +39,7 @@ index a6638e626600e4304a973497a39e3fac52203b16..c19069f65a9ecbc9000ea4333417a2df
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4fead0be6e8b754d0bafa1a988207fb8829b9180..30c69940c331f12dfe732052fcd917ea9231362f 100644
index d7dfbd198e16533aab8db3ee64daf26996380331..09f2bee26387641191ae7ee3b863ca4ae2106cb4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -276,6 +276,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -89,7 +89,7 @@ index 4fead0be6e8b754d0bafa1a988207fb8829b9180..30c69940c331f12dfe732052fcd917ea
public boolean isClientSide() {
return this.isClientSide;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 0b847125f67e19e6f0bdc6d0f2fcc8c5ad720fe9..712c92120d2d4b8188b47141e6f0252ad57e66d8 100644
index 3ec8302c569ef923ddca3f9bfb3c506832fe7659..b297f6eb25192079e8e388d034d4e3ede8d5ab37 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1368,6 +1368,14 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armor stand ticking
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 aff1b2195d2f187739394886d4c0bdbf0cb306b4..5ed648502268e9c4564b5a4984b68b499aeffeb9 100644
index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf77c18779a 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
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 de27517e13ecb15865aaa83257eaffb41c3eecfc..29683f0236163e5630d771d9409be0c23574a467 100644
index 666c62d796cae9a70516680e26196f7e02c53918..290d97437e9c593816b4f4c4e738c268be616dc0 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -558,6 +558,11 @@ public class EnderDragon extends Mob implements Enemy {

Datei anzeigen

@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e6b4111ba32906d1b3705b8a2cc06a07956e2891..3cb5bd145a4a719943e9fe4bc40ff7420abdd46d 100644
index a00f68b058d6d7aa28ce34ad726c5b228e5c2e64..222e9ab6fa6a40f7846451cee256d3dbbac54fde 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -257,6 +257,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -8,7 +8,7 @@ Addresses two issues:
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index 7eb84b1aad4f031ad17a461d174b23c213014995..cab5636fe6be9ee7f23ffbd5a399d2aeea1cd538 100644
index 4973cd6eeda0b484999c8a81d188b01f0fd08cac..5685951b71a8b81c7a71fd93b099b276d535b401 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -295,7 +295,7 @@ public class ExperienceOrb extends Entity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
index 7dcd8d4e4886e1d35adbc604eafabccb5550f1b4..a5bcad412fb1ac3b6a3eee3f4618dc6c1ca66936 100644
index b9dd91927cb259789ad71b2241024c5fa2586d57..b863249ff7e13cf4939c8961601f0564c62fd661 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -649,7 +649,7 @@ public class FriendlyByteBuf extends ByteBuf {

Datei anzeigen

@ -26,7 +26,7 @@ index c9e3e104cd051a38e367653dc6c4f969665fc250..45ee0cd242271883412284625230822d
protected void tick() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 536f1380ae3387ac4d062fe2f8b934a8d49905fb..5538e810ef0a68f00043d4e750eb735300d50664 100644
index 0bb2ed82e8a3dffa9fd9d7aa41685dd50dafac0c..8168a9a3f2b166775a531e7f834710669845d0ae 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1436,6 +1436,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -43,7 +43,7 @@ index 536f1380ae3387ac4d062fe2f8b934a8d49905fb..5538e810ef0a68f00043d4e750eb7353
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bebbbf9a0bca8ab94dd269d19ebf55622a3c2ef8..a906fda4d5d92054f5c0cea4a8167cdb29287cc3 100644
index ad2e61c7fd7906477e30e91c826d9ce4fb6bffc0..bbb6abd5a51a0ffef41f2ee38eb6d7a21d1c6c23 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -241,6 +241,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

Datei anzeigen

@ -23,7 +23,7 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
The point of this is readability, but does have a side-benefit of a small microptimization
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 49e3252d6af633d69bdf05ce71dc2a1b3d24f05a..6a3961350030e63b27512261402f675c3cd78485 100644
index b4643717c98193884a43089ec7a7e362b7153d20..af26a2b45cba7083f3bd7ddbbfde5bcfb30f1907 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -634,7 +634,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 982231fcc788b99798e8361a53d77c4ed1920396..717718111a98733401669428fb4c39db979114b3 100644
index fda8fd0d69a3889909e804798a49c19e2a9d49a6..5f65a43c45058bc4ea204623da82ef6befe8d5b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -403,7 +403,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,14 +5,13 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f17d6a208477daeb01b66b2894e871f4071cf3e8..486f22469c3cf7ce302c10072da3f96aa3be0ef3 100644
index b8c4e7d81b20887e5a05b93a1bbe01e72ff55ba7..5461121145c3cbe10f9ae492885c5aa0977b9049 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3829,6 +3829,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3829,6 +3829,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
// Paper start
+
// Paper start - Make shield blocking delay configurable
+ public HitResult getRayTrace(int maxDistance, ClipContext.Fluid fluidCollisionOption) {
+ if (maxDistance < 1 || maxDistance > 120) {
+ throw new IllegalArgumentException("maxDistance must be between 1-120");

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 17016f1ce89555ba10ea96368f5a1d195679a5d4..b6e4fbfdaa46a36e155870190252233eca99d456 100644
index f0392f2562ee2b65011da556dbe1a8369c5f954c..bebda561ce6fbb6a9dd750852934ca27a04aa034 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2871,6 +2871,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -19,7 +19,7 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0100aafc999cadcfa7a904a812355502379c418d..b2864db793e8d764cf06229d7868fcf80247f938 100644
index e144adc6e5e2a195174ed7617c29993804ab87ff..b3ad3b459e0ad6db37cde0c7de481202f928ea64 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -248,6 +248,10 @@ public class ServerPlayer extends Player {
@ -80,7 +80,7 @@ index 0100aafc999cadcfa7a904a812355502379c418d..b2864db793e8d764cf06229d7868fcf8
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 486f22469c3cf7ce302c10072da3f96aa3be0ef3..4df479842f482a8a6a5979c204b6882cd3603e93 100644
index 5461121145c3cbe10f9ae492885c5aa0977b9049..9808a03ed37708bec0f9c32bd2f1e4cb6afa2551 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -235,7 +235,7 @@ index 486f22469c3cf7ce302c10072da3f96aa3be0ef3..4df479842f482a8a6a5979c204b6882c
// CraftBukkit start
public int getExpReward() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index a6b89a12471a8c7277b7a5aa50447ff275a667c6..efef5df4cf720058c0b07ef795cfa6a567113811 100644
index 524f99eeefb1ab95d1752df2faea76837f2e3787..40becb18c6afae979875b684c1816e84970babb5 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1075,7 +1075,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
@ -311,7 +311,7 @@ index bb399f775a5530a01f59332848c8ab9b8eceb2b5..14edfe103e61024b569f33de0b6608f3
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
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 948ba97e318506dad96e59121297b5bf8340d2e6..810bead2f19de70786027b190137f743a0c40ee7 100644
index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -492,8 +492,10 @@ public class ArmorStand extends LivingEntity {
@ -402,7 +402,7 @@ index 948ba97e318506dad96e59121297b5bf8340d2e6..810bead2f19de70786027b190137f743
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bd6ac69d97ec1c12bf73e9ef07d39a484a39aad1..ce73a8c652cf95bae62808fc27db2ab852691fd8 100644
index bebda561ce6fbb6a9dd750852934ca27a04aa034..07076f9216fe904fe0f1f018b7e3862d5aab1398 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2408,7 +2408,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -422,7 +422,7 @@ index bd6ac69d97ec1c12bf73e9ef07d39a484a39aad1..ce73a8c652cf95bae62808fc27db2ab8
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 5c81eb10e92142d8d4907751edc8c01659d2c62e..10c701eb269b02c763d32c6a0be8fe7b843805c5 100644
index b297f6eb25192079e8e388d034d4e3ede8d5ab37..3bd92edf2f4e7a63a07bd2bbae002f99484a9069 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -890,9 +890,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -40,7 +40,7 @@ index e3d070d46729c023d594699619a4b3f8658edbce..5580a396a56c6e0f364a5368985ee99b
return ichunkaccess == null ? false : ichunkaccess.getBlockState(pos).is(this.blockToRemove) && ichunkaccess.getBlockState(pos.above()).isAir() && ichunkaccess.getBlockState(pos.above(2)).isAir();
}
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 5c620989acaff4fdb842944ea2d8ae331699a2b4..a859f02074c698c68713568ed99089e33f38ccca 100644
index 259ba77dcbc8ed5f7e4015a6683799cc4604dfb8..d259d7b8f7380763e3976f5f20bc01f06ce6901c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -517,7 +517,8 @@ public class EnderMan extends Monster implements NeutralMob {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index 203fc53142bb0c9b6e2d1876fe8dfbe33c42af99..e8cf9eafe0908bc9b716d9b6ead97828a43413ec 100644
index e68020588ed81fc14ef53a429e5bc86f7685235d..21aafb1ea51769659462d722aa318460b37cbc1c 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -51,7 +51,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4df479842f482a8a6a5979c204b6882cd3603e93..0085d4727e9bd1c6f451666e6012b8abcd74d129 100644
index 9808a03ed37708bec0f9c32bd2f1e4cb6afa2551..ab55d44e505fd50dae0000ce5a999f52f916103f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -16,7 +16,7 @@ index 4df479842f482a8a6a5979c204b6882cd3603e93..0085d4727e9bd1c6f451666e6012b8ab
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
@@ -3891,6 +3892,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3890,6 +3891,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.level().clip(raytrace);
}

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Add sun related API
public net.minecraft.world.entity.Mob isSunBurnTick()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 717718111a98733401669428fb4c39db979114b3..fbbad4c209618d1e5994cb5609d29f4bc9c9905c 100644
index 5f65a43c45058bc4ea204623da82ef6befe8d5b7..5e25cbee42dbd27c97b4732d70225e54a296b80e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -695,6 +695,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -25,7 +25,7 @@ index 717718111a98733401669428fb4c39db979114b3..fbbad4c209618d1e5994cb5609d29f4b
public long getGameTime() {
return this.world.levelData.getGameTime();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index c2acbf533b5f3aebe4837512f694fe25abee65d6..74843d1fa344497d35f05d0b04f650edd1e0f3a1 100644
index 018884ced888fcd03d2fb17b3620f8e6125e67da..0ad9885f939bcb50026d50ed78b970a44772ceb8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -93,4 +93,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {

Datei anzeigen

@ -19,7 +19,7 @@ spectate the target entity.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 6795bfdbdbd4e548c394e02a0e121b26facab8ea..e4d773356ae8b310908f502d12bab08dc6862e40 100644
index b3ad3b459e0ad6db37cde0c7de481202f928ea64..6624fd85fc8b5efc22b71f7aa665bd8f62aad7ed 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2085,6 +2085,21 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Add more Witch API
public net.minecraft.world.entity.monster.Witch usingTime
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
index ca24b592273208e61e0e0ba59b7e5a3c11ebf952..580dff41d746d9591f718081d9dfe4ac77e7eeaa 100644
index f45b46e30e1ad0516c5b380e476bc7dacb91391a..02386e7eabc6669296ce35158fa35a3c88c6b563 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
@@ -160,21 +160,10 @@ public class Witch extends Raider implements RangedAttackMob {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dd2ae4c0e4dad3f7c246357a9b45c832a091a576..6b9a53b244f5eca443697d01cc5938d85be4b99f 100644
index 222e9ab6fa6a40f7846451cee256d3dbbac54fde..91791fffa52dae34e6ab5e786bce7d0c6d077b73 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -475,9 +475,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e4d773356ae8b310908f502d12bab08dc6862e40..2119ad9a167ef50f912e8408702f310a61e1527e 100644
index 6624fd85fc8b5efc22b71f7aa665bd8f62aad7ed..4b163b9f6f6abc89ed62291e8df80d987bdc46e3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2560,6 +2560,7 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -59,7 +59,7 @@ index e3b7441d875b55ffce295c948f3dc867be09e042..32327f639b3cc10444ad122fb3405174
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6b9a53b244f5eca443697d01cc5938d85be4b99f..b04323c2e8697c2b406bb861b25aa5b0f7032557 100644
index 91791fffa52dae34e6ab5e786bce7d0c6d077b73..944bb7bf990dbd7198496a45c1babe8ad01e8eee 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1592,6 +1592,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -18,7 +18,7 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ed5eafd7d555b4500c8dd70e17401e0f453266dd..04ff773b84eb8870d77b09e25ab72e5a887774d4 100644
index f90361a27c067d0d8a92fd6af930a0d453b4c2a7..25d059f802a4bdcb7076bca8fa8a587e5de065bd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2807,6 +2807,16 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -20,7 +20,7 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a906fda4d5d92054f5c0cea4a8167cdb29287cc3..6f37e4fbadb287d9c099d1cc535c941aaabe1d54 100644
index bbb6abd5a51a0ffef41f2ee38eb6d7a21d1c6c23..4b9cb1c85ed17250f145e815d5c40cf09b34e4d2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2605,11 +2605,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -72,7 +72,7 @@ index a906fda4d5d92054f5c0cea4a8167cdb29287cc3..6f37e4fbadb287d9c099d1cc535c941a
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0085d4727e9bd1c6f451666e6012b8abcd74d129..9e3571220ba3eef5fa950ddd83af13ff45ae38ae 100644
index ab55d44e505fd50dae0000ce5a999f52f916103f..0290302c2b49b9fb262f8675f90010715fe53c50 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3471,9 +3471,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -93,7 +93,7 @@ index 0085d4727e9bd1c6f451666e6012b8abcd74d129..9e3571220ba3eef5fa950ddd83af13ff
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 0d8261e15a1a66df17727788c387dca8fbe2ae84..76a3e38a49d6ea8cf01604be4da12ad4e4fa3da4 100644
index 636c8d53e5c07f5d75881113b8cfb366a007a162..18394311d9d0bed5fa1ac09182947375380c7670 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1149,7 +1149,13 @@ public abstract class Player extends LivingEntity {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e0954ab93e4b528595fc3be40a30e2e6775bc4a2..2ee2e497f716f54dc8cd3d9b906d7bc2b7106448 100644
index 944bb7bf990dbd7198496a45c1babe8ad01e8eee..592493efdd799c76c753de825126c4f7b04a3179 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1026,6 +1026,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -38,7 +38,7 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
public net.minecraft.server.network.ServerLoginPacketListenerImpl state
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 6fcbf8205e1852d5193a42bfe1154f62ab01e7ad..8870d97194e1389ca747b74b092b1f8fb9090fb0 100644
index 090a130676de3ab458df6bd1e08f0b755a3f685a..c521e2eab937f90085c4f1a98aab13d46720a07b 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -644,6 +644,26 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {

Datei anzeigen

@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 54297045b5da66827426ae354883a9709d9cdefc..27f0fce3e5e5faec8f2717b5068cb23e2054ce8b 100644
index 4b163b9f6f6abc89ed62291e8df80d987bdc46e3..0afa8c7c826bb01f8a1139ced76fa599d205e045 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -248,6 +248,7 @@ public class ServerPlayer extends Player {
@ -28,7 +28,7 @@ index 54297045b5da66827426ae354883a9709d9cdefc..27f0fce3e5e5faec8f2717b5068cb23e
public boolean queueHealthUpdatePacket = false;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 6a3961350030e63b27512261402f675c3cd78485..154881ee9a837fea159246c6a826257bcf7a079a 100644
index af26a2b45cba7083f3bd7ddbbfde5bcfb30f1907..a1ab652fe6a838f8506c735815894ca16307264c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -179,6 +179,7 @@ public abstract class PlayerList {
@ -106,7 +106,7 @@ index e8490a58dd4d9bc39a5bb2f9fc109526e031b971..5f590575f95eff8bf0cdcafde7dee0e3
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ce73a8c652cf95bae62808fc27db2ab852691fd8..9df9b465df75dd41eabd789e85ee841ed4be092c 100644
index 07076f9216fe904fe0f1f018b7e3862d5aab1398..f7ec6a6822608c51129c4bb3247179cce16a39c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -191,6 +191,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 27f0fce3e5e5faec8f2717b5068cb23e2054ce8b..7c20af6a72603e46b4aec46a079101981eb59c08 100644
index 0afa8c7c826bb01f8a1139ced76fa599d205e045..4b7aacb6abe20dbac735b8edc2ca3c10ed8bfbe6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1749,6 +1749,13 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -8,7 +8,7 @@ We just add a check to ensure that the CraftPlayer's handle
is a ServerPlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9df9b465df75dd41eabd789e85ee841ed4be092c..9cae7d8a77af303cb509c23efd5541a5e04f54a6 100644
index f7ec6a6822608c51129c4bb3247179cce16a39c2..0f0956066203f1598997e54b89b23c500951009c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -247,8 +247,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -11,7 +11,7 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 71c2f082091f452cfc74557cd599cf7f080b889b..5d6f45f7ff8f310bf78417aa9bcf8f106a1d80c6 100644
index 09f2bee26387641191ae7ee3b863ca4ae2106cb4..942b27decf93713b00e28a6360e62c090caa5a01 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -31,6 +31,7 @@ import net.minecraft.nbt.CompoundTag;

Datei anzeigen

@ -53,7 +53,7 @@ index 5a1accff1a7dc2ab40224ec0952a287cd6099aee..2b722091920116ded43ff54c413d4dd4
event.getPlayer().getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e6b029c8ee05c5e045a7d694a9e8616d6a1ea484..5f377267cc3c72e4d55c29f20ce3cd3eed0e5258 100644
index bfcb155b1e8b04edfdbd26f4cc3bc2b4a7cbf5ea..06d70213a9f19bbd2a0f22a26af2dbb989bca5ce 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

Datei anzeigen

@ -131,7 +131,7 @@ index 2b722091920116ded43ff54c413d4dd47da65ed4..867f22bdeed5f1c3f063a5815a3477d1
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2ee2e497f716f54dc8cd3d9b906d7bc2b7106448..715e80bbb683da9c13d57b6b0bca70342e67c294 100644
index 592493efdd799c76c753de825126c4f7b04a3179..efa12d25cacd0b746ff8e689f35380bc310f5d75 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -740,8 +740,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen