Bassebombecraft

Bassebombecraft

18.5k Downloads

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

commented

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.

  1. 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;
  1. 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);
	}
  1. ServerProyx
	@Override
	public void registerItemForRendering(Block block, String blockName)throws OperationNotSupportedException {
		throw new OperationNotSupportedException("Only invoke this method client side.");
	}
  1. 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"));
	}
commented

Closed with commit ed167b5.