Jump to content
  • 0

[[3.1.3]] IC2 AdvancedMachines Errors & fixes [FIXED! DL HERE!!!]


Question

Posted

Title: [[3.1.3]] IC2 Advanced Errors & fixes (I patched)

Version: 3.1.2

OS: linux

Java Version: 1.7

Description of Problem:

There are various errors which I need to fix, this is one of the error logs for IC2 for advanced machines. I will patch them manually if need be and upload it.

Error Messages:

These errors are after I patched the TileEntity. Most of the problems are because of Advanced machines not being updated to the IC2 API.

Error Log:


[13:45:10] java.lang.RuntimeException: java.lang.NoSuchMethodException: ic2.platform.NetworkManager.announceBlockUpdate(net.minecraft.server.WorldChunkManager, int, int, int)

[13:45:10] at ic2.api.NetworkHelper.announceBlockUpdate(NetworkHelper.java:92)

[13:45:10] at ic2.advancedmachines.TileEntityBlock.q_(TileEntityBlock.java:60)

[13:45:10] at ic2.advancedmachines.TileEntityMachine.q_(TileEntityMachine.java:152)

[13:45:10] at ic2.advancedmachines.TileEntityBaseMachine.q_(TileEntityBaseMachine.java:56)

[13:45:10] at ic2.advancedmachines.TileEntityAdvancedMachine.q_(TileEntityAdvancedMachine.java:93)

[13:45:10] at net.minecraft.server.World.tickEntities(World.java:1190)

[13:45:10] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:569)

[13:45:10] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467)

[13:45:10] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)

[13:45:10] Caused by: java.lang.NoSuchMethodException: ic2.platform.NetworkManager.announceBlockUpdate(net.minecraft.server.WorldChunkManager, int, int, int)

[13:45:10] at java.lang.Class.getMethod(Unknown Source)

[13:45:10] at ic2.api.NetworkHelper.announceBlockUpdate(NetworkHelper.java:83)

[13:45:10] ... 8 more

[13:45:10] Unexpected exception

[13:49:15] java.lang.Exception

[13:49:15] at net.minecraft.server.Chunk.a(Chunk.java:675)

[13:49:15] at net.minecraft.server.Chunk.a(Chunk.java:649)

[13:49:15] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:297)

[13:49:15] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:65)

[13:49:15] at net.minecraft.server.ChunkRegionLoader.a(ChunkRegionLoader.java:54)

[13:49:15] at net.minecraft.server.ChunkProviderServer.loadChunk(ChunkProviderServer.java:143)

[13:49:15] at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:86)

[13:49:15] at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)

[13:49:15] at forge.PacketHandlerServer.finishLogin(PacketHandlerServer.java:169)

[13:49:15] at forge.PacketHandlerServer.onModListResponse(PacketHandlerServer.java:108)

[13:49:15] at forge.PacketHandlerServer.onPacketData(PacketHandlerServer.java:42)

[13:49:15] at forge.MessageManager.dispatchIncomingMessage(MessageManager.java:419)

[13:49:15] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1361)

[13:49:15] at net.minecraft.server.Packet250CustomPayload.handle(SourceFile:46)

[13:49:15] at net.minecraft.server.NetworkManager.b(NetworkManager.java:234)

[13:49:15] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:119)

[13:49:15] at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:83)

[13:49:15] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:579)

[13:49:15] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467)

[13:49:15] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)

[13:49:17] java.lang.RuntimeException: java.lang.NoSuchMethodException: ic2.platform.NetworkManager.announceBlockUpdate(net.minecraft.server.WorldChunkManager, int, int, int)

[13:49:17] at ic2.api.NetworkHelper.announceBlockUpdate(NetworkHelper.java:92)

[13:49:17] at ic2.advancedmachines.TileEntityBlock.q_(TileEntityBlock.java:60)

[13:49:17] at ic2.advancedmachines.TileEntityMachine.q_(TileEntityMachine.java:152)

[13:49:17] at ic2.advancedmachines.TileEntityBaseMachine.q_(TileEntityBaseMachine.java:56)

[13:49:17] at ic2.advancedmachines.TileEntityAdvancedMachine.q_(TileEntityAdvancedMachine.java:93)

[13:49:17] at net.minecraft.server.World.tickEntities(World.java:1190)

[13:49:17] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:569)

[13:49:17] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467)

[13:49:17] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)

[13:49:17] Caused by: java.lang.NoSuchMethodException: ic2.platform.NetworkManager.announceBlockUpdate(net.minecraft.server.WorldChunkManager, int, int, int)

[13:49:17] at java.lang.Class.getMethod(Unknown Source)

[13:49:17] at ic2.api.NetworkHelper.announceBlockUpdate(NetworkHelper.java:83)

[13:49:17] ... 8 more

[13:49:17] Unexpected exception

7 answers to this question

Recommended Posts

  • 0
Posted

NetworkHelper


---> used net.minecraft.server.TileEntity instead of net.minecraft.src.TileEntity (Replaced ALL)

 

62 - tileentity, Integer.valueOf(i), Boolean.valueOf(flag)

62 + tileentity, Integer.valueOf(i), flag

 

 

84 - net.minecraft.server.WorldChunkManager.class, Integer.TYPE, Integer.TYPE, Integer.TYPE

84 + net.minecraft.server.World.class, int.class, int.class, int.class

\/\/\/\/\/\

>>Patched Fix<< <<-- WORKING!!! V3

^^^^^^^^^^^^^

  • 0
Posted

I'm not quite sure how you came about that error but so far the only IC2 errors from advancedmachines in 3.1.3 that I've come across or had reported to me is the one which is caused by the package names not being ported properly in some of the IC2 files, which is covered in this topic -> http://forums.technicpack.net/threads/3-1-3-reported-issues-and-possible-fixes.30863/

