Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I have a render, but what would I do to make the block show up as it?

  • Author

I have a render, but what would I do to make the block show up as it?

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.

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.

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.

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.

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.

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.

  • Author

Ok thanks, but , are there any detailed tutoraials on this? I am still a bit confused

  • Author

Ok thanks, but , are there any detailed tutoraials on this? I am still a bit confused

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.

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.

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.

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.

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.

  • 2 weeks later...

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.