mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Add village raid spawn reason
This commit is contained in:
34
patches/server/0024-Add-village-raid-spawn-reason.patch
Normal file
34
patches/server/0024-Add-village-raid-spawn-reason.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 3950cb7d0630fe42b19a6873461f2e944de97075 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 29 May 2019 23:39:04 -0500
|
||||
Subject: [PATCH] Add village raid spawn reason
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/Raid.java | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Raid.java b/src/main/java/net/minecraft/server/Raid.java
|
||||
index ba19b1d51..1484f39f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Raid.java
|
||||
+++ b/src/main/java/net/minecraft/server/Raid.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -512,7 +514,7 @@ public class Raid {
|
||||
entityraider.prepare(this.l, this.l.getDamageScaler(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entityraider.a(i, false);
|
||||
entityraider.onGround = true;
|
||||
- this.l.addEntity(entityraider);
|
||||
+ this.l.addEntity(entityraider, CreatureSpawnEvent.SpawnReason.VILLAGE_RAID); // Purpur
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user