Posted September 3, 201510 yr so that's the error i'm getting every time i try to place my tile entity block in the world. i know it needs to be registered... but how you cant just put "GameRegistry.registerTileEntity..." ¯\_(ツ)_/¯ can anyone tell me how? ~thanks "The cycle of life and death continues. We will live, they will die."
September 3, 201510 yr GameRegistry.registerTileEntity(MyTileEntity.class, 15); You could maybe try this Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
September 3, 201510 yr It was just a rondom number, to show you you can register from 0 - nearly infinite. Just wanted to help Sir Perfect Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
September 3, 201510 yr Author what about proxy.registerTileEntity(); thing? do i need it? "The cycle of life and death continues. We will live, they will die."
September 3, 201510 yr You can keep it, but its not necessary, just have a method in your clientproxy in which you register all your tileentities. If you wanna make it a bit more easy and don't wanna have all that GameRegistry.registerTileEntity stuff for each of your tiles-use this generic method: private void setupTile(Class<? extends TileEntity> class1, TileEntitySpecialRenderer render) { try { ClientRegistry.bindTileEntitySpecialRenderer(class1, render.getClass().newInstance()); } catch (Exception e) { e.printStackTrace(); } GameRegistry.registerTileEntity(class1, class1.getName()); } It takes in the TileEntity and the relatet renderer
September 3, 201510 yr You can keep it, but its not necessary, just have a method in your clientproxy in which you register all your tileentities. If you wanna make it a bit more easy and don't wanna have all that GameRegistry.registerTileEntity stuff for each of your tiles-use this generic method: private void setupTile(Class<? extends TileEntity> class1, TileEntitySpecialRenderer render) { try { ClientRegistry.bindTileEntitySpecialRenderer(class1, render.getClass().newInstance()); } catch (Exception e) { e.printStackTrace(); } GameRegistry.registerTileEntity(class1, class1.getName()); } It takes in the TileEntity and the relatet renderer No, don't do that - render classes can only be registered on the CLIENT, whereas TileEntities themselves need to be registered on both sides (i.e. 'common' code). You are just asking to crash your mod when you play it multiplayer by writing code like that - rendering registrations should all be in the ClientProxy. EDIT: I reread your post and see that snippet IS in your ClientProxy, in which case are you also registering the TileEntities on the server? Because the server will need to know about them, too, and it won't if they only get registered in the ClientProxy. http://i.imgur.com/NdrFdld.png[/img]
September 3, 201510 yr Author i didn't use his code, just to be bit more organized i created new class where i register all of my tileentities... and it works fine "The cycle of life and death continues. We will live, they will die."
September 3, 201510 yr You can keep it, but its not necessary, just have a method in your clientproxy in which you register all your tileentities. If you wanna make it a bit more easy and don't wanna have all that GameRegistry.registerTileEntity stuff for each of your tiles-use this generic method: private void setupTile(Class<? extends TileEntity> class1, TileEntitySpecialRenderer render) { try { ClientRegistry.bindTileEntitySpecialRenderer(class1, render.getClass().newInstance()); } catch (Exception e) { e.printStackTrace(); } GameRegistry.registerTileEntity(class1, class1.getName()); } It takes in the TileEntity and the relatet renderer No, don't do that - render classes can only be registered on the CLIENT, whereas TileEntities themselves need to be registered on both sides (i.e. 'common' code). You are just asking to crash your mod when you play it multiplayer by writing code like that - rendering registrations should all be in the ClientProxy. EDIT: I reread your post and see that snippet IS in your ClientProxy, in which case are you also registering the TileEntities on the server? Because the server will need to know about them, too, and it won't if they only get registered in the ClientProxy. No actually they don't - thanks for that
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.