无法在forge中制作项目

anauzrmj  于 2021-06-30  发布在  Java
关注(0)|答案(0)|浏览(251)

我不能在锻造厂做东西。这是一个错误,但我不知道是什么。我在minecraft 1.16.4上运行,并使用intellij。我想这是关于registryhandler.java行的事情:20。
链接到项目:https://www.dropbox.com/s/aqqb7ba6pmpyjxg/dkv_elias.zip?dl=0
registryhandler.java文件

package com.elias.DKV.utl;

import com.elias.DKV.DKVMod;
import com.elias.DKV.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 = DeferredRegister.create(ForgeRegistries.ITEMS, DKVMod.MOD_ID);

    public static void init() {
        ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
    }

    // Items
    public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);
}

dkvmod.java文件

package com.elias.DKV;

import com.elias.DKV.utl.RegistryHandler;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.InterModComms;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.stream.Collectors;

// The value here should match an entry in the META-INF/mods.toml file
@Mod("dkv")
public class DKVMod
{
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "dkv";

    public DKVMod() {
        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        RegistryHandler.init();

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event)
    {
    }

    private void doClientStuff(final FMLClientSetupEvent event) {
    }
}

Ruby.json

{
  "parent": "item/generated",
  "textures": {
    "layer0": "dkv:items/ruby"
  }
}

项目库.java

package com.elias.DKV.items;

import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class ItemBase extends Item {
    public ItemBase() {
        super(new Item.Properties().group(ItemGroup.COMBAT));
    }
}

en_us.json文件

{
  "item.dkv.ruby": "Ruby"
}

模式toml

modLoader="javafml" #mandatory
loaderVersion="[35,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
license="All rights reserved"
issueTrackerURL="http://my.issue.tracker/" #optional
[[mods]] #mandatory
modId="dkv" #mandatory
version="${file.jarVersion}" #mandatory
displayName="DKV Mod" #mandatory
updateJSONURL="http://myurl.me/" #optional
displayURL="http://example.com/" #optional
logoFile="examplemod.png" #optional
credits="Thanks to Alexander for helping me" #optional
authors="EllePro" #optional
description='''A Cursed Combat Pack'''

# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.

[[dependencies.examplemod]] #optional
    # the modid of the dependency
    modId="forge" #mandatory
    # Does this dependency have to exist - if not, ordering below must be specified
    mandatory=true #mandatory
    # The version range of the dependency
    versionRange="[35,)" #mandatory
    # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
    ordering="NONE"
    # Side this dependency is applied on - BOTH, CLIENT or SERVER
    side="BOTH"

# Here's another dependency

[[dependencies.examplemod]]
    modId="minecraft"
    mandatory=true

# This version range declares a minimum of the current minecraft version up to but not including the next major version

    versionRange="[1.16.4,1.17)"
    ordering="NONE"
    side="BOTH"

错误:
----雷击机坠毁报告----//你太刻薄了。
时间:2020-12-19 17:25描述:渲染覆盖
net.minecraft.util.resourcelocationexception:位置的命名空间中有非[a-z0-9.-]字符:dkvmod:sounds.json at net.minecraft.util.resourcelocation.(资源位置。java:31)~[forge:?]{re:classloading}位于net.minecraft.util.resourcelocation.(resourcelocation)。java:42)~[forge:?]{re:classloading}在net.minecraft.client.audio.soundhandler.prepare(soundhandler。java:59)~[forge:?]{re:classloading,pl:runtimedistcleaner:a}在net.minecraft.client.audio.soundhandler.prepare(soundhandler。java:34)~[forge:?]{re:类加载,pl:运行时DIstcleaner:a}位于net.minecraft.client.resources.reloadlistener.lambda$reload$0(reloadlistener)。java:12)~[forge:?]{re:classloading}位于java.util.concurrent.completablefuture$asyncsupply.run(completablefuture)。java:1604)~[?:1.8.0ē]{}位于java.util.concurrent.completablefuture$asyncsupply.exec(completablefuture)。java:1596) ~[?:1.8.0ē]{}位于java.util.concurrent.forkjointask.doexec(forkjointask)。java:289)~[?:1.8.0ē]{}位于java.util.concurrent.forkjoinpool$workqueue.runtask(forkjoinpool)。java:1056)~[?:1.8.0275]{}位于java.util.concurrent.forkjoinpool.runworker(forkjoinpool)。java:1692)~[?:1.8.0275]{}在java.util.concurrent.forkjoinworkerthread.run(forkjoinworkerthread。java:175) ~[?:1.8.0_275] {}

错误、代码路径和所有已知详细信息的详细演练如下:

