apace100 / apoli

MIT License
40 stars 46 forks source link

Issues with `explode` entity/block action types #147

Closed eggohito closed 1 year ago

eggohito commented 1 year ago

Currently, it doesn't correctly account for destructible. There is also no explosion sounds and particle effects emitted, which may be because of a change where there's a method in the World class that accepts ExplosionSourceType, which is what is apparently being used by the actions.

As a side-effect, it also throws a suppressed exception on the server: ``` [19:41:51] [Server thread/ERROR] (Minecraft) Error executing task on Server java.lang.ClassCastException: net.minecraft.world.explosion.Explosion$DestructionType incompatible with net.minecraft.world.World$ExplosionSourceType at io.github.apace100.apoli.power.factory.action.entity.ExplodeAction.action(ExplodeAction.java:46) ~[main/:?] at io.github.apace100.apoli.power.factory.action.ActionFactory$Instance.accept(ActionFactory.java:43) ~[main/:?] at io.github.apace100.apoli.power.ActiveCooldownPower.onUse(ActiveCooldownPower.java:32) ~[main/:?] at io.github.apace100.apoli.networking.ModPacketsC2S.lambda$useActivePowers$2(ModPacketsC2S.java:78) ~[main/:?] at net.minecraft.server.ServerTask.run(ServerTask.java:18) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor.java:156) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor.java:23) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:782) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:164) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor.java:130) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.runOneTask(MinecraftServer.java:764) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.runTask(MinecraftServer.java:758) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor.java:115) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.runTasksTillTickEnd(MinecraftServer.java:742) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.handler$zjn000$carpet$modifiedRunLoop(MinecraftServer.java:6951) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:650) ~[minecraft-project-@-merged-named.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[minecraft-project-@-merged-named.jar:?] at java.lang.Thread.run(Thread.java:857) ~[?:?] ```