Java (1.9)Minecraft纹理例外

Java (1.9)Minecraft纹理例外,java,json,minecraft,Java,Json,Minecraft,我是一个模组初学者,我所有的纹理都是粉黑色的。 我不知道我做错了什么。 当我运行我的minecraft mod时,我总是出现以下错误: Exception loading model for variant spmmod:sulfur_ore_nether#inventory for item spmmod:sulfur_ore_nether java.lang.Exception: Could not load item model either from the normal locatio

我是一个模组初学者,我所有的纹理都是粉黑色的。 我不知道我做错了什么。 当我运行我的minecraft mod时,我总是出现以下错误:

Exception loading model for variant spmmod:sulfur_ore_nether#inventory for item spmmod:sulfur_ore_nether
java.lang.Exception: Could not load item model either from the normal location spmmod:item/sulfur_ore_nether or from the blockstate
spmmod.java:

package com.spmmod;
import com.spmmod.blocks.CustomBlock;
com.spmmod.items.CustomItem;
import com.spmmod.lib.ProxyCommon;
import com.spmmod.lib.References;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
@Mod(modid = References.MODID, name=References.NAME, version = References.Version)
public class spmmod
{
    @SidedProxy(clientSide = References.ProxyClient, serverSide = References.ProxyCommon)
    public static ProxyCommon proxy;

    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        System.out.println("WILL REGISTER RENDERS");
        proxy.RegisterRenders();
        System.out.println("DID REGISTER RENDERS");
    }

    //Blocks

    public static CustomBlock sulfur_ore_nether;



    public spmmod()
    {
        this.sulfur_ore_nether = new CustomBlock(Material.rock, "sulfur_ore_nether", 0.4F, 0.5F, CustomBlock.HarvestToolEnum.PICKAXE, CustomBlock.HarvestLevelEnum.WOOD, CreativeTabs.tabBlock, 1, 6, 100, 10, 0, 300, new Block[]{Blocks.netherrack}, new Block[]{Blocks.lava}, 1, false, true, false);
    }
}
}

ProxyClient.java:

package com.spmmod.lib;

import com.spmmod.spmmod;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;

public class ProxyClient extends ProxyCommon
{
    @Override
    public void RegisterRenders()
    {
        spmmod.sulfur_ore_nether.RegisterRender("sulfur_ore_nether");
    }
}
models/block/sulfur\u ore\u nether.json:

{
    "parent": "block/cube_all",
    "textures": {
        "all": "spmmod:blocks/sulfur_ore_nether"
    }
}
{
    "parent": "spmmod:block/sulfur_ore_nether",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}
models/item/sulfur\u ore\u nether.json:

{
    "parent": "block/cube_all",
    "textures": {
        "all": "spmmod:blocks/sulfur_ore_nether"
    }
}
{
    "parent": "spmmod:block/sulfur_ore_nether",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}
区块状态/硫矿石:

{
    "variants": {
        "normal": { "model": "spmmod:sulfur_ore_nether" }
    }
}

我做错的是,我在TextEdit中编辑了JSON文件,并将“smart quotes”设置为on。智能报价与普通报价不同。当我关闭smart quotes时,一切正常。

我做错的是,我在TextEdit中编辑JSON文件,并将“smart quotes”设置为on。智能报价与普通报价不同。当我关闭智能报价时,一切正常。

我不完全确定,但可能
spmmod.sulfur\u ore\u nether.RegisterRender(“sulfur\u ore\u nether”)应为
spmmod.sulfur\u ore\u nether.RegisterRender(“spmmod:sulfur\u ore\u nether”)?在sulfur_ore_nether.java中,在函数RegisterRender(字符串名称)中:
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this),0,new ModelResourceLocation(“spmmod:+name,“inventory”)我不完全确定,但可能
spmmod.sulfur\u ore\u nether.RegisterRender(“sulfur\u ore\u nether”)应为
spmmod.sulfur\u ore\u nether.RegisterRender(“spmmod:sulfur\u ore\u nether”)?在sulfur_ore_nether.java中,在函数RegisterRender(字符串名称)中:
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this),0,new ModelResourceLocation(“spmmod:+name,“inventory”)