Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

So I started up my Mod and I put down My Tile Entity Block, and right click it. Then the STDOUT reads

 

[WARNING] [ForgeModLoader] A mod tried to open a gui on the server without being a NetworkMod

 

Main Class:

package KitchenCraft.MainClass;

import KitchenCraft.MainClass.CounterProperties.CounterGuiHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBreakable;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.src.ModLoader;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid="GummyBah", name="GummyBear", version="1.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class Main {
public static CreativeTabs tabBlasters = new CreativeTabs("tabBlasters") {
        public ItemStack getIconItemStack() {
                return new ItemStack(Item.diamond, 1, 0);
        }
};


        // The instance of your mod that Forge uses.
        @Instance("Test")
        public static Main instance;
        // Says where the client and server 'proxy' code is loaded.
        @SidedProxy(clientSide="KitchenCraft.MainClass.client.ClientProxy", serverSide="KitchenCraft.MainClass.CommonProxy")
        public static CommonProxy proxy;
        public Block Counter = new Counter(1408);

        
        @EventHandler
        public void preInit(FMLPreInitializationEvent event) {
        	Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        	config.load();
            
        	config.save();

        	
        }
        
        @EventHandler
        public void Init(FMLInitializationEvent event) {
        	NetworkRegistry.instance().registerGuiHandler(this, new CounterGuiHandler());
        	GameRegistry.registerBlock(Counter, "Counter");
        	LanguageRegistry.addName(Counter, "Counter");
        	GameRegistry.registerTileEntity(KitchenCraft.MainClass.CounterProperties.CounterTileEnity.class, "Counter");
        	LanguageRegistry.instance().addStringLocalization("carmel", "en_US",  "Carmalizer");
        	LanguageRegistry.instance().addStringLocalization("tabBlasters", "en_US", "Gummy Mod");
            proxy.registerRenderers();
                }
        
            
        
            
        
        
        @EventHandler
        public void postInit(FMLPostInitializationEvent event) {
                // Stub Method
        }
}
            

Well.  You didn't include any of your GUI classes and you don't have a packet handler.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

I know you wont help me, so can people tell me what to do? I will update my post to have the files. But I still need Help, Like how do you do a packet handler

First of all, you need to change the serverSideRequired in the network mod annotation to be true....

If you really want help, give that modder a thank you.

 

Modders LOVE thank yous.

The instance of your mod as to be of your mod... (The instance name must be the same as the mod id)

If you really want help, give that modder a thank you.

 

Modders LOVE thank yous.

  • Author

Thank you, I don't know much about programming, I learn from tutorials. I was able to learn a bit but. Theres a ton I need to learn

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.