April 24, 201312 yr Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer()); If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 24, 201312 yr Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer()); If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer()); Using ModLoader classes is bad practice when coding with Forge! Modloader. ? Use this: GameRegistry.registerTileEntity( PS: If you find something which you can use with a ModLoader class, look into that class and you'll see the forge equivalent. Basically all ModLoader classes are just wrappers to accomplish compatibility with ModLoader mods. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 25, 201312 yr Extend your block class as BlockContainer, make a TileEntity and TileEntitRenderer classes, then put the code in to your block class public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public int getRenderType() { return 0; } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; } public TileEntity createNewTileEntity(World world) { return new TileEntityYourBlock(); } your main class load method ModLoader.registerTileEntity(net.yourpackage.src.TileEntityYourBlock.class, "Name", new TileEntityYourBlockRenderer()); Using ModLoader classes is bad practice when coding with Forge! Modloader. ? Use this: GameRegistry.registerTileEntity( PS: If you find something which you can use with a ModLoader class, look into that class and you'll see the forge equivalent. Basically all ModLoader classes are just wrappers to accomplish compatibility with ModLoader mods. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr Author Ok thanks, but , are there any detailed tutoraials on this? I am still a bit confused
April 25, 201312 yr Author Ok thanks, but , are there any detailed tutoraials on this? I am still a bit confused
April 25, 201312 yr Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr Eh. Check my pastebins. Basemod. http://pastebin.com/QbCrDCLf Block. http://pastebin.com/DaBKhrTj TileEntity. http://pastebin.com/TJX69p1S Renderer. http://pastebin.com/Gcrct5NT If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. That is not the point! Always use Forge methods! Why? ModLoader is client-only. What if you have loads of ModLoader stuff and want to use your mod on a server or make it compatible with it? You simply have to use the Forge methods, because ModLoader is simply not there, since it's client-only. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. That is not the point! Always use Forge methods! Why? ModLoader is client-only. What if you have loads of ModLoader stuff and want to use your mod on a server or make it compatible with it? You simply have to use the Forge methods, because ModLoader is simply not there, since it's client-only. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. That is not the point! Always use Forge methods! Why? ModLoader is client-only. What if you have loads of ModLoader stuff and want to use your mod on a server or make it compatible with it? You simply have to use the Forge methods, because ModLoader is simply not there, since it's client-only. Okay, i see your point. But there's no registerTileEntity method in GameRegistry. If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. That is not the point! Always use Forge methods! Why? ModLoader is client-only. What if you have loads of ModLoader stuff and want to use your mod on a server or make it compatible with it? You simply have to use the Forge methods, because ModLoader is simply not there, since it's client-only. Okay, i see your point. But there's no registerTileEntity method in GameRegistry. If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
April 25, 201312 yr If ModLoader classes are just wrappers to accomplish compatibility, there's no difference what to use. I just took my old code, find out it's still working and continued using it. That is not the point! Always use Forge methods! Why? ModLoader is client-only. What if you have loads of ModLoader stuff and want to use your mod on a server or make it compatible with it? You simply have to use the Forge methods, because ModLoader is simply not there, since it's client-only. Okay, i see your point. But there's no registerTileEntity method in GameRegistry. Yes there is, look at the class itself. It's in there, most of my mods use it: public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id) Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
May 4, 201312 yr Related to this discussion on ModLoader vs Forge commands, I have the method public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id) But I am unsure on how this will connect to my TileEntityRenderer class. My block works except I can't seem to attach the proper rendering to it. How do I connect my TileEntityRenderer class to the block to make sure my rendering gets used? Read my thoughts on my summer mod work and tell me what you think! http://www.minecraftforge.net/forum/index.php/topic,8396.0.html I absolutely love her when she smiles
May 4, 201312 yr Related to this discussion on ModLoader vs Forge commands, I have the method public static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String id) But I am unsure on how this will connect to my TileEntityRenderer class. My block works except I can't seem to attach the proper rendering to it. How do I connect my TileEntityRenderer class to the block to make sure my rendering gets used? You do this with ClientRegistry.bindTileEntitySpecialRenderer. Put that in your Proxy to avoid crashes with the server. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
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.