Sakuya is my waifu Posted September 3, 2015 Share Posted September 3, 2015 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 Quote "The cycle of life and death continues. We will live, they will die." Link to comment Share on other sites More sharing options...
Kloonder Posted September 3, 2015 Share Posted September 3, 2015 GameRegistry.registerTileEntity(MyTileEntity.class, 15); You could maybe try this Quote 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 Link to comment Share on other sites More sharing options...
Kloonder Posted September 3, 2015 Share Posted September 3, 2015 It was just a rondom number, to show you you can register from 0 - nearly infinite. Just wanted to help Sir Perfect Quote 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 Link to comment Share on other sites More sharing options...
Sakuya is my waifu Posted September 3, 2015 Author Share Posted September 3, 2015 what about proxy.registerTileEntity(); thing? do i need it? Quote "The cycle of life and death continues. We will live, they will die." Link to comment Share on other sites More sharing options...
ItsAMysteriousYT Posted September 3, 2015 Share Posted September 3, 2015 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 Quote Link to comment Share on other sites More sharing options...
coolAlias Posted September 3, 2015 Share Posted September 3, 2015 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. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Sakuya is my waifu Posted September 3, 2015 Author Share Posted September 3, 2015 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 Quote "The cycle of life and death continues. We will live, they will die." Link to comment Share on other sites More sharing options...
ItsAMysteriousYT Posted September 3, 2015 Share Posted September 3, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.