Jump to content

(Unsolved) 1.11.2 Forge/Eclipse Help!


OSoHexxy

Recommended Posts

Hello everyone,

I am brand new to using Java and I am trying to learn Java from learning how to create mods with it.  When I tried to run the game with my mod I got a message that said "Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release" 

 

(guns is a placeholder name.  I am not sure if that's what the mod will be yet I just want to get it running)

This is what the report of the crash says:

Details:

---- Minecraft Crash Report ----
// Why is it breaking :(

Time: 10/5/17 4:22 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from gunsmod (ogm)
Caused by: net.minecraftforge.fml.common.LoaderException: net.minecraftforge.fml.common.LoaderException: Attempted to load a proxy type com.o_so_hexxy.guns.proxy.ClientProxy into com.o_so_hexxy.guns.guns.proxy, but the types don't match
    at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102)
    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:626)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:582)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:233)
    at net.minecraft.client.Minecraft.init(Minecraft.java:478)
    at net.minecraft.client.Minecraft.run(Minecraft.java:387)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)
Caused by: net.minecraftforge.fml.common.LoaderException: Attempted to load a proxy type com.o_so_hexxy.guns.proxy.ClientProxy into com.o_so_hexxy.guns.guns.proxy, but the types don't match
    at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:95)
    ... 39 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.11.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_144, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 899829152 bytes (858 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.38 Powered by Forge 13.20.1.2506 6 mods loaded, 6 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UC    minecraft{1.11.2} [Minecraft] (minecraft.jar)
    UC    mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UC    FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11.2-13.20.1.2506.jar)
    UC    forge{13.20.1.2506} [Minecraft Forge] (forgeSrc-1.11.2-13.20.1.2506.jar)
    UC    examplemod{1.0} [examplemod] (bin)
    UE    ogm{0.1} [gunsmod] (bin)
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.05' Renderer: 'GeForce GTX 950/PCIe/SSE2'

 

 

 

 

If there is any other information that you need in order to help me let me know.  I have never done this before so as many details as possible would be greatly appreciated!

Edited by OSoHexxy
Link to comment
Share on other sites

Quote

Attempted to load a proxy type com.o_so_hexxy.guns.proxy.ClientProxy into com.o_so_hexxy.guns.guns.proxy, but the types don't match

 

Show your main mod class.

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

package com.o_so_hexxy.guns;

import com.o_so_hexxy.guns.proxy.CommonProxy;

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 = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION, acceptedMinecraftVersions = Reference.ACCEPTED_VERSIONS)
public class guns {

    @Instance
    public static guns instance;
    
    @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
    public static CommonProxy proxy;
    
    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        
    }
    
    @EventHandler
    public void Init(FMLInitializationEvent event)
    {
        
    }
    
    @EventHandler
    public void PostInit(FMLPostInitializationEvent event)
    {
        
    }
}

 

Link to comment
Share on other sites

Fucking hell, I hate some of the tutorials out there.

I also need your Reference class, and while you're at it, the common and client proxy classes.

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

You have 10k posts so obviously you must have plenty of experience.  If there are any specific tutorials or guides that you think are really good let me know and ill be sure to take a look at them.  I don't want to learn how to do this badly. 

 

REFERENCE CLASS:

=======================================

package com.o_so_hexxy.guns;

public class Reference {
    public static final String MOD_ID = "ogm";
    public static final String NAME = "GunMod";
    public static final String VERSION = "0.1";
    public static final String ACCEPTED_VERSIONS = "1.11.2";
    
    public static final String CLIENT_PROXY_CLASS = "com.o_so_hexxy.guns.proxy.ClientProxy";
    public static final String SERVER_PROXY_CLASS = "com.o_so_hexxy.guns.proxy.ServerProxy";
}


=======================================

 

 

COMMON PROXY CLASS:

=======================================

package com.o_so_hexxy.guns.proxy;

public interface CommonProxy {

}

=======================================

 

 

 

CLIENT PROXY CLASS:

=======================================

package com.o_so_hexxy.guns.proxy;

public class ClientProxy {

}

=======================================

 

 

Thank you for your help!

 

C

 

Link to comment
Share on other sites

Your client proxy class and your common proxy interface aren't...related to each other.

 

If I did this:

interface Cat {
}

class Banana {
}

It would be the same: you can't assign an object of type Banana to a field of type Cat

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

15 hours ago, OSoHexxy said:

public class ClientProxy {

}

Your ClientProxy class is not related to anything. This suggests that you're not just new to Java, but you're new to object-oriented programming. First, you need to go find tutorials on O-O programming and Java before this forum can help you. Second, you need to build a cache of bookmarks to useful Java references / forums. Learn to go to those for fundamental Java questions before coming here with more advanced questions peculiar to Forge hooks, mod structure etc.

 

PS: Another good way to learn is to explore the Minecraft source code itself. When planning a mod, try to see how vanilla Minecraft does things before asking. And if you don't know how to use Eclipse to do that, then there is an Eclipse site out there to help you learn that tool of the trade.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Oso,

 

I agree that you will need some basic java in order to move forward. Too many other issues with coding the forge mods if you don't have a basic understanding of java.  However, if you know how to use github, there are a lot of good examples, tutorials to help you get started.  The proxy issue is there because there are things you want to execute on the server only, client only, or both and setting up the common/client proxy allows you do this easier. This is done by the client proxy extending the common one.

 

Check out.... lots of starting examples where you can clone the repository, get it to compile/run, then start tweaking.  When the examples are too large to start with, it can be difficult to follow everything, greyghost has some nice simple ones to help get you started.

https://github.com/TheGreyGhost/MinecraftByExample

 

Good luck,

 

p.s. vanilla code is very helpful when trying to figure out stuff. Assuming you've done the gradlew setupDecompWorkspace and eclipse (see readme file from forge download)...should be under you project reference libraries under the forge version.

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.