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

Trying to render a Techne Model

 

I get an error in my ClientProxy class that looks like this

 

public class ClientProxy extends CommonProxy {


    public void registerRenderThings()
    {
        //rubble
        TileEntitySpecialRenderer render = new RendererJohnnyBlockRubble();
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJohnnyBlockRubble, render);
    }

    public void registerTileEntitySpecialRenderer()
    {

    }

} 

 

Error is the first Parameter in "ClientRegistry.bindTileEntitySpecialRenderer" which would be "TileEntityJohnnyBlockRubble"

 

Any idea what I've done wrong?

 

Here's the code for My BlockJohnnyBlockRubble (The block that will eventually be the techne model

 

public class BlockJohnnyBlockRubble extends BaseJohnnyBlock
{
    public BlockJohnnyBlockRubble()
    {
        super();
        this.setBlockName("johnnyFaceBlockRubble");
        this.setStepSound(soundTypeStone);
        this.setHardness(10.0f);
        this.setResistance(20.0f);
        this.setHarvestLevel("pickaxe", 2);


    }


    public TileEntity createNewTileEntity(World var1, int var2)
    {
        return new TileEntityJohnnyBlockRubble();
    }

    public int getRenderType()
    {
        return 100;
    }

    public boolean isOpaqueCube()
    {
        return false;
    }


    public boolean renderAsNormalBlock()
    {
        return false;
    }




} 

 

 

The "TileEntityJohnnyBlockRubble" class exists but it doesn't contain any code.

 

 

Think Java is tough? try BrainFuck!

ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJohnnyBlockRubble.class, render);

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJohnnyBlockRubble.class, render);

 

You call yourself an Asshole Draco, but I think you have a heart of gold, thanks.

 

I can't believe I missed that.

Think Java is tough? try BrainFuck!

Nah, everyone else calls me an asshole because they're too [lazy|stupid|assholish] to go to the effort of helping themselves.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

I have another issue if you feel like helping out.

 

My block is completely invisible.

 

I hear this has something to do with extending the BlockContainer class instead of my BaseBlock

 

But when I do that I get a bunch of errors to do with "material" any idea what I'm doing wrong?

 

Think Java is tough? try BrainFuck!

You need to supply a material.  Look at all the other blocks:

blockRegistry.addObject(20, "glass", (new BlockGlass(Material.glass, false))...

public BlockStone()
    {
        super(Material.rock); //here
        this.setCreativeTab(CreativeTabs.tabBlock);
    }

 

As for invisible, that has nothing to do with BlockContainer.  You registered a renderer for your block, and likely, it isn't rendering anything.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

I managed to fix it, the renderer is working and this is the un-textured way my model should look, the problem with that code was that I was doing this:

 

public static final BaseJohnnyBlock johnnyFaceBlockRubble = new BlockJohnnyBlockRubble();

 

Instead of this

 

public static final BlockJohnnyBlockRubble johnnyFaceBlockRubble = new BlockJohnnyBlockRubble(Material.rock);

 

 

My texture and name aren't working though now. :(

 

 

**UPDATE**

 

Stupid error to do with my renderer not finding the correct path for my image, my fault for putting "model" instead of "models"

 

last error to fix is the name of the item to be placed, don't know how to fix this one.

 

 

 

 

Think Java is tough? try BrainFuck!

I managed to fix it, the renderer is working and this is the un-textured way my model should look, the problem with that code was that I was doing this:

 

public static final BaseJohnnyBlock johnnyFaceBlockRubble = new BlockJohnnyBlockRubble();

 

Instead of this

 

public static final BlockJohnnyBlockRubble johnnyFaceBlockRubble = new BlockJohnnyBlockRubble(Material.rock);

 

 

My texture and name aren't working though now. :(

 

Can you show your renderer?

I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!

last error to fix is the name of the item to be placed, don't know how to fix this one.

 

Lang files.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Yep, was lang files, issue solved :D

 

Now just need to figure out how to spawn these blocks when my other one breaks.

Think Java is tough? try BrainFuck!

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.