--head--thread:render thread stacktrace:at net.minecraft.client.renderer.gamerenderer.updatecameraandrender(游戏渲染器)。java:495)~[forge:?]{re:classloading,pl:accesstransformer:b,pl:运行时DIstcleaner:a}--覆盖渲染详细信息--详细信息:覆盖名称:net.minecraft.client.gui.resourceloadprogressgui stacktrace:at net.minecraft.client.renderer.gamerenderer.updatecameraandrender(gamerenderer)。java:495)~[forge-1.16.4-35.1.4\uMap的\u快照\u 20201028-1.16.3-recomp.jar:?]{re:classloading,pl:accesstransformer:b,pl:运行时DIstcleaner:a}在net.minecraft.client.minecraft.rungameloop(minecraft。java:1002)~[forge-1.16.4-35.1.4\uMap的\u快照\u 20201028-1.16.3-recomp.jar:?]{re:classloading,pl:accesstransformer:b,pl:运行时DIstcleaner:a}在net.minecraft.client.minecraft.run(minecraft。java:612)~[forge-1.16.4-35.1.4\uMap的\u快照\u 20201028-1.16.3-recomp.jar:?]{re:classloading,pl:accesstransformer:b,pl:运行时DIstcleaner:a}在net.minecraft.client.main.main.main(main。java:184)~[forge-1.16.4-35.1.4\u mapped\u snapshot\u 20201028-1.16.3-recomp.jar:?]{re:classloading,pl:运行时DIstcleaner:a}在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)~[?:1.8.0\u 275]{}在sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62)~[?:1.8.0275]{}在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)~[?:1.8.0275]{}在java.lang.reflect.method.invoke(方法。java:498)~[?:1.8.0275]{}位于net.minecraftforge.userdev.fmluserdevclientlaunchprovider.lambda$launchservice$0(fmluserdevclientlaunchprovider)。java:52)~[forge-1.16.4-35.1.4\u mapped\u snapshot\u 20201028-1.16.3-recomp.jar:?]{}位于cpw.mods.modlauncher.launchservicehandlerdecorator.launch(launchservicehandlerdecorator。java:37)[modlauncher-8.0.6.jar:?]{}位于cpw.mods.modlauncher.launchservicehandler.launch(launchservicehandler)。java:54)[modlauncher-8.0.6.jar:?]{}位于cpw.mods.modlauncher.launchservicehandler.launch(launchservicehandler)。java:72)[modlauncher-8.0.6.jar:?]{}在cpw.mods.modlauncher.launcher.run(launcher。java:82)[modlauncher-8.0.6.jar:?]{}位于cpw.mods.modlauncher.launcher.main(launcher。java:66)[modlauncher-8.0.6.jar:?]{}位于net.minecraftforge.userdev.launchtesting.main(launchtesting)。java:105)[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?]{}
--系统详细信息--详细信息:minecraft版本:1.16.4 minecraft版本id:1.16.4操作系统:linux(amd64)版本5.4.0-56-通用java版本:1.8.0ē,amazon.com inc.java虚拟机版本:openjdk 64位服务器虚拟机(混合模式),amazon.com公司内存:203839152字节(194 mb)/899153920字节(857 mb)到1830813696字节(1746 mb)CPU:8个jvm标志:总共0个;modlauncher:8.0.6+85+master.325de55 modlauncher启动目标:fmluserdevclient modlauncher命名:mcp modlauncher服务:/mixin-0.8.2.jar mixin pluginservice/eventbus-3.0.5-service.jar eventbus pluginservice/forge-1.16.4-35.1.4\uMap的\u快照\u 20201028-1.16.3-launcher.jar对象\u holder\u定义pluginservice/forge-1.16.4-35.1.4\u mapped\u snapshot\u 20201028-1.16.3-launcher.jar runtime\u enum\u extender pluginservice/accesstransformers-2.2.0-shadowed.jar accesstransformer pluginservice/forge-1.16.4-35.1.4\u mapped\u snapshot\u 20201028-1.16.3-launcher.jar功能\u inject\u definalize pluginservice/forge-1.16.4-35.1.4\u mapped\u snapshot\u 20201028-1.16.3-launcher.jarruntimedistcleaner插件服务/mixin-0.8.2.jar mixin转换服务/forge-1.16.4-35.1.4\uMap\u快照\u 20201028-1.16.3-launcher.jar fml转换服务fml:35.1 forge:net.minecraftforge:35.1.4 fml 语言提供者:javafml@35.1 minecraft@1 mod list:client-extra.jar | minecraft | minecraft | 1.16.4|Sidesidededesiside侧的美国赛图124;a1:a1:d4:d4:5e:5e:04:4f:d3:d6:d6:d6:d6:7b:37:97:cf:77:b0:de:ad:广告:4a:47:ce:8c:96:49:0F:a1:a1:a1:a1:a1:d4:d4:d4:d4:04:d4:d3:d6:d6:d6:d6:d6:d6:7:37:37:37:97:cf:cf:77:77:b0:00:77:77:77:b0:广告:广告:广告:广告:广告:广告:广告:广告:4a:4a:4a:47:广告:广告:广告:广告:广告:4a:4a:47:广告:广告:广告:广告:4a:4a:4a:47:47:ce:8c:8c:8c:8c:D500E4-0add-46af-8336-0d79a91b5dd0发布版本:mod\u dev backend库:lwjgl版本3.2.2 build 10后端api:geforce gtx 660m/pcie/sse2 gl版本4.6.0 nvidia 450.80.02,nvidia corporation gl caps:使用帧缓冲区使用opengl 3.0使用vbos:是修改:明确;客户品牌更改为“forge”类型:客户机(map\u client.txt)图形模式:高级资源包:当前语言:英语(us)cpu:8x intel(r)core(tm)i7-3630qm cpu@2.40ghz

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题