Jump to content

Recommended Posts

Posted

I got this during a crash in Eclipse when I attempted to move onto the second page of tabs:

 

  Reveal hidden contents

 

 

I honestly cannot figure out how to fix it. I know it has something to do with the item on the tab label. I am using Forge

1.7.2-10.12.1.1060 if it helps. Here also is the code for my tab and every reference to it:

 

  Reveal hidden contents

 

Can anybody help me? I honestly have no idea how to fix it. I am new to Forge modding and this is my first mod, so I'm not surprised I can't fix this error.

Posted

return Item.getItemFromBlock(new EanOre(Material.rock));

You need to return a registered item or block. That new stuff isn't registered, Minecraft can't render it.

Replace with an instance you made and registered in the FMLPreInitialization event.

Posted

Thank you, but I got the same error after changing the code to an instance of EanOre. The new code is:

 

  Reveal hidden contents

 

I honestly thought that would fix it. Well, is there actually a way to fix it?

Posted

You may want to check that Eancraft.eanOre is really not null. Use a breakpoint if possible.

The creative tab also needs at least an item or block to render inside its slots.

Posted

I just ran it with a breakpoint and it is null... so how am I supposed to make it not null? BTW, it has items in it. EXAMPLE:

 

  Reveal hidden contents

 

Posted
  On 5/6/2014 at 9:23 PM, ean521 said:

I just ran it with a breakpoint and it is null... so how am I supposed to make it not null? BTW, it has items in it. EXAMPLE:

 

  Reveal hidden contents

 

 

On eaten makes.something to food? Good to know...

 

Have you already tried.to us a minecraft item or block? And could you please show me.your mainclass?

Here could be your advertisement!

Posted

My Eancraft.class is here:

 

  Reveal hidden contents

 

I can't tell why it would be null. I mean, just look at this beauty! How could it ever be null?!

Posted

Yeah, the mod ID was me forgetting to change it when I changed the MODID. The rest was me messing around to try and fix the error. It still crashes with the same error, though. D=

Posted

Okay, I found this in the console while it was starting up the client; I'm not sure why it can't read the image, though...:

 

  Reveal hidden contents

 

Posted

I can tell you how i have mine set up maby it will help.

 

Use a separate class for your tab mine looks like this:

(change TolkienTab to whatever you want your tab class to be called)

 

  Reveal hidden contents

 

And in your main class put:

private static CreativeTabs tolkienTab = new TolkienTab(CreativeTabs.getNextID(), References.MODID);

Then to add something to the tab use:

this.setCreativeTab(Tolkienaddon.getCreativeTab());

note: Tolkienaddon is the name of my main class

 

I am the author of Draconic Evolution

Posted

I've now discovered that the error is in the fact that ImageIO can't read the file. I can't see why, though. It has the correct directory and file name, so I'm not sure why it's not working.

Posted

We need the most recent version of your main class, if this isn't the one already.

If it is, the item and block initializing still needs to be put into FMLPreInit, that is how you get textures working.

Posted

 

  Reveal hidden contents

 

Posted

That seemed to be the problem... Now I'm getting a NullPointerException at

cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(/*whatever parameters are here*/)

 

It still can't read the file for some reason. I can probably fix the NullPointerException, though.

Posted
  On 5/7/2014 at 12:50 AM, ean521 said:

I just decided to use the Vanilla tabs for my items, but if you can fix this, please tell me!

 

	public static Block anvilOre = new AnvilOre(Material.rock);
public static Block eanOre = new EanOre(Material.rock);
public static CreativeTabs eancraftTab = new EancraftTabs(CreativeTabs.getNextID(), "Eancraft");

Although EanOre is defined here, it is not registered, and is exactly the same as what you had before.

 

I have no experience with creative tabs, but try this:

public static Block anvilOre;
public static Block eanOre;

 

@EventHandle
public void preInit(FMLPreInitializationEvent evt) {

        eanOre = new EanOre(Material.rock);
        GameRegistry.registerBlock(eanOre, eanOre.getUnlocalizedName().substring(5));
        eancraftTab = new EancraftTabs(CreativeTabs.getNextID(), "Eancraft");
        eanOre.setCreativeTab(eancraftTab);
        anvilOre = new AnvilOre(Material.rock);
        anvilSword = new AnvilSword();
        sushi = new Sushi();
	GameRegistry.registerBlock(anvilOre, anvilOre.getUnlocalizedName().substring(5));

	GameRegistry.registerItem(anvilSword, anvilSword.getUnlocalizedName().substring(5));
	GameRegistry.registerItem(sushi, sushi.getUnlocalizedName().substring(5));
	registerEntity(Ean.class, "ean", 5, 17);
	proxy.registerRenderers();

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm developing a Forge mod for Minecraft 1.16.5 to run on CatServer (version 1.16.5-1d8d6313, Forge 36.2.39). My mod needs to get the player's UUID from a ServerPlayerEntity object within a Forge ServerChatEvent handler. When I use serverPlayerEntity.getUUID(), my mod compiles fine, but I get a java.lang.NoSuchMethodError: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; at runtime. I cannot use serverPlayerEntity.getUniqueID() as it causes a compile error (cannot find symbol). Is there a known issue with this on CatServer, or a recommended way for a Forge mod to reliably get a player's UUID from ServerPlayerEntity in this environment? My goal is to pass this UUID to the LuckPerms API (which is running as a Bukkit plugin and successfully connected via ServicesManager). erorr ChatMod: FMLServerStartedEvent received. Attempting to initialize LuckPerms connection... [22:45:20] [Server thread/INFO]: ⚙️ Початок ініціалізації LuckPerms API через Bukkit Services Manager... [22:45:20] [Server thread/INFO]: ✅ Bukkit ServicesManager успішно отримано. [22:45:20] [Server thread/INFO]: ✅ Реєстрацію сервісу LuckPerms знайдено. [22:45:20] [Server thread/INFO]: ✅ API LuckPerms успішно отримано від Bukkit plugin! [22:45:20] [Server thread/INFO]: Використовується реалізація: me.lucko.luckperms.common.api.LuckPermsApiProvider [22:45:20] [Server thread/INFO]: ✅ LuckPerms API схоже що успішно ініціалізовано через Bukkit Services Manager. [22:45:24] [User Authenticator #1/INFO]: UUID of player Hiklee is 92cd7721-2652-3867-896b-2ceba5b99306 [22:45:25] [Server thread/INFO]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@24cb7a68 [22:45:26] [Server thread/INFO]: Hiklee[/127.0.0.1:41122] logged in with entity id 210 at (92.23203876864889, 95.6183020148442, 68.24087802017877) [22:45:28] [Async Chat Thread - #0/INFO]: ✅ Скасовано стандартне відправлення чату! [22:45:28] [Async Chat Thread - #0/ERROR]: Exception caught during firing event: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; Index: 1 Listeners: 0: NORMAL 1: ASM: class com.example.chatmod.ChatEventHandler onPlayerChat(Lnet/minecraftforge/event/ServerChatEvent;)V java.lang.NoSuchMethodError: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; at com.example.chatmod.ChatPacketHandler.getPlayerPrefix(ChatPacketHandler.java:46) at com.example.chatmod.ChatEventHandler.onPlayerChat(ChatEventHandler.java:32) at net.minecraftforge.eventbus.ASMEventHandler_1_ChatEventHandler_onPlayerChat_ServerChatEvent.invoke(.dynamic) at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:303) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) at net.minecraftforge.common.ForgeHooks.onServerChatEvent(ForgeHooks.java:493) at net.minecraft.network.play.ServerPlayNetHandler.chat(ServerPlayNetHandler.java:1717) at net.minecraft.network.play.ServerPlayNetHandler.func_244548_c(ServerPlayNetHandler.java:1666) at net.minecraft.network.play.ServerPlayNetHandler.func_147354_a(ServerPlayNetHandler.java:1605) at net.minecraft.network.play.client.CChatMessagePacket.lambda$handle$0(CChatMessagePacket.java:34) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750
    • Thank you so much for your help, I'll try it as soon as I can. I have a genuine question because I'm not familiar with the matter: Can a recipe error cause something as serious as the AMD error?
    • When i try to launch my modpack, the instance crashes and this is sent to the logs: Time: 2025-05-27 23:07:18 Description: Rendering overlay Below is the full log: https://mclo.gs/jP5G2EH
    • Make a test without delightful
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.