Jump to content

Recommended Posts

Posted

For each blockstate entry you can have a model, and for each model you can have different textures, and for each texture you can have different transparency by simply having a translucent .png file. Just take the texture you want, and make several .pngs, each with the desired translucency, then hook them up to different models for your blockstate .json.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Posted (edited)
  On 10/25/2019 at 2:03 AM, SerpentDagger said:

For each blockstate entry you can have a model, and for each model you can have different textures, and for each texture you can have different transparency by simply having a translucent .png file. Just take the texture you want, and make several .pngs, each with the desired translucency, then hook them up to different models for your blockstate .json.

Expand  

I already have an IModel with 18 different textures which are dynamically picked for each state depending on the blockstate, so I need dynamic transparency. 

Edited by Evi1Casul
Posted
  On 10/25/2019 at 11:10 AM, Evi1Casul said:

so I need dynamic transparency

Expand  
  On 10/24/2019 at 9:10 PM, Evi1Casul said:

dynamically (depending on the blockstate)

Expand  
  On 10/25/2019 at 11:10 AM, Evi1Casul said:

18 different textures which are dynamically picked for each state depending on the blockstate

Expand  

Perhaps I'm misunderstanding your definition of dynamic? It seems to me that you want the block's transparency to vary with the blockstate, and with the textures in the model. This can be accomplished as I described.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Posted (edited)
  On 10/25/2019 at 6:35 PM, SerpentDagger said:

Perhaps I'm misunderstanding your definition of dynamic? It seems to me that you want the block's transparency to vary with the blockstate, and with the textures in the model. This can be accomplished as I described.

Expand  

First, that's sort of a workaround. I don't understand why there is no system with flexible rendering control for cases where JSON is helpess (yeah, IModel/TESR is also clumsy and unobvious). However, speaking of the method you described, it's still impossible. I have a custom model that randomly picks one of six textures for each block side (the block can be attached to adjacent blocks); more than that, it has 3 different subtypes, so JSON system will be generating 3 * 2^6 * 6^6 = ~9M variants. Considering model baking time (and just logic), that's going to be processed for a long time. Transcluent textures will make it even worse (btw, not to mention manual json and texture files editing). I need a solution via IModel or whatever.
P.S. I already implemented dynamic textures and models picking.

Edited by Evi1Casul
Posted
  On 10/25/2019 at 7:16 PM, Evi1Casul said:

3 * 2^6 * 6^6

Expand  

First off where did 2^6 come from?
 

  On 10/25/2019 at 7:16 PM, Evi1Casul said:

I need a solution via IModel or whatever.

Expand  

From what I can see here is you need to use the TextureStitchEvent(Not sure if it should be pre or post).Then you'll need to either load(if in the pre event) or get from the AtlasTexture(post event). Then you'll need to use reflection to access the NativeImage array stored in the TextureAtlasSprite via reflection and call setPixelRGBA for your pixels. Then you'll need to add this texture to the AtlasTexture(which is why I'm not sure which event you need I am leaning towards Pre).

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 10/25/2019 at 8:01 PM, Animefan8888 said:

First off where did 2^6 come from?

Expand  

6 sides that may or may not be attached.

 

  On 10/25/2019 at 8:01 PM, Animefan8888 said:

From what I can see here is you need to use the TextureStitchEvent(Not sure if it should be pre or post).Then you'll need to either load(if in the pre event) or get from the AtlasTexture(post event). Then you'll need to use reflection to access the NativeImage array stored in the TextureAtlasSprite via reflection and call setPixelRGBA for your pixels. Then you'll need to add this texture to the AtlasTexture(which is why I'm not sure which event you need I am leaning towards Pre).

Expand  

I want to make smooth block fading. If 5% per frame is enough, I'll need to cache 18 * 20 = 360 textures. Is it okay in terms of performance?

Posted
  On 10/25/2019 at 7:16 PM, Evi1Casul said:

First, that's sort of a workaround.

Expand  

It's just using the Json system for what it's meant to be used for.

  On 10/25/2019 at 7:16 PM, Evi1Casul said:

generating 3 * 2^6 * 6^6 = ~9M variants

Expand  

Yeah, now that you've told me that it requires ~9M variants instead of ~5 like a normal model, I can see that Json is impractical for your situation. Maybe you should have put that in the topic somewhere? The quality of the help you receive is proportional to the quality of the information you give us (in this case, poor).

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Posted
  On 10/25/2019 at 8:46 PM, Evi1Casul said:

Is it okay in terms of performance?

Expand  

