Jump to content

Recommended Posts

Posted

I want to know if I can make a custom fluid using the stock minecraft classes and if that would work as right now forges fluid rendering does not work.

Posted

I'm not sure, but I think you can create classes that extend BlockDynamicLiquid and BlockStaticLiquid and modify those so that the flowing part works in the updateTick() method.

 

If you look at how lava and water are made, it is simply through this registration:

new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").disableStats());

new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setLightLevel(1.0F).setUnlocalizedName("lava").disableStats());

 

And of course you can create your own materials if it makes sense.

 

You'll note that the parent class BlockLiquid has a property called LEVEL which is the fluid level within the block from 0 to 15.  You could use that to control the model used to display the liquid.

 

Anyway, I think that could work.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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

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

Announcements



×
×
  • Create New...

Important Information

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