[RESOLVED] ClassCastExceptiion with org.spongepowered.api.entity.explosive.PrimedTNT

Hello,

  • Windows 10
  • JDK 1.8_211
  • Gradle 4.10.3
  • SpongeForge (stable-7#17b7051ccc0975f02cea9d4d79af908fe673c47b)
  • IntelliJ Community Edition (2019.1.3)

I have no other mod loaded, just mods from Sponge :

When TNT explode, nothing happens and I got the following stacktrace :

**********************************************************************************************************************/
/*                                                   Exception occurred during a PhaseState                                                   */
/**********************************************************************************************************************************************/
/* Sponge's tracking system makes a best effort to not throw exceptions randomly                                                              */
/* but sometimes it is inevitable. In most cases, something else triggered this                                                               */
/* exception and Sponge prevented a crash by catching it. The following stacktrace                                                            */
/* can be used to help pinpoint the cause.                                                                                                    */
/**********************************************************************************************************************************************/
/* The PhaseState having an exception: Tick{Entity}                                                                                           */
/* The PhaseContext:                                                                                                                          */
/*     - Owner: EntityPlayerMP['Player864'/28, l='New World', x=643.28, y=1.00, z=-614.84]                                                    */
/*     - Source: EntityTNTPrimed['Block of TNT'/39, l='New World', x=640.30, y=1.00, z=-619.45]                                               */
/* org.spongepowered.asm.util.PrettyPrinter@2a5dd815                                                                                          */
/*                                                                                                                                            */
/*  StackTrace :                                                                                                                              */
/* java.lang.ClassCastException: net.minecraft.entity.item.EntityTNTPrimed cannot be cast to org.spongepowered.api.entity.explosive.PrimedTNT */
/*     net.minecraft.entity.item.EntityTNTPrimed.redirect$spongeImpl$UseSpongeExplosionInstead$zgi000(EntityTNTPrimed.java:609)               */
/*     net.minecraft.entity.item.EntityTNTPrimed.explode(EntityTNTPrimed.java:115)                                                            */
/*     net.minecraft.entity.item.EntityTNTPrimed.onUpdate(EntityTNTPrimed.java:102)                                                           */
/*     org.spongepowered.common.event.tracking.TrackingUtil.tickEntity(TrackingUtil.java:168)                                                 */
/*     net.minecraft.world.WorldServer.redirect$onCallEntityUpdate$zlm000(WorldServer.java:4415)                                              */
/*     net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2183)                                                               */
/*     net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:871)                                                    */
/*     net.minecraft.world.World.updateEntity(World.java:2142)                                                                                */
/*     net.minecraft.world.World.updateEntities(World.java:7439)                                                                              */
/*     net.minecraft.world.WorldServer.updateEntities(WorldServer.java:3534)                                                                  */
/*     net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:842)                                              */
/*     net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743)                                                                    */
/*     net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)                                                       */
/*     net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592)                                                                     */
/*     java.lang.Thread.run(Thread.java:748)                                                                                                  */
/*                                                                                                                                            */
/* Minecraft : 1.12.2                                                                                                                         */
/* Minecraft Forge : 14.23.5.2838                                                                                                             */
/**********************************************************************************************************************************************/

Resolved by pulling the lastest version of stable-7 (2592105365cfd14c1356cc3dab9d77e0d17d0ded fix this issue)

Can you send the server log too, as this sounds like a failed mixin? And this time please use a paste service such as paste.gg because it’s nice to be able to scroll through threads at a reasonable rate.

As I said it was resolved. Gabizou made a fix :wink: No need to investigate futher imo