90fe0d58a5
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry 255b2aa1 SPIGOT-7080: Add World#locateNearestBiome ff984826 Remove javadoc.io doc links CraftBukkit Changes: 71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler 38c599f9d PR-1272: Only allow one entity in CraftItem instead of two f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld Spigot Changes: e0e223fe Remove javadoc.io doc links
31 Zeilen
1.3 KiB
Diff
31 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: TrollyLoki <trollyloki@gmail.com>
|
|
Date: Tue, 10 Oct 2023 00:45:01 -0400
|
|
Subject: [PATCH] Make setVelocity method of Fireballs change the travel
|
|
direction to an arbitrary vector
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
|
index e04500dcdc5b72cca7ac81b5d12e76822db9c8c5..22d59ca52229dc566b8dfb460b92ecd6318e6db0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
|
@@ -46,6 +46,18 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
|
|
update(); // SPIGOT-6579
|
|
}
|
|
|
|
+ // Paper start - set direction without normalizing
|
|
+ @Override
|
|
+ public void setVelocity(Vector velocity) {
|
|
+ Preconditions.checkArgument(velocity != null, "Vector velocity cannot be null");
|
|
+ velocity.checkFinite();
|
|
+ this.getHandle().xPower = velocity.getX();
|
|
+ this.getHandle().yPower = velocity.getY();
|
|
+ this.getHandle().zPower = velocity.getZ();
|
|
+ update();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public AbstractHurtingProjectile getHandle() {
|
|
return (AbstractHurtingProjectile) entity;
|