Botania

Botania

138M Downloads

Abstruse/ Spectral Platform not retaining disguise after relog

Darrhon opened this issue ยท 2 comments

commented

Mod Loader

Forge

Minecraft Version

1.20.1

Botania version

1.20.1-443-FORGE

Modloader version

Forge: 47.2.0

Modpack info

N/A

The latest.log file

N/A

Issue description

When re-joining a world after disguising an Abstruse/ Spectral Platfrom it will not retain the disguise and revert to a missing texture.

Steps to reproduce

  1. Place an Abstruse/ Spectral platform
  2. Disguise it with any block
  3. Leave
  4. Join again and be sad that your build looks sad

Other information

Note: that if you are next to the platform when you leave and rejoin it will revert to the standard texture instead of the missing texture. For confirming just step five blocks away from the platforms.

commented

Came here after also coming across this issue.

I believe this trace may help in tracking down the exact issue

2024-04-17T05:56:29.log

commented

BlockState state = NbtUtils.readBlockState(level.holderLookup(Registries.BLOCK), cmp.getCompound(TAG_CAMO));
if (state.isAir()) {
state = null;
}
setCamoState(state);
if (level != null && level.isClientSide) {
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 0);
}

Investigating into the cause, line 115 of PlatformBlockEntity checks level != null, but the first line of the method (line 110) that is throwing this NPE calls level.holderLookup(Registries.BLOCK)

So the checking if level is null is moot