Some more work
This commit is contained in:
4 files changed
+89
-128
No files matched your search
-57
@@ -1,57 +0,0 @@
|
||||
From 3aeeaf31b7a7f888f54e47826e8ec0ddbe65c4bf Mon Sep 17 00:00:00 2001
|
||||
From: File <noreply+automated@papermc.io>
|
||||
Date: Sun, 20 Apr 1997 14:37:42 +0100
|
||||
Subject: [PATCH] paper File Patches
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java b/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java
|
||||
index 75c9651beb136beb94d92c9dc8aee770bb9c27dc..cf9972fbe4a1f1c2e73e297953f353d72069267a 100644
|
||||
--- a/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java
|
||||
@@ -26,6 +26,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList
|
||||
private final VibrationSystem.Listener vibrationListener;
|
||||
private final VibrationSystem.User vibrationUser = this.createVibrationUser();
|
||||
public int lastVibrationFrequency;
|
||||
+ @Nullable public Integer rangeOverride = null; // Paper - Configurable sculk sensor listener range
|
||||
|
||||
protected SculkSensorBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState blockState) {
|
||||
super(type, pos, blockState);
|
||||
@@ -52,8 +53,16 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList
|
||||
.resultOrPartial(string -> LOGGER.error("Failed to parse vibration listener for Sculk Sensor: '{}'", string))
|
||||
.ifPresent(data -> this.vibrationData = data);
|
||||
}
|
||||
+ // Paper start - Configurable sculk sensor listener range
|
||||
+ if (tag.contains(PAPER_LISTENER_RANGE_NBT_KEY)) {
|
||||
+ this.rangeOverride = tag.getInt(PAPER_LISTENER_RANGE_NBT_KEY);
|
||||
+ } else {
|
||||
+ this.rangeOverride = null;
|
||||
+ }
|
||||
+ // Paper end - Configurable sculk sensor listener range
|
||||
}
|
||||
|
||||
+ protected static final String PAPER_LISTENER_RANGE_NBT_KEY = "Paper.ListenerRange"; // Paper - Configurable sculk sensor listener range
|
||||
@Override
|
||||
protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) {
|
||||
super.saveAdditional(tag, registries);
|
||||
@@ -63,7 +72,13 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList
|
||||
.encodeStart(registryOps, this.vibrationData)
|
||||
.resultOrPartial(string -> LOGGER.error("Failed to encode vibration listener for Sculk Sensor: '{}'", string))
|
||||
.ifPresent(tag1 -> tag.put("listener", tag1));
|
||||
+ this.saveRangeOverride(tag); // Paper - Configurable sculk sensor listener range
|
||||
+ }
|
||||
+ // Paper start - Configurable sculk sensor listener range
|
||||
+ protected void saveRangeOverride(CompoundTag tag) {
|
||||
+ if (this.rangeOverride != null && this.rangeOverride != VibrationUser.LISTENER_RANGE) tag.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.rangeOverride); // only save if it's different from the default
|
||||
}
|
||||
+ // Paper end - Configurable sculk sensor listener range
|
||||
|
||||
@Override
|
||||
public VibrationSystem.Data getVibrationData() {
|
||||
@@ -100,6 +115,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList
|
||||
|
||||
@Override
|
||||
public int getListenerRadius() {
|
||||
+ if (SculkSensorBlockEntity.this.rangeOverride != null) return SculkSensorBlockEntity.this.rangeOverride; // Paper - Configurable sculk sensor listener range
|
||||
return 8;
|
||||
}
|
||||
|
||||
+39
-56
@@ -1,14 +1,6 @@
|
||||
From 3aeeaf31b7a7f888f54e47826e8ec0ddbe65c4bf Mon Sep 17 00:00:00 2001
|
||||
From: File <noreply+automated@papermc.io>
|
||||
Date: Sun, 20 Apr 1997 14:37:42 +0100
|
||||
Subject: [PATCH] paper File Patches
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e971b53e48 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
@@ -83,6 +83,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -79,6 +_,7 @@
|
||||
private List<BeehiveBlockEntity.BeeData> stored = Lists.newArrayList();
|
||||
@Nullable
|
||||
public BlockPos savedFlowerPos;
|
||||
@@ -16,7 +8,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
|
||||
public BeehiveBlockEntity(BlockPos pos, BlockState blockState) {
|
||||
super(BlockEntityType.BEEHIVE, pos, blockState);
|
||||
@@ -116,7 +117,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -112,7 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
@@ -25,16 +17,16 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
}
|
||||
|
||||
public void emptyAllLivingFromHive(@Nullable Player player, BlockState state, BeehiveBlockEntity.BeeReleaseStatus releaseStatus) {
|
||||
@@ -127,7 +128,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
Bee bee = (Bee)entity;
|
||||
if (player.position().distanceToSqr(entity.position()) <= 16.0) {
|
||||
if (!this.isSedated()) {
|
||||
- bee.setTarget(player);
|
||||
+ bee.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
|
||||
} else {
|
||||
bee.setStayOutOfHiveCountdown(400);
|
||||
}
|
||||
@@ -138,8 +139,14 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -121,7 +_,7 @@
|
||||
for (Entity entity : list) {
|
||||
if (entity instanceof Bee bee && player.position().distanceToSqr(entity.position()) <= 16.0) {
|
||||
if (!this.isSedated()) {
|
||||
- bee.setTarget(player);
|
||||
+ bee.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
|
||||
} else {
|
||||
bee.setStayOutOfHiveCountdown(400);
|
||||
}
|
||||
@@ -131,8 +_,14 @@
|
||||
}
|
||||
|
||||
private List<Entity> releaseAllOccupants(BlockState state, BeehiveBlockEntity.BeeReleaseStatus releaseStatus) {
|
||||
@@ -50,7 +42,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
if (!list.isEmpty()) {
|
||||
super.setChanged();
|
||||
}
|
||||
@@ -152,6 +159,11 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -145,6 +_,11 @@
|
||||
return this.stored.size();
|
||||
}
|
||||
|
||||
@@ -62,7 +54,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
public static int getHoneyLevel(BlockState state) {
|
||||
return state.getValue(BeehiveBlock.HONEY_LEVEL);
|
||||
}
|
||||
@@ -162,7 +174,16 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -155,7 +_,16 @@
|
||||
}
|
||||
|
||||
public void addOccupant(Bee bee) {
|
||||
@@ -80,7 +72,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
bee.stopRiding();
|
||||
bee.ejectPassengers();
|
||||
bee.dropLeash();
|
||||
@@ -187,7 +208,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -180,7 +_,7 @@
|
||||
this.level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(bee, this.getBlockState()));
|
||||
}
|
||||
|
||||
@@ -89,7 +81,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
super.setChanged();
|
||||
}
|
||||
}
|
||||
@@ -205,7 +226,21 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -198,7 +_,21 @@
|
||||
BeehiveBlockEntity.BeeReleaseStatus releaseStatus,
|
||||
@Nullable BlockPos storedFlowerPos
|
||||
) {
|
||||
@@ -112,7 +104,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
return false;
|
||||
} else {
|
||||
Direction direction = state.getValue(BeehiveBlock.FACING);
|
||||
@@ -216,6 +251,17 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -209,6 +_,17 @@
|
||||
} else {
|
||||
Entity entity = occupant.createEntity(level, pos);
|
||||
if (entity != null) {
|
||||
@@ -123,20 +115,20 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
+ double d1 = pos.getX() + 0.5 + d * direction.getStepX();
|
||||
+ double d2 = pos.getY() + 0.5 - entity.getBbHeight() / 2.0F;
|
||||
+ double d3 = pos.getZ() + 0.5 + d * direction.getStepZ();
|
||||
+ entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
|
||||
+ entity.snapTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
|
||||
+ }
|
||||
+ if (!level.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BEEHIVE)) return false; // CraftBukkit - SpawnReason, moved from below
|
||||
+ // CraftBukkit end
|
||||
if (entity instanceof Bee bee) {
|
||||
if (storedFlowerPos != null && !bee.hasSavedFlowerPos() && level.random.nextFloat() < 0.9F) {
|
||||
bee.setSavedFlowerPos(storedFlowerPos);
|
||||
@@ -231,7 +277,13 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -224,7 +_,13 @@
|
||||
i--;
|
||||
}
|
||||
|
||||
- level.setBlockAndUpdate(pos, state.setValue(BeehiveBlock.HONEY_LEVEL, Integer.valueOf(honeyLevel + i)));
|
||||
- level.setBlockAndUpdate(pos, state.setValue(BeehiveBlock.HONEY_LEVEL, honeyLevel + i));
|
||||
+ // Paper start - Fire EntityChangeBlockEvent in more places
|
||||
+ BlockState newBlockState = state.setValue(BeehiveBlock.HONEY_LEVEL, Integer.valueOf(honeyLevel + i));
|
||||
+ BlockState newBlockState = state.setValue(BeehiveBlock.HONEY_LEVEL, honeyLevel + i);
|
||||
+
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, newBlockState)) {
|
||||
+ level.setBlockAndUpdate(pos, newBlockState);
|
||||
@@ -145,7 +137,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,17 +292,19 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -233,17 +_,19 @@
|
||||
storedInHives.add(bee);
|
||||
}
|
||||
|
||||
@@ -155,7 +147,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
double d1 = pos.getX() + 0.5 + d * direction.getStepX();
|
||||
double d2 = pos.getY() + 0.5 - entity.getBbHeight() / 2.0F;
|
||||
double d3 = pos.getZ() + 0.5 + d * direction.getStepZ();
|
||||
entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
|
||||
entity.snapTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
|
||||
+ */ // CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -166,7 +158,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -276,6 +330,11 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -269,6 +_,11 @@
|
||||
flag = true;
|
||||
iterator.remove();
|
||||
}
|
||||
@@ -178,43 +170,34 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +358,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -292,9 +_,10 @@
|
||||
@Override
|
||||
protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) {
|
||||
super.loadAdditional(tag, registries);
|
||||
- this.stored.clear();
|
||||
+ this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
|
||||
if (tag.contains("bees")) {
|
||||
BeehiveBlockEntity.Occupant.LIST_CODEC
|
||||
.parse(NbtOps.INSTANCE, tag.get("bees"))
|
||||
@@ -308,6 +367,11 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
}
|
||||
|
||||
this.savedFlowerPos = NbtUtils.readBlockPos(tag, "flower_pos").orElse(null);
|
||||
+ // CraftBukkit start
|
||||
+ if (tag.contains("Bukkit.MaxEntities")) {
|
||||
+ this.maxBees = tag.getInt("Bukkit.MaxEntities");
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
tag.read("bees", BeehiveBlockEntity.Occupant.LIST_CODEC).orElse(List.of()).forEach(this::storeBee);
|
||||
this.savedFlowerPos = tag.read("flower_pos", BlockPos.CODEC).orElse(null);
|
||||
+ this.maxBees = tag.getIntOr("Bukkit.MaxEntities", MAX_OCCUPANTS); // Paper - persist max bukkit occupants
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,12 +381,13 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
if (this.hasSavedFlowerPos()) {
|
||||
tag.put("flower_pos", NbtUtils.writeBlockPos(this.savedFlowerPos));
|
||||
}
|
||||
+ tag.putInt("Bukkit.MaxEntities", this.maxBees); // CraftBukkit
|
||||
@@ -302,12 +_,13 @@
|
||||
super.saveAdditional(tag, registries);
|
||||
tag.store("bees", BeehiveBlockEntity.Occupant.LIST_CODEC, this.getBees());
|
||||
tag.storeNullable("flower_pos", BlockPos.CODEC, this.savedFlowerPos);
|
||||
+ tag.putInt("Bukkit.MaxEntities", this.maxBees); // Paper - persist max bukkit occupants
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyImplicitComponents(BlockEntity.DataComponentInput componentInput) {
|
||||
super.applyImplicitComponents(componentInput);
|
||||
protected void applyImplicitComponents(DataComponentGetter componentGetter) {
|
||||
super.applyImplicitComponents(componentGetter);
|
||||
- this.stored.clear();
|
||||
+ this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
|
||||
List<BeehiveBlockEntity.Occupant> list = componentInput.getOrDefault(DataComponents.BEES, List.of());
|
||||
List<BeehiveBlockEntity.Occupant> list = componentGetter.getOrDefault(DataComponents.BEES, Bees.EMPTY).bees();
|
||||
list.forEach(this::storeBee);
|
||||
}
|
||||
@@ -345,15 +410,18 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -330,15 +_,18 @@
|
||||
|
||||
static class BeeData {
|
||||
private final BeehiveBlockEntity.Occupant occupant;
|
||||
@@ -234,7 +217,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
}
|
||||
|
||||
public BeehiveBlockEntity.Occupant toOccupant() {
|
||||
@@ -424,6 +492,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -409,6 +_,7 @@
|
||||
}
|
||||
|
||||
private static void setBeeReleaseData(int ticksInHive, Bee bee) {
|
||||
@@ -242,7 +225,7 @@ index 9f7b53e98b880c47511ba185073645e294278d9d..fbde2680b405b9fa7ed2fe70046b77e9
|
||||
int age = bee.getAge();
|
||||
if (age < 0) {
|
||||
bee.setAge(Math.min(0, age + ticksInHive));
|
||||
@@ -432,6 +501,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -417,6 +_,7 @@
|
||||
}
|
||||
|
||||
bee.setInLoveTime(Math.max(0, bee.getInLoveTime() - ticksInHive));
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
--- a/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java
|
||||
@@ -24,6 +_,7 @@
|
||||
private final VibrationSystem.Listener vibrationListener;
|
||||
private final VibrationSystem.User vibrationUser;
|
||||
public int lastVibrationFrequency = 0;
|
||||
+ @Nullable public Integer rangeOverride = null; // Paper - Configurable sculk sensor listener range
|
||||
|
||||
protected SculkSensorBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState blockState) {
|
||||
super(type, pos, blockState);
|
||||
@@ -46,15 +_,23 @@
|
||||
this.lastVibrationFrequency = tag.getIntOr("last_vibration_frequency", 0);
|
||||
RegistryOps<Tag> registryOps = registries.createSerializationContext(NbtOps.INSTANCE);
|
||||
this.vibrationData = tag.read("listener", VibrationSystem.Data.CODEC, registryOps).orElseGet(VibrationSystem.Data::new);
|
||||
+ this.rangeOverride = tag.getInt(PAPER_LISTENER_RANGE_NBT_KEY).orElse(null); // Paper start - Configurable sculk sensor listener range
|
||||
}
|
||||
|
||||
+ protected static final String PAPER_LISTENER_RANGE_NBT_KEY = "Paper.ListenerRange"; // Paper - Configurable sculk sensor listener range
|
||||
@Override
|
||||
protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) {
|
||||
super.saveAdditional(tag, registries);
|
||||
tag.putInt("last_vibration_frequency", this.lastVibrationFrequency);
|
||||
RegistryOps<Tag> registryOps = registries.createSerializationContext(NbtOps.INSTANCE);
|
||||
tag.store("listener", VibrationSystem.Data.CODEC, registryOps, this.vibrationData);
|
||||
- }
|
||||
+ this.saveRangeOverride(tag); // Paper - Configurable sculk sensor listener range
|
||||
+ }
|
||||
+ // Paper start - Configurable sculk sensor listener range
|
||||
+ protected void saveRangeOverride(CompoundTag tag) {
|
||||
+ if (this.rangeOverride != null && this.rangeOverride != VibrationUser.LISTENER_RANGE) tag.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.rangeOverride); // only save if it's different from the default
|
||||
+ }
|
||||
+ // Paper end - Configurable sculk sensor listener range
|
||||
|
||||
@Override
|
||||
public VibrationSystem.Data getVibrationData() {
|
||||
@@ -91,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
public int getListenerRadius() {
|
||||
+ if (SculkSensorBlockEntity.this.rangeOverride != null) return SculkSensorBlockEntity.this.rangeOverride; // Paper - Configurable sculk sensor listener range
|
||||
return 8;
|
||||
}
|
||||
|
||||
+7
-15
@@ -1,28 +1,20 @@
|
||||
From 3aeeaf31b7a7f888f54e47826e8ec0ddbe65c4bf Mon Sep 17 00:00:00 2001
|
||||
From: File <noreply+automated@papermc.io>
|
||||
Date: Sun, 20 Apr 1997 14:37:42 +0100
|
||||
Subject: [PATCH] paper File Patches
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
index ba88c32d82f8acf0114fad7ff8dac3356029d84e..0c99c2a18c1ccc0ff86547e988e1022cc1596c18 100644
|
||||
--- a/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
|
||||
@@ -105,6 +105,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -91,6 +_,13 @@
|
||||
|
||||
@Nullable
|
||||
public static ServerPlayer tryGetPlayer(@Nullable Entity entity) {
|
||||
+ // Paper start - check global player list where appropriate; ensure level is the same for sculk events
|
||||
+ // Paper start - check global player list where appropriate; ensure level is the same for sculk events
|
||||
+ final ServerPlayer player = tryGetPlayer0(entity);
|
||||
+ return player != null && player.level() == entity.level() ? player : null;
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ private static ServerPlayer tryGetPlayer0(@Nullable Entity entity) {
|
||||
+ // Paper end - check global player list where appropriate
|
||||
if (entity instanceof ServerPlayer) {
|
||||
return (ServerPlayer)entity;
|
||||
} else {
|
||||
@@ -190,7 +197,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
|
||||
+ // Paper end - check global player list where appropriate
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
return serverPlayer;
|
||||
} else if (entity != null && entity.getControllingPassenger() instanceof ServerPlayer serverPlayer) {
|
||||
@@ -166,7 +_,7 @@
|
||||
private boolean trySummonWarden(ServerLevel level) {
|
||||
return this.warningLevel >= 4
|
||||
&& SpawnUtil.trySpawnMob(
|
||||
Reference in new issue
Block a user