1.14.3 build fails with error: The method register(Item, ModelResourceLocation) in the type ItemModelMesher is not applicable for the arguments (...)
Closed this issue ยท 1 comments
The method register(Item, ModelResourceLocation) in the type ItemModelMesher is not applicable for the arguments (Item, int, ModelResourceLocation)
/bassebombecraft-1.8/src/main/java/bassebombecraft/proxy/ClientProxy.java
Solution:
Disable 1.12 rendering code.
- Proxy
/**
* Register block for rendering (at client side).
*
* @param block block to be registered.
* @param blockName block name.
*
* @throws OperationNotSupportedException if operation isn't supported.
*/
public void registerItemForRendering(Block block, String blockName) throws OperationNotSupportedException;
- ClientProxy
@Override
public void registerItemForRendering(Block block, String blockName) {
ItemModelMesher mesher = Minecraft.getInstance().getRenderItem().getItemModelMesher();
ModelResourceLocation location = new ModelResourceLocation(MODID + ":" + blockName, "inventory");
mesher.register(Item.getItemFromBlock(block), META, location);
}
- ServerProyx
@Override
public void registerItemForRendering(Block block, String blockName)throws OperationNotSupportedException {
throw new OperationNotSupportedException("Only invoke this method client side.");
}
- ItemRegistryEventHandler
/**
* Register model for item.
*
* @param item for which the model is registered.
*/
static void registerModel(Item item) {
ModelLoader.setCustomModelResourceLocation(item, 0,
new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
Closed with commit ed167b5.