SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix die letzte
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-08-20 15:37:46 +02:00
Ursprung 88e772896c
Commit f6e71a03c1

Datei anzeigen

@ -33,14 +33,13 @@ public class TNTPrimedIterator18 implements TNTPrimedIterator {
private static final Reflection.MethodInvoker getWorld = Reflection.getMethod(Reflection.getClass("{obc}.CraftWorld"), "getHandle");
private static final Reflection.MethodInvoker getWorldEntities = Reflection.getTypedMethod(WorldServer.class, null, LevelEntityGetter.class);
private static final Reflection.MethodInvoker getIterable = Reflection.getTypedMethod(LevelEntityGetter.class, null, Iterable.class);
public static final Class<?> primedTnt = Reflection.getClass("{nms.world.entity.item}.EntityTNTPrimed");
private static final Reflection.MethodInvoker getBukkitEntity = Reflection.getTypedMethod(Reflection.getClass("{nms.world.entity}.Entity"), "getBukkitEntity", null);
@Override
public Stream<TNTPrimed> iterator() {
return StreamSupport.stream(((Iterable<?>) getIterable.invoke(getWorldEntities.invoke(getWorld.invoke(Bukkit.getWorlds().get(0))))).spliterator(), false)
.filter(primedTnt::isInstance)
.map(getBukkitEntity::invoke)
.filter(TNTPrimed.class::isInstance)
.map(TNTPrimed.class::cast);
}
}