mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Follow up on block entities
This commit is contained in:
parent
b95e27be6c
commit
4091c6ac4d
3 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@
|
|||
private static void makeRaidersGlow(Level level, BlockPos pos, List<LivingEntity> raiders) {
|
||||
- raiders.stream().filter(raider -> isRaiderWithinRange(pos, raider)).forEach(BellBlockEntity::glow);
|
||||
+ // Paper start - call bell resonate event and bell reveal raider event
|
||||
+ final List<org.bukkit.entity.LivingEntity> inRangeRaiders = raiders.stream().filter(raider -> isRaiderWithinRange(pos, raider)).map(e -> e.getBukkitEntity()).toList();
|
||||
+ final List<org.bukkit.entity.LivingEntity> inRangeRaiders = raiders.stream().filter(raider -> isRaiderWithinRange(pos, raider)).map(e -> (org.bukkit.entity.LivingEntity) e.getBukkitEntity()).toList();
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(level, pos, inRangeRaiders).forEach(e -> glow(e, pos));
|
||||
+ // Paper end - call bell resonate event and bell reveal raider event
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public List<org.bukkit.entity.HumanEntity> getViewers() {
|
||||
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
|
||||
+ return this.transaction;
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
+
|
||||
+ org.bukkit.inventory.Inventory destinationInventory;
|
||||
+ // Have to special case large chests as they work oddly
|
||||
+ if (attachedContainer instanceof final CompoundContainer compoundContainer) {
|
||||
+ if (attachedContainer instanceof final net.minecraft.world.CompoundContainer compoundContainer) {
|
||||
+ destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest(compoundContainer);
|
||||
+ } else if (attachedContainer.getOwner() != null) {
|
||||
+ destinationInventory = attachedContainer.getOwner().getInventory();
|
||||
|
@ -140,7 +140,7 @@
|
|||
+
|
||||
+ org.bukkit.inventory.Inventory sourceInventory;
|
||||
+ // Have to special case large chests as they work oddly
|
||||
+ if (container instanceof final CompoundContainer compoundContainer) {
|
||||
+ if (container instanceof final net.minecraft.world.CompoundContainer compoundContainer) {
|
||||
+ sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest(compoundContainer);
|
||||
+ } else if (container.getOwner() != null) {
|
||||
+ sourceInventory = container.getOwner().getInventory();
|
||||
|
|
Loading…
Reference in a new issue