yours
public static Configuration config1= new Configuration();
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Configuration config1= new Configuration(event.getSuggestedConfigurationFile());
}
mine
public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
config = new Configuration(event.getSuggestedConfigurationFile());
}
spot the difference
public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
config = new Configuration(event.getSuggestedConfigurationFile());
}
is this what you want
https://github.com/loordgek/Extragenarators/blob/b36b1fc927c7f3933a2765b30cb102419cea45d7/src/main/java/loordgek/extragenarators/util/item/InventoryUtil.java
you need to update it to your needs
you dont need the facing
@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
this.markDirty();
return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(inputSlot);
}
return super.getCapability(capability, facing);
}