Posted November 1, 201212 yr Hi Im just wondering how do I make my code for the server side as I'm tiny bit confused how the new forge universal works Ive decompiled my minecraft single/server using forge and when it gets to the decompiling of server says skipping this is normal I'm just wondering is this normal if I want to make an smp mod? Also when i recompile my mod and add it to servers I get this error "Caused by: java.lang.ClassNotFoundException: bbz" which it can't find the TileEntitySpecialRender as this file is on the client just wondering do i need to do something to stop certain class files running on the server?
November 1, 201212 yr Look into the forge proxy system, but the major rule is, classes that address server side need to go in Common package and can NOT reference classes from the client package. Packages in the client package are client side only and can reference classes from both packages. There are 2 threads that run through the mod, client and server, server needs to stay contained in the common package, and client can go wherever, but should not modify the server directly. There is a proxy system in place that allows you to call a class in the common package, that is extended in the client package, and depending on if the thread is server or client, that is the class that it will use. This is the heart of combining the two.
November 1, 201212 yr This is very simple, where you register your TESR, do it in the ClientProxy, like so: ClientRegistry.registerTileEntity(TileEntityCable.class, "Cable", new TileEntitySpecialCableRenderer()); and in the server proxy, just do GameRegistry.registerTileEntity(TileEntityCable.class, "Cable"); hope it helps
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.