fix a bunch of compile errors
This commit is contained in:
parent
8f7a7ec440
commit
0b8147f68e
16 changed files with 40 additions and 48 deletions
|
@ -48,23 +48,15 @@ index 7582efc69928718a164f704a54bce026ad6f7dd9..9bd6e71ea38bf050832f0f7bbed4a5db
|
|||
|
||||
CIRCLE, SWOOP;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..55b6e16d8a0671c7e897d42bbbe1e02b7e47e736 100644
|
||||
index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..a18e6296d1f50c53291d41192a1009605a1b3583 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.levelgen;
|
||||
import java.util.Iterator;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
+import io.papermc.paper.util.MCUtil;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.stats.ServerStatsCounter;
|
||||
@@ -70,9 +71,19 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
@@ -70,9 +70,19 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
|
||||
|
||||
for (int l = 0; l < k; ++l) {
|
||||
+ // Paper start
|
||||
+ com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event = new com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent(MCUtil.toLocation(world, blockposition1), ((ServerPlayer) entityhuman).getBukkitEntity(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL);
|
||||
+ com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event = new com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent(io.papermc.paper.util.MCUtil.toLocation(world, blockposition1), entityplayer.getBukkitEntity(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL);
|
||||
+ if (!event.callEvent()) {
|
||||
+ if (event.shouldAbortSpawn()) {
|
||||
+ break;
|
||||
|
@ -75,7 +67,7 @@ index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..55b6e16d8a0671c7e897d42bbbe1e02b
|
|||
Phantom entityphantom = (Phantom) EntityType.PHANTOM.create(world);
|
||||
|
||||
if (entityphantom != null) {
|
||||
+ entityphantom.setSpawningEntity(entityhuman.getUUID()); // Paper
|
||||
+ entityphantom.setSpawningEntity(entityphantom.getUUID()); // Paper
|
||||
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
|
||||
groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null);
|
||||
world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue