1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-03 15:13:07 +00:00

Better handling when a BE type isn't registered

This should never happen, but apparently it does!? We now log an error
(rather than crashing), and include the original BE (and associated
block), as the BE type isn't very useful.

See #1750. Technically this fixes it, but want to do some more poking
there first.
This commit is contained in:
Jonathan Coates
2024-03-17 16:08:31 +00:00
parent 5d8c46c7e6
commit 128ac2f109
6 changed files with 44 additions and 5 deletions

View File

@@ -360,6 +360,12 @@ public class PlatformHelperImpl implements PlatformHelper {
return key;
}
@Nullable
@Override
public ResourceLocation tryGetKey(T object) {
return registry.getKey(object);
}
@Override
public T get(ResourceLocation location) {
var object = registry.getValue(location);