Also, the Ic2.api.NetworkHelper in the 3.1.3 server ic2 mod I'm looking at doesn't have any reference to WorldChunkManager at all, so I'm a bit confused...

  • 0
Posted

Nope, I just patched it all. I'm running full Advanced machines all the way!!!

This was after I patched the first error. So, the errors were technically "made" by me. The entire file needed to be recoded for the server... I think you forgot to do that lol...

I just tested it, here is my working NetHelper.java

package ic2.api;

 

import java.lang.reflect.Method;

import net.minecraft.server.EntityHuman;

import net.minecraft.server.TileEntity;

import net.minecraft.server.World;

import net.minecraft.src.ItemStack;

 

// Referenced classes of package ic2.api:

//            INetworkDataProvider

 

public final class NetworkHelper

{

 

    public NetworkHelper()

    {

    }

 

    public static void updateTileEntityField(TileEntity tileentity, String s)

    {

        try

        {

            if(NetworkManager_updateTileEntityField == null)

                NetworkManager_updateTileEntityField = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("updateTileEntityField", new Class[] {

                    net.minecraft.server.TileEntity.class, java.lang.String.class

                });

            NetworkManager_updateTileEntityField.invoke(null, new Object[] {

                tileentity, s

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void initiateTileEntityEvent(TileEntity tileentity, int i, boolean flag)

    {

        try

        {

            if(NetworkManager_initiateTileEntityEvent == null)

                NetworkManager_initiateTileEntityEvent = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("initiateTileEntityEvent", new Class[] {

                    net.minecraft.server.TileEntity.class, Integer.TYPE, Boolean.TYPE

                });

            NetworkManager_initiateTileEntityEvent.invoke(null, new Object[] {

                tileentity, Integer.valueOf(i), flag

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void initiateItemEvent(EntityHuman entityhuman, net.minecraft.server.ItemStack itemstack, int i, boolean flag)

    {

        try

        {

            if(NetworkManager_initiateItemEvent == null)

                NetworkManager_initiateItemEvent = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("initiateItemEvent", new Class[] {

                    net.minecraft.server.EntityHuman.class, net.minecraft.src.ItemStack.class, Integer.TYPE, Boolean.TYPE

                });

            NetworkManager_initiateItemEvent.invoke(null, new Object[] {

                entityhuman, itemstack, Integer.valueOf(i), Boolean.valueOf(flag)

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void announceBlockUpdate(World world, int i, int j, int k)

    {

        try

        {

            if(NetworkManager_announceBlockUpdate == null)

                NetworkManager_announceBlockUpdate = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("announceBlockUpdate", new Class[] {

                    net.minecraft.server.World.class, int.class, int.class, int.class

                });

            NetworkManager_announceBlockUpdate.invoke(null, new Object[] {

                world, Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(k)

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void requestInitialData(INetworkDataProvider inetworkdataprovider)

    {

        try

        {

            if(NetworkManager_requestInitialData == null)

                NetworkManager_requestInitialData = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("requestInitialData", new Class[] {

                    ic2.api.INetworkDataProvider.class

                });

            NetworkManager_requestInitialData.invoke(null, new Object[] {

                inetworkdataprovider

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void initiateClientTileEntityEvent(TileEntity tileentity, int i)

    {

        try

        {

            if(NetworkManager_initiateClientTileEntityEvent == null)

                NetworkManager_initiateClientTileEntityEvent = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("initiateClientTileEntityEvent", new Class[] {

                    net.minecraft.server.TileEntity.class, Integer.TYPE

                });

            NetworkManager_initiateClientTileEntityEvent.invoke(null, new Object[] {

                tileentity, Integer.valueOf(i)

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    public static void initiateClientItemEvent(net.minecraft.server.ItemStack itemstack, int i)

    {

        try

        {

            if(NetworkManager_initiateClientItemEvent == null)

                NetworkManager_initiateClientItemEvent = Class.forName((new StringBuilder()).append(getPackage()).append(".platform.NetworkManager").toString()).getMethod("initiateClientItemEvent", new Class[] {

                    net.minecraft.server.ItemStack.class, Integer.TYPE

                });

            NetworkManager_initiateClientItemEvent.invoke(null, new Object[] {

                itemstack, Integer.valueOf(i)

            });

        }

        catch(Exception exception)

        {

            throw new RuntimeException(exception);

        }

    }

 

    private static String getPackage()

    {

        Package package1 = ic2.api.NetworkHelper.class.getPackage();

        if(package1 != null)

            return package1.getName().substring(0, package1.getName().lastIndexOf('.'));

        else

            return "ic2";

    }

 

    private static Method NetworkManager_updateTileEntityField;

    private static Method NetworkManager_initiateTileEntityEvent;

    private static Method NetworkManager_initiateItemEvent;

    private static Method NetworkManager_announceBlockUpdate;

    private static Method NetworkManager_requestInitialData;

    private static Method NetworkManager_initiateClientTileEntityEvent;

    private static Method NetworkManager_initiateClientItemEvent;

}

 

 

  • 0
Posted

I don't want to sound like a douche here but you're wrong, the only problem with the Ic2 api in 3.1.3 is the incorrect package names, which does not require an entire recode of the file it only requires correcting the package names, check the topic I linked.

  • 0
Posted

Yes, well... I can login. And play.

Although, granted, the AdvMachines (they don't do work) do not work with this, but at least it doesn't crash the server.

Sorry but that's not actually a fix then is it? They work 100% fine if patched correctly via the instructions posted in the topic I linked.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...