mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-04 17:00:09 -05:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5fe71723e | ||
|
|
50018799f2 | ||
|
|
a3b2cb162a |
No files matched your search
@@ -1367,11 +1367,7 @@ public final class Bukkit {
|
||||
* Sets the radius, in blocks, around each worlds spawn point to protect.
|
||||
*
|
||||
* @param value new spawn radius, or 0 if none
|
||||
* @deprecated has not functioned for a long time as the spawn radius is defined by the server.properties file.
|
||||
* There is no API replacement for this method. It is generally recommended to implement "protection"-like behaviour
|
||||
* via events or third-party plugin APIs.
|
||||
*/
|
||||
@Deprecated(since = "1.21.4", forRemoval = true)
|
||||
public static void setSpawnRadius(int value) {
|
||||
server.setSpawnRadius(value);
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
|
||||
+++ b/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
|
||||
@@ -27,17 +_,36 @@
|
||||
@@ -27,17 +_,38 @@
|
||||
ServerLevel level = source.level();
|
||||
Direction direction = source.state().getValue(DispenserBlock.FACING);
|
||||
Position position = this.dispenseConfig.positionFunction().getDispensePosition(source, direction);
|
||||
@@ -40,8 +40,10 @@
|
||||
+
|
||||
+ // SPIGOT-7923: Avoid create projectiles with empty item
|
||||
+ if (!singleItemStack.isEmpty()) {
|
||||
+ Projectile projectile = Projectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(level, position, org.bukkit.craftbukkit.inventory.CraftItemStack.unwrap(event.getItem()), direction), level, singleItemStack, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty()); // Paper - track changed items in the dispense event; unwrap is safe here because all uses of the stack make their own copies
|
||||
+ Projectile projectile = this.projectileItem.asProjectile(level, position, org.bukkit.craftbukkit.inventory.CraftItemStack.unwrap(event.getItem()), direction); // Paper - track changed items in the dispense event; unwrap is safe here because all uses of the stack make their own copies
|
||||
+ Projectile.Delayed<Projectile> delayedProjectile = Projectile.spawnProjectileUsingShootDelayed(projectile, level, singleItemStack, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty());
|
||||
+ projectile.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(source.blockEntity());
|
||||
+ delayedProjectile.spawn();
|
||||
+ }
|
||||
+ if (shrink) dispensed.shrink(1);
|
||||
+ // CraftBukkit end
|
||||
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
@@ -101,6 +_,11 @@
|
||||
@@ -101,6 +_,12 @@
|
||||
}
|
||||
|
||||
if (this.ticksSinceReachedGoal > 60) {
|
||||
+ // CraftBukkit start - Step on eggs
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityInteractEvent(this.removerMob, org.bukkit.craftbukkit.block.CraftBlock.at(level, eatPos))) {
|
||||
+ this.ticksSinceReachedGoal++;
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
Reference in new issue
Block a user