mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
fix summon_entity effect attempting to add incorrect entity, closes #1545
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <granny@purpurmc.org>
|
||||
Date: Mon, 1 Jul 2024 00:16:57 -0700
|
||||
Subject: [PATCH] fix summon_entity effect attempting to add incorrect entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||
index d927357d541cf206bb3019b2fda3473a77b44ec4..e40c96a6f50ad7438116a1e6454b2bf45f042233 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||
@@ -54,7 +54,7 @@ public record SummonEntityEffect(HolderSet<EntityType<?>> entityTypes, boolean j
|
||||
// CraftBukkit start
|
||||
world.strikeLightning(entity1, (context.itemStack().getItem() == Items.TRIDENT) ? LightningStrikeEvent.Cause.TRIDENT : LightningStrikeEvent.Cause.ENCHANTMENT);
|
||||
} else {
|
||||
- world.addFreshEntityWithPassengers(user, CreatureSpawnEvent.SpawnReason.ENCHANTMENT);
|
||||
+ world.addFreshEntityWithPassengers(entity1, CreatureSpawnEvent.SpawnReason.ENCHANTMENT); // Purpur
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user