@@ -72,21 +72,21 @@
|
||||
Logger logger = EntityVillager.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -818,7 +838,12 @@
|
||||
}
|
||||
@@ -820,7 +840,12 @@
|
||||
}
|
||||
|
||||
entitywitch.setPersistenceRequired();
|
||||
- worldserver.addFreshEntityWithPassengers(entitywitch);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ worldserver.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
|
||||
+ // CraftBukkit end
|
||||
this.releaseAllPois();
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -904,7 +929,7 @@
|
||||
entitywitch.setPersistenceRequired();
|
||||
- worldserver.addFreshEntityWithPassengers(entitywitch);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ worldserver.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
|
||||
+ // CraftBukkit end
|
||||
this.releaseAllPois();
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -909,7 +934,7 @@
|
||||
}).limit(5L).collect(Collectors.toList());
|
||||
|
||||
if (list1.size() >= j) {
|
||||
@@ -95,7 +95,7 @@
|
||||
list.forEach(SensorGolemLastSeen::golemDetected);
|
||||
}
|
||||
}
|
||||
@@ -961,7 +986,7 @@
|
||||
@@ -966,7 +991,7 @@
|
||||
@Override
|
||||
public void startSleeping(BlockPosition blockposition) {
|
||||
super.startSleeping(blockposition);
|
||||
@@ -104,7 +104,7 @@
|
||||
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
|
||||
this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
|
||||
}
|
||||
@@ -969,7 +994,7 @@
|
||||
@@ -974,7 +999,7 @@
|
||||
@Override
|
||||
public void stopSleeping() {
|
||||
super.stopSleeping();
|
||||
|
||||
Reference in New Issue
Block a user