Commits
md_5 authored ca3a41a305a
99 99 | EntityRaider entityraider1 = null; |
100 100 | |
101 101 | |
102 102 | this.joinRaid(worldserver, i, entityraider1, blockposition, false); |
103 103 | entityraider1.snapTo(blockposition, 0.0F, 0.0F); |
104 104 | entityraider1.startRiding(entityraider); |
105 105 | + raiders.add(entityraider); // CraftBukkit |
106 106 | } |
107 107 | } |
108 108 | |
109 - | |
109 + | |
110 + | continue; |
111 + | } |
112 + | } |
113 + | + break; // CraftBukkit - decompile error |
114 + | } |
115 + | } |
116 + | |
117 + | |
110 118 | ++this.groupsSpawned; |
111 119 | this.updateBossbar(); |
112 120 | this.setDirty(worldserver); |
113 121 | + org.bukkit.craftbukkit.event.CraftEventFactory.callRaidSpawnWaveEvent(this, worldserver, leader, raiders); // CraftBukkit |
114 122 | } |
115 123 | |
116 124 | public void joinRaid(WorldServer worldserver, int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) { |
117 - | |
125 + | |
118 126 | entityraider.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(blockposition), EntitySpawnReason.EVENT, (GroupDataEntity) null); |
119 127 | entityraider.applyRaidBuffs(worldserver, i, false); |
120 128 | entityraider.setOnGround(true); |
121 129 | - worldserver.addFreshEntityWithPassengers(entityraider); |
122 130 | + worldserver.addFreshEntityWithPassengers(entityraider, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.RAID); // CraftBukkit |
123 131 | } |
124 132 | } |
125 133 | |
126 - | |
134 + | |
127 135 | this.heroesOfTheVillage.add(entity.getUUID()); |
128 136 | } |
129 137 | |
130 138 | + // CraftBukkit start - a method to get all raiders |
131 139 | + public java.util.Collection<EntityRaider> getRaiders() { |
132 140 | + return this.groupRaiderMap.values().stream().flatMap(Set::stream).collect(java.util.stream.Collectors.toSet()); |
133 141 | + } |
134 142 | + // CraftBukkit end |
135 143 | + |
136 144 | private static enum Status implements INamable { |