Conflicts with AllStackable
KrisCris opened this issue ยท 2 comments
A player used these two mods together and the game crashed.
java.lang.IllegalAccessError: Update to non-static final field net.minecraft.class_1792.field_18672 attempted from a different method (setFoodComponent) than the initializer method <init>
.
AllStackable adds a new field to Item.class
and injected a piece of code into Item<init>
to initialize it.
@Override
public void setVanillaMaxCount(int vanillaMaxCount) {
this.vanillaMaxCount = vanillaMaxCount;
}
@Inject(method = "<init>", at = @At("RETURN"))
private void setVanillaMaxCount(Item.Settings settings, CallbackInfo ci) {
setVanillaMaxCount(this.maxCount);
}
LatoOrigins modifies foodComponent
using an accessor during the item registering, which is after the first value assignment.
I don't know why these would ever conflict.
This has been fixed with 6bcd5a4