PC-Logix / OpenSecurity

Security addon for OpenComputers
MIT License
47 stars 24 forks source link

[Bug] TileEntityCardWriter.java does not accept null value for getCapability facing enum #138

Closed CptnCrackbaby closed 5 years ago

CptnCrackbaby commented 5 years ago

When placing the card writer while NuclearCraft is installed the game crashes with a null pointer exception.

Crash log: https://pastebin.com/R0haSNn3

I've checked TileEntityCardWriter.java, and RadiationHelper.java (from NuclearCraft: https://github.com/turbodiesel4598/NuclearCraft/blob/master/src/main/java/nc/radiation/RadiationHelper.java) and can see that NuclearCraft calls getCapability with a null EnumFacing, while TileEntityCardWriter.java assumes that this value is not null.

To Reproduce Install NuclearCraft, OpenComputers, and OpenSecurity. Place a Card Writer

Expected behavior According to the forge documentation the correct behaviour is for getCapability to handle a null EnumFacing as "it can be assumed that the request comes either from within the block, or from some place where the side has no meaning, such as a different dimension."

Minecraft:

If you need more details please let me know.

ben-mkiv commented 5 years ago

Thanks for the report, build 32 has a fix for that and is now on curseForge https://www.curseforge.com/minecraft/mc-mods/opensecurity/files