1.15.2 普通物品的模型问题,不显示材质,无法发现问题

How.050228


版本信息
你使用的系统:macOS High Sierra
你使用的JDK: 1.8.0_251
你使用的IDE:IntelliJ IDEA
你使用的IDE版本: 2020.1.1
Forge版本: 31.2.0
Minecraft版本: 1.15.2

开了一个新的项目,大部分都是照着旧的写的,但是模型一直出问题,物品名称也不能显示出来,检查了好几遍,也改掉了一个错误,但是没有效果。
望解答,谢谢

[08:40:04] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [forge] Found status: UP_TO_DATE Current: 31.2.0 Target: null
[08:40:04] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [cybercraft] Starting version check at http://myurl.me/
[08:40:04] [Forge Version Check/WARN] [ne.mi.fm.VersionChecker/]: Failed to process update information
java.io.IOException: Server returned HTTP response code: 400 for URL: http://myurl.me/
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_251] {}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_251] {}
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_251] {}
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1950) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1945) ~[?:1.8.0_251] {}
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1944) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1514) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[?:1.8.0_251] {}
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:189) ~[?:?] {re:classloading}
	at net.minecraftforge.fml.VersionChecker$1.process(VersionChecker.java:206) ~[?:?] {re:classloading}
	at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_251] {}
	at net.minecraftforge.fml.VersionChecker$1.run(VersionChecker.java:157) [?:?] {re:classloading}
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://myurl.me/
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900) ~[?:1.8.0_251] {}
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[?:1.8.0_251] {}
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_251] {}
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:173) ~[?:?] {re:classloading}
	... 3 more
[08:40:08] [Server-Worker-2/WARN] [minecraft/ModelBakery]: Unable to load model: 'modid:copper_ingot#inventory' referenced from: modid:copper_ingot#inventory: java.io.FileNotFoundException: modid:models/item/copper_ingot.json
[08:40:13] [Thread-1/DEBUG] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Config file forge-client.toml changed, sending notifies

RegistryHandler.java

package com.Project_HKL.Cyber_Craft.utility;
import com.Project_HKL.Cyber_Craft.Cyber_Craft;
import com.Project_HKL.Cyber_Craft.items.ItemBase;
import net.minecraft.item.Item;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
public class RegistryHandler
{
    public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, Cyber_Craft.MOD_ID);
    public static void init()
    {
        ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
    }
    //Items
    public static final RegistryObject<Item> COPPER_INGOT = ITEMS.register("copper_ingot", ItemBase::new);
}

ItemBase.java

package com.Project_HKL.Cyber_Craft.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
public class ItemBase extends Item
{
    public ItemBase()
    {
        super(new Item.Properties().group(ItemGroup.MATERIALS));
    }
}

en_us.json

{
  "item.cybercraft.copper_ingot": "Copper Ingot"
}

zh_cn.json

{
  "item.cybercraft.copper_ingot": "铜锭"
}

copper_ingot.json

{
  "parent": "item/generated",
  "textures": {
    "layer0": "cybercraft:items/copper_ingot"
  }
}

FledgeXu


  1. 以后请把所有的错误日志都贴上来,不要自作主张的截取日志
  2. 补充一下你的asserts文件夹展开后的截图。
  3. 看你的日志和你发的游戏截图,好像是modid不一致导致的问题,你检查一下你代码中的modid,assets文件夹下的modid为名字的文件夹,还有你各个文件里的modid,这几个modid对应不对应的上。

How.050228


(帖子被作者删除,如无标记将在 24 小时后自动删除)


How.050228


谢谢,确实是模组ID的问题


system


该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。