Search In
• More options...
Find results that contain...
Find results in...

# 1.7 Animated fluid in gui? UNSOLVED

## Recommended Posts

Does anyone know how to make animated fluid, in this case water and lava, in a gui? Im a noob at this sort of stuff... Thanks in advance

eKoop Creator:

##### Share on other sites

ok but I don't get where to put the update screen, my gui is just the simple draw foreground ect.

eKoop Creator:

##### Share on other sites

If you want to just draw the animating lava texture (like how it is in the world), you don't need to do something that complicated.

You'll want to:

• Bind the blocks texture (
TextureMap.locationBlocksTexture

, IIRC)

• Get the
TextureAtlasSprite

for the fluid from the texture map

• Use the
getInterpolatedU

and

getInterpolatedV

methods to get the U and V coords to use when you draw the texture onto the screen

This is how I did it for my GUI fluid indicator, but it's for 1.8.9 so yours (mostly just the

drawFluidQuad

method) will be a bit different:

Don't make mods if you don't know Java.

Developer of many mods

##### Share on other sites

Yup, it's different and, as a noob with updating/downgrading, i've only figured how to convert one bit of code. Sorry about my noobishness

Also - what's lava and water's atlas name ? Thanks

eKoop Creator:

##### Share on other sites

minecraft:lava_still

and

minecraft:water_still

, IIRC

Don't make mods if you don't know Java.

Developer of many mods

##### Share on other sites

Ok, here is what i've done so far, I have no idea how to fix the draw fluid quad section ;l

Thanks

eKoop Creator:

##### Share on other sites

I'm sorry guys, but this is too complicated, I honestly don't have a clue, I kinda understand the switching between coords, but where do I put gui updatescreen?

eKoop Creator:

##### Share on other sites

You don't need any updateScreen. The animation is done for you already. You simply have to draw the texture, it is changed on the fly without you having to do anything to make the animation happen.

##### Share on other sites

OK, Basically, I have all the drawing done, all I want is to get the textures source from the animated texture. Look at my gui near the coolant bit.

eKoop Creator:

##### Share on other sites

Look at the code I posted.

## 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.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×

• ### Posts

• How did you figure out the texture changing? I looked at your code and I can't seem to replicate your solution.
• I don't know what to tell you. I don't use iOS devices. Try to find something on your system that is doing the MITM.
• some mods you have installs required another mod, the screen of the game tells you exactly which mod with which version you need to install Edit: mods you need to install supermartijn642corelib 1.0.15 or above puzzleslib 3.0.0 or above placebo 6.0.1 or above terrablender 1.0.0.44 or above blueprint 1.18.1-5.0.0 or above selene 1.18-1.11 or above

• 8
• 0
• 2
• 14
• 3
• ### Who's Online (See full list)

×

• #### Activity

×
• Create New...