So when the mod has been build and is run it crashes. Crash log:
https://pastebin.com/vCXW8MR2
This is the only mod installed (I do not use oftifine which seems to be a common reason to this crash)
Here is my ColourManager class:
@EventBusSubscriber(modid = "ml")
public class ColourManager {
@SubscribeEvent
public static void registerBlockColourHandlers(final ColorHandlerEvent.Block event) {
final BlockColors blockColors = event.getBlockColors();
final IBlockColor grassColourHandler = (state, blockAccess, pos, tintIndex) -> {
if (blockAccess != null && pos != null) {
return BiomeColorHelper.getGrassColorAtPos(blockAccess, pos);
}
return ColorizerGrass.getGrassColor(0.5D, 1.0D);
};
blockColors.registerBlockColorHandler(grassColourHandler, BlockInit.blocks.get(2));
}
@SubscribeEvent
public static void registerItemColourHandlers(final ColorHandlerEvent.Item event) {
final BlockColors blockColors = event.getBlockColors();
final ItemColors itemColors = event.getItemColors();
final IItemColor itemBlockColourHandler = (stack, tintIndex) -> {
@SuppressWarnings("deprecation")
final IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
return blockColors.colorMultiplier(state, null, null, tintIndex);
};
itemColors.registerItemColorHandler(itemBlockColourHandler, BlockInit.blocks.get(2));
}
}
I really don't understand why it crashes when it doesn't when run in eclipse.