mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 09:21:57 +01:00
#1429: Add CreatureSpawnEvent.SpawnReason#TRIAL_SPAWNER
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
85ae59a767
commit
be0055d2a0
1 changed files with 18 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
--- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
|
||||
+++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
|
||||
@@ -219,13 +219,13 @@
|
||||
}
|
||||
|
||||
entityinsentient.setPersistenceRequired();
|
||||
- Optional optional1 = mobspawnerdata.getEquipment();
|
||||
+ Optional<net.minecraft.world.entity.EquipmentTable> optional1 = mobspawnerdata.getEquipment(); // CraftBukkit - decompile error
|
||||
|
||||
Objects.requireNonNull(entityinsentient);
|
||||
optional1.ifPresent(entityinsentient::equip);
|
||||
}
|
||||
|
||||
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
|
||||
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER)) { // CraftBukkit
|
||||
return Optional.empty();
|
||||
} else {
|
||||
TrialSpawner.a trialspawner_a = this.isOminous ? TrialSpawner.a.OMINOUS : TrialSpawner.a.NORMAL;
|
Loading…
Reference in a new issue