Jump to content

[1.12.2] Fluid Creation and Changes?


HalestormXV

Recommended Posts

So I am trying to create some custom fluids and I found a thread here that was responded to by @Choonster and he gave an excellent link to his Repo on how he does Fluids and it is well documented but it is for 1.10.2. However, it all looks to still be applicable to 1.12.2 with the exception of this https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/78140ee977ac6bdfe1b455a2de54c9cd777b693b/src/main/java/choonster/testmod3/client/model/ModModelManager.java#L52-L72. Apparently, ModelLoader.setCustomMeshDefinition(item, MeshDefinitionFix.create is no longer valid. I'm just curious to know what this has been changed to, or if there is another way to do this now in 1.12.2 that can be applied to the code.

Link to comment
Share on other sites

21 minutes ago, CoderAtParadise said:

In the 1.12.2 branch MeshDefinitionFix is gone as it was a fix for lambda's not working that is only difference I can see

So the correct format would be: 

ModelLoader.setCustomMeshDefinition(item, (stack -> modelResourceLocation))

 

Or something else entirely?

Link to comment
Share on other sites

1 hour ago, CoderAtParadise said:

that without the extra brackets is the 1.12.2 branch

 

Spoiler

 

Gotcha, and would you happen to know if the .json format changed for them also? I am getting this: https://pastebin.com/JvbTLmwP

 

And I am imaging that is happening becasue the only blockstate .json file is called fluid and perhaps a .json format has changed? ( I doubt it but it is just something I noticed). 

1.10.2 Version is this: https://tinyurl.com/yaw4ofw2

1.12.2 Version (from AbyssalCraft) looks like this: https://pastebin.com/p1AmWiMV

 

Or maybe it is more likely that it is look for fluid.normal or fluid.normal_gas etc. etc. in the blockstates? As opposed to just using the fluid.json? For some reason I can never get my .jsons right on the first go around.

 

And no i never once worked with fluids unfortunatly so this is quite literally ALL new to me, so I appologize for the lack of competence I have with this lol. But I can never learn if I don't try.

 

 

 

EDIT: Nevermind, stupid mistake on my part as is often the case. I fixed it. However I do have a question somewhat related to fluids since I am new to them and all. How do I make it act like water where it pushes the player and stuff like that? Or if they go into a "gas" liquid it will make them float up and stuff. Or apply potion effects and cool little things like that? Does that use the onEntityCollide function or something like that? Im guessing 

BlockFluidClassic

has all of those nifty little things in it? So I'd just be able to make something that extends that.

Edited by HalestormXV
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.

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Wow this looks a lot simpler than I thought it would be. Especially compared to the setup I had to do for capabilities. I'll look at all this and update if I have any issues ty
    • Me and a group of friends were trying to get a modpack to work so we can play together. It works for everyone else, except me. At first when I tried to import the modpack, it said "invalid file" but it didn't with anyone else's. The owner of the modpack resent it several times and I still kept getting the same issue, so I opened the modlist and downloaded every single mod by hand. I thought that it would resolve the issue, but instead, it started saying "Forge Modloader Installation Failed" after I created a new installation, so I tried to use a pre-existing modpack, made sure it was the same version "1.20.1, forge version 47.3.0" and swap the mods there, but it still had the same issue, and now none of my modpacks are working at all. They all keep saying that the modloader installation failed. None of us have any idea what to do as we aren't the techiest people. Any help is appreciated. Thank you!
    • I don't think there's any documentation on them yet, I mainly just looked at the Vanilla code when implementing mine. You can see a fairly simple example here: Registration: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/init/ModDataComponents.java#L50-L58 Item Registration: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/init/ModItems.java#L264-L266 Usage: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/world/item/EntityCheckerItem.java
    • Okay, I'm glad I made a backup then. I'm confused as to where there is any information on how to work with Data Components. I don't see anything about it on the Forge docs or any tutorials on this in general unless I'm missing it somehow. I can see the DataComponents decompiled class file but I'm not sure how to work with it. Maybe it's beyond my technical expertise?
    • The situation is the same in 1.20.6. Data Components were introduced in 1.20.5/1.20.6 and Item Capabilities haven't been re-implemented since then.
  • Topics

×
×
  • Create New...

Important Information

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