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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user