Just sounds like it'll eat up a lot more ram and have a little longer startup time. Though I dont know exactly you'll have to test it and find out. If you mean in terms of fps as long as ram is sufficient the user shouldn't experience any drops in fps from the way the textures work however they may experience a drop in fps if the blockstate changes really fast. Each time it happens the whole chunk mesh has to be regenerated.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 10/26/2019 at 8:20 AM, Evi1Casul said:

Is there a way to change rendering instead of model or textures?

Expand  

Basically when you are doing fancy render stuff like this you need to ask yourself a few basic questions.

  1. Are there going to be a large amount of these blocks in one area? If yes it is likely better to use the model system.
  2. Is your block animated? If yes then you will need to use a TESR preferably a FastTESR.
  3. Is your block is gonna update at a ridiculous rate IE every tick? Then you should probably not use the model system unless the update has a switch. If it has a switch you should use both model and TESR. Model for non updating mode and TESR for updating mode and basically all data for the update should be in the TE for the block. And the switch should be stored in the blockstate so it is capable of switching between not having a TE and having a TE.

Basically weigh these questions against your Block then make a judgement call. If it turns out to be terrible try another implementation. I recommend using the switch method of things.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 10/27/2019 at 12:34 AM, Evi1Casul said:

I set the render type to INVISIBLE to use TESR, but the returned blockstate somehow misses its unlisted properties now...

Expand  

Post your code. I mainly need the block class and subclasses if they are important(IE change behavior). If there are multiple a git repo would work great.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Ignore shrimple, it doesn't work with Oculus. Also, enableShaders was alr true when it said that towards the end of the log. If you could also figure out why my tags are messed up that'd be cool too, but that's a later issue. https://drive.google.com/drive/folders/1ovEKDZECUCl7zZxGfpyQcS4s5PZPQyfa?usp=drive_link
    • accidental duplicate mesage cuz lag
    • https://gnomebot.dev/paste/231527759279685634/1372324909073563730/1372324908629102716 https://gnomebot.dev/paste/231527759279685634/1372320454861262908/1372320454299090996 seems like theres a registry sync error, not sure what that means though, however in an old pack i played on, i actually had a registry sync error happen whenever the world tried too save and it would suddenly stop loading chunks, is there a mod fix for this or some way too bypass registry syncing? is this a server problem? i have no issues with the pack on pc, only on my server.
    • i think the problem is the player animator library but i need it for one of my main mods is there any way i can fix this? The game crashed: rendering overlay Error: java.lang.IllegalArgumentException: Failed to create player model for default heres the crash report: https://pastebin.com/U5Wp8ysb
    • I have been an enthusiastic investor in crypt0currencies for several years, and my digital assets have been integral to my financial strategy. A few months ago, I encountered a distressing predicament when I lost access to my primary cryptocurrency walleet after clicking on an airdrop link that inadvertently connected to my walleet. The dread of potentially losing all my hard-earned funds was overwhelming, leaving me uncertain about where to seek assistance. In my pursuit of solutions, I stumbled upon ChainDigger Retrievers. From our initial consultation to the triumphant recovery of my assets, the team exhibited exceptional expertise. They provided comprehensive explanations of the recovery process, ensuring I was informed at every stage and offering reassurance during this tumultuous time. Their approach was not only meticulous but also compassionate, which significantly alleviated my anxiety. ChainDigger Retrievers unwavering commitment to resolving my issue was evident throughout the process. Leveraging their profound understanding of crypt0currency technology and digital forensics, they initiated an exhaustive investigation to trace the transactions linked to my compromised wallet. Their meticulous analysis and relentless determination were apparent as they left no stone unturned in their quest to recover my funds. After several days of diligent investigation, the team successfully recovered everything I had lost. They uncovered that the link I had clicked contained malware, which scammeers had used to infiltrate my walleet. This revelation was both alarming and enlightening, underscoring the inherent risks associated with crypt0currency transactions when proper precautions are not taken.Thanks to ChainDigger Retrievers, I not only regained everything but also acquired invaluable knowledge about safeguarding my investments. Their expertise and steadfast support transformed a daunting situation into a manageable one, and I am profoundly grateful for their assistance. I can now continue my investment journey with renewed confidence, knowing that I have a trustworthy ally in ChainDigger Retrievers. Their client satisfaction is truly commendable, and I wholeheartedly recommend their services to anyone facing similar challenges in the crypt0currency realm. With their help, I was able to turn a distressing time into a positive outcome, and I will forever be grateful for their support.  
  • Topics

×
×
  • Create New...

Important Information

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