Skip to content

Commit

Permalink
Try to fix #547 - four way mod incompatibility with Quilt, Sodium and…
Browse files Browse the repository at this point in the history
… ViaFabricPlus.
  • Loading branch information
Earthcomputer committed Oct 5, 2023
1 parent df6bee3 commit eae83ae
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ private Object getVersionEnum() throws ReflectiveOperationException {
public boolean doesItemExist(Item item) {
try {
Object instance = itemReleaseVersionMappingsInstance.get(null);
if (instance == null) {
// Quilt initializes commands on startup, allowing this to be called outside a world
return true;
}
return (Boolean) itemReleaseVersionMappingsContains.invoke(instance, item, getVersionEnum());
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit eae83ae

Please sign in to comment.