Jump to content

Recommended Posts

Posted

Anybody know what this error means?

 

 

 

2012-09-13 19:16:28 [iNFO] [sTDERR] java.lang.RuntimeException: class com.drin.mods.enigma.TileEntityCombiner is missing a mapping! This is a bug!
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at aji.b(TileEntity.java:88)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at com.drin.mods.enigma.TileEntityCombiner.b(TileEntityCombiner.java:114)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at wy.a(AnvilChunkLoader.java:276)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at wy.a(AnvilChunkLoader.java:114)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at gq.b(ChunkProviderServer.java:192)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at gq.a(ChunkProviderServer.java:245)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at gr.a(WorldServer.java:728)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:338)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:553)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at axv.p(IntegratedServer.java:105)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453)
2012-09-13 19:16:28 [iNFO] [sTDERR] 	at ep.run(SourceFile:539)

 

 

Right out of my stack trace. This occasionally happens when I click my TileEntity blocks repeatedly. Also, I am getting this error too:

 

2012-09-13 19:16:27 [WARNING] [ForgeModLoader] A mod tried to open a gui on the server without being a NetworkMod

 

And can't get the GUI to open on that block.

 

Here's the code for my main mod file:

 

 

package com.drin.mods.enigma;

import net.minecraft.src.Block;
import net.minecraftforge.client.MinecraftForgeClient;

import com.drin.mods.ClientPacketHandler;
import com.drin.mods.CommonProxy;
import com.drin.mods.ServerPacketHandler;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid="mod_Enigmacraft", name="EnigmaCraft", version="0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false,
clientPacketHandlerSpec = 
@SidedPacketHandler(channels = {"EnigmaCraft"}, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec =
@SidedPacketHandler(channels = {"EnigmaCraft"}, packetHandler = ServerPacketHandler.class))
public class EnigmaCraft {

public static Block blockCombiner = new BlockCombiner(201);

@Instance("EnigmaCraft")
public static EnigmaCraft instance;

@SidedProxy(clientSide="com.drin.mods.client.ClientProxy", serverSide="com.drin.mods.CommonProxy")
public static CommonProxy proxy;

@PreInit
public void preInit(FMLPreInitializationEvent event) {
	//
}

@Init
public void init(FMLInitializationEvent event) {
	GameRegistry.registerBlock(blockCombiner);

	LanguageRegistry.addName(blockCombiner, "Combiner");

	NetworkRegistry.instance().registerGuiHandler(instance, proxy);

	MinecraftForgeClient.preloadTexture("/com/drin/mods/gfx/terrain.png");
}

@PostInit
public void postInit(FMLPostInitializationEvent event) {
	//
}
}

 

 

Posted

As for the opening gui error its cuz you're not passing in a proper network mod instance, you get it in the instance field.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Register your tile entity!!

 

It's actually right here in my CommonProxy.java:

 

 

public class CommonProxy implements IGuiHandler {

@Init
public void register() {
	GameRegistry.registerTileEntity(TileEntityCombiner.class, "tileEntityCombiner");
}
... blah blah blah
}

 

 

 

As for the opening gui error its cuz you're not passing in a proper network mod instance, you get it in the instance field.

 

Is it supposed to be the modid? Or the name of the class?

 

Got it.

Posted

Where do you call your register() method in your mod file?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

@Init works only for methods in classes which have the @Mod annotation (and an @Instance object) ;)

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Gotcha. It all works good now :) I am having a goofy thing where the text color changes when I pick up certain items in my clickbar, but I guess that happens in Vanilla too (bug?), so whatever :P

Posted

I'm having the same issue with the GUI NetworkMod thing, and despite reading this thread several times over, I can't figure out exactly how it got fixed.

 

I have @NetworkMod:

 

@NetworkMod(channels = {"AgricraftureCore"}, packetHandler = PacketHandlerCore.class, clientSideRequired = true, serverSideRequired = false)

public class AgricraftureMain

 

I have the instance lines all set out:

 

@Instance("Agricrafture")

public static AgricraftureMain instance;

 

and inside the @Init function:

 

NetworkRegistry.instance().registerGuiHandler(instance, new CulinaryGuiHandler());

 

so what am I missing/doing wrong here?

 

 

EDIT: I bet I have to manually put in "instance = this;" don't I? *facepalm*

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



×
×
  • Create New...

Important Information

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