Jump to content

Weird problem with metadata


Recommended Posts

I am making a furnace that will produce power, called a 'power furnace.'

I would like to have the textures update based on whether the furnace is burning or not.

To do this, i used metadata. 0-3 directionals off, 4-7 directionals on

However, when I place fuel in the tile entity, the textures on the x axis start to flicker, and the the front texture, no matter what side. They seem to be changing metadata and my console proves it.

Although the furnace should be burning, the metadata output i coded in shows 0 most of the time, sometimes jumping to 3, back to 0, sometimes to 7, back to 0, and then sometime to 11. It shouldnt be going that high.







It shouldn't be doing this, should it?


Link to comment
Share on other sites

I guess it might have helped some, but there was no noticeable difference when I restricted the operations of updateEntity to just the server.

I'd also like to pint out the following:


side1 is the top/bottom texture as well as the default

side2 is the sides and back texture

side3 is the front when off

side3On is the front while on


The textures facing east and west will flicker between their correct state(except the front, which should be side3On, but shows side3, but that may be a problem with the burnTime) and side1.

If the side3 is facing north it flickers between side3 and side3On

If the side3 is facing south, it flickers between side3 and side2, and the back flickers between side2 and side1


MrCaracal thank you. I will update my code.

disesiben07 I will try that


Link to comment
Share on other sites

diesienben07 regarding your latest post, I have updated the code regarding that, if it detects more fuel it sets it back to true in the same tick.


Swapping out the if-else chains with switch statements seems to have stopped the flickering, but now the burn time is acting odd.

The console shows the bt increasing and decreasing appropriately. However, the fuel is eaten up automatically, and the gui counter and the textures both indicate 0.


Link to comment
Share on other sites

Okay so for the container I would guess I need to sync the server's tile entity with the client's tile entity?

I found these two...

public void addCraftingToCrafters(ICrafting p_75132_1_)
        p_75132_1_.sendProgressBarUpdate(this, 0, this.tileFurnace.furnaceCookTime);
        p_75132_1_.sendProgressBarUpdate(this, 1, this.tileFurnace.furnaceBurnTime);
        p_75132_1_.sendProgressBarUpdate(this, 2, this.tileFurnace.currentItemBurnTime);


    public void updateProgressBar(int p_75137_1_, int p_75137_2_)
        if (p_75137_1_ == 0)
            this.tileFurnace.furnaceCookTime = p_75137_2_;

        if (p_75137_1_ == 1)
            this.tileFurnace.furnaceBurnTime = p_75137_2_;

        if (p_75137_1_ == 2)
            this.tileFurnace.currentItemBurnTime = p_75137_2_;


Would I use these to make my gui get the proper burn time, or am I grasping at non-existent hooks.


Link to comment
Share on other sites

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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