Jump to content

Recommended Posts

Posted

Hello,

I have a big problem with proxies.

Here's my setup:

Spoiler

CommonProxy:

package saintofblood.artefakt.proxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

public class Commonproxy {

    public void preInit(FMLPreInitializationEvent e) {

    }

    public void init(FMLInitializationEvent e) {

    }

    public void postInit(FMLPostInitializationEvent e) {

    }
}
ServerProxy:

package saintofblood.artefakt.proxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

//Press Ctrl+Shift+O in Eclipse for the imports.

public class Serverproxy extends Commonproxy {

    @Override
    public void preInit(FMLPreInitializationEvent e) {
        super.preInit(e);
    }

    @Override
    public void init(FMLInitializationEvent e) {
        super.init(e);
    }

    @Override
    public void postInit(FMLPostInitializationEvent e) {
        super.postInit(e);
    }
}

ClientProxy:

package saintofblood.artefakt.proxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

//Press Ctrl+Shift+O in Eclipse for the imports.

public class Clientproxy extends Commonproxy {

    @Override
    public void preInit(FMLPreInitializationEvent e) {
        super.preInit(e);
    }

    @Override
    public void init(FMLInitializationEvent e) {
        super.init(e);
    }

    @Override
    public void postInit(FMLPostInitializationEvent e) {
        super.postInit(e);
    }
}

Main class:

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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.registry.GameRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.MinecraftForge;
import saintofblood.artefakt.proxy.Serverproxy;
import saintofblood.artefakt.proxy.Commonproxy;
import saintofblood.artefakt.proxy.Clientproxy;

@Mod(modid = "artefakt", name = "Artefakty", version = "0.1")
 
public class Artefakt {
@SidedProxy(clientSide = "com.saintofblood.artefakt.proxy.Clientproxy", serverSide = "com.saintofblood.artefakt.proxy.Serverproxy") 
    public static Commonproxy proxy;

@EventHandler
    public void preInit(FMLPreInitializationEvent e)
    {
        this.proxy.preInit(e);

        System.out.println(blockArtefaktowEnergetycznych.getUnlocalizedName().substring(5));
    }
    @EventHandler
    public void init(FMLInitializationEvent e)
    {
        this.proxy.init(e);
        //Gui TileEntity //
    }
    @EventHandler
    public void postInit(FMLPostInitializationEvent e)
    {
        this.proxy.postInit(e);
                //Inne mody ? //
    }
        

Crash report:

Spoiler

---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 21.03.17 12:41
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: com.saintofblood.artefakt.proxy.Clientproxy
    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76)
    at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512)
    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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
    at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    at net.minecraft.client.main.Main.main(Main.java:164)
    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 net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.saintofblood.artefakt.proxy.Clientproxy
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59)
    ... 35 more
Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    ... 41 more


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

-- System Details --
Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 613773192 bytes (585 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UC    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UC    FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UC    Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UE    artefakt{0.1} [Artefakty] (bin) 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 376.53' Renderer: 'GeForce GTX 970/PCIe/SSE2'

Can someone tell me what is wrong?

Posted

First, 1.7.10 is no longer supported here.

 

Second, you got the package name on your proxy in the @SidedProxy wrong, you added "com." at the beginning, but that is not there in the actual package name.

  • Like 1
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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