aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0118-Firework-API-s.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0118-Firework-API-s.patch')
-rw-r--r--patches/server/0118-Firework-API-s.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0118-Firework-API-s.patch b/patches/server/0118-Firework-API-s.patch
index a137c1c66f..c562b87811 100644
--- a/patches/server/0118-Firework-API-s.patch
+++ b/patches/server/0118-Firework-API-s.patch
@@ -7,14 +7,14 @@ Subject: [PATCH] Firework API's
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
-index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..5b3b59057b962438c6f4fc8a1507342865b3bc11 100644
+index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..813c4a52c8ddd70e252125ebfd3654346c71f13c 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -40,6 +40,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
public int lifetime;
@Nullable
public LivingEntity attachedToEntity;
-+ public java.util.UUID spawningEntity; // Paper
++ @Nullable public java.util.UUID spawningEntity; // Paper
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
super(type, world);
@@ -56,18 +56,18 @@ index ac7371882d15746e9353865635d0bb716f890c53..ba570f1c9654e1004e068a1efe2118f3
object = CrossbowItem.getArrow(world, shooter, crossbow, projectile);
if (creative || simulated != 0.0F) {
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
-index 5cafb6f0b507127665393741b372286da098d603..7c627d27300247db9122ab2081049345ef306073 100644
+index b342d23692ffd38b6eec66838162e9012f29ac09..3749cfca8f007973d1a2206d8f2ba15283a550e1 100644
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
-@@ -46,6 +46,7 @@ public class FireworkRocketItem extends Item {
- Vec3 vec3 = context.getClickLocation();
- Direction direction = context.getClickedFace();
- FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack);
+@@ -53,6 +53,7 @@ public class FireworkRocketItem extends Item {
+ vec3.z + (double)direction.getStepZ() * 0.15,
+ itemStack
+ );
+ fireworkRocketEntity.spawningEntity = context.getPlayer() == null ? null : context.getPlayer().getUUID(); // Paper
level.addFreshEntity(fireworkRocketEntity);
itemStack.shrink(1);
}
-@@ -59,6 +60,7 @@ public class FireworkRocketItem extends Item {
+@@ -66,6 +67,7 @@ public class FireworkRocketItem extends Item {
ItemStack itemStack = user.getItemInHand(hand);
if (!world.isClientSide) {
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);