Jump to content

@SidedProxy is dissalowed for this location


clowcadia

Recommended Posts

So following a 1.11 forge tutorial and i ran into this

package com.blank.tutorial;
import java.util.Random;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = Tutorial.MOD_ID, name = Tutorial.MOD_NAME, version = Tutorial.VERSION, dependencies = Tutorial.DEPENDENCIES)
public class Tutorial {
	
	public static final String MOD_ID = "tutorial_mod";
	public static final String MOD_NAME = "Tutorial Mod";
	public static final String VERSION = "@Version";
	public static final String DEPENDENCIES = "required-afterforge@[13.19.1.2188,)";
	public static final String RESOURCE_PREFIX = MOD_ID.toLowerCase()+":";
	
	public static Random random = new Random();
	
	@Instance(MOD_ID)
	public static Tutorial instance;
	
	@SidedProxy(clientSide = "com.blank.tutorial.ClientProxy", serverSide = "com.blank.tutorial.CommonProxy")
	public static CommonProxy.proxy;
	
	@EventHandler
    public void PreLoad(FMLPreInitializationEvent PreEvent)
    {
    	proxy.PreLoad();
    }
    
    @EventHandler
    public void load(FMLInitializationEvent event)
    {
    	proxy.load();
    	
    }
    
    @EventHandler
    public void PostLoad(FMLPostInitializationEvent PostEvent)
    {
    	proxy.PostLoad();
    }
}

 

common proxy.png

Link to comment
Share on other sites

Because this:

public static CommonProxy.proxy;

Is not a proper field declaration.

public - good

static - good

CompnProxy.proxy - static reference to a field in another class, BAD

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.

Link to comment
Share on other sites

Try using your brain next time. And your awesome skills you have with Java.

(Hint hint: learn Java first)

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.

Link to comment
Share on other sites

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.