Ladysnake / BLAST

A simple Minecraft bomb mod for Fabric.
https://ladysnake.github.io/wiki/blast.html
13 stars 14 forks source link

[1.16.3 Fabric] Incompatible with Applied Energistics 2 Fabric #8

Closed RGamberini closed 3 years ago

RGamberini commented 3 years ago

I figured there was no real writeup for issues #6 and #7 so here's all the information I've gathered so far. Describe the bug Igniting the strip miner (and subsequently spawning the strip miner entity) triggers a java.lang.IllegalArgumentException: Duplicate id value error.

To Reproduce Create a modpack containing only 'BLAST' version 1.4 (filename: 'blast-1.4.jar') and 'Applied Energistics 2' version 8.1.0-alpha 12 (filename: 'appliedenergistics2-fabric-8.1.0-alpha.12.jar'). Go in game and set off a strip miner using either flint and steel or another explosion.

Expected behavior Strip miner entity spawns and explodes as normal.

Additional context Error while crashing - https://gist.github.com/RGamberini/cab34f9c821c882d3c1e7fac14587fc5

Environment: Minecraft Version: 1.16.3 Minecraft Version ID: 1.16.3 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_242, AdoptOpenJDK Java VM Version: OpenJDK 64-Bit Server VM (mixed mode),

RGamberini commented 3 years ago

This line is where's crashing when I run with a dev enviornment: https://github.com/Ladysnake/BLAST/blob/1.16/src/main/java/ladysnake/blast/common/entities/StripminerEntity.java#L21 That line returns the value <entity data: 8>

Which causes the error: java.lang.IllegalArgumentException: Duplicate id value for 8!

I don't know enough about Minecraft modding to say why that's a duplicate ID. I will say I (because I want to use the stipminers in my local modpack) was able to work around the issue by putting the following static block in at the top of StripminerEntity.java.


static {
        DataTracker.registerData(StripminerEntity.class, TrackedDataHandlerRegistry.FACING);
        DataTracker.registerData(StripminerEntity.class, TrackedDataHandlerRegistry.FACING);
        DataTracker.registerData(StripminerEntity.class, TrackedDataHandlerRegistry.FACING);
    }
doctor4t commented 3 years ago

Thank you for this comprehensive and detailed issue, I'll look into it.

doctor4t commented 3 years ago

Alright, I checked and turns out I shouldn't use the vanilla FACING, because it causes issues when other mods use it as well apparently. I'll also need to inform the AE2 devs.