Jump to content

Recommended Posts

Posted

In 1.12 I was using block.getActualState() to activate "cosmetic-only" properties in one of my blocks. Basically, the block change texture (choosing from 5 different ones) depending on a values stored by the block tile entity. The on-disk metadata of that block was always zero

 

In 1.13 getActualState is gone: should I actualy change the blockstate of the block every time the value in the TE change (causing chunk updates on the server for no reasons) or is there any other way to do so? I known extended block states exist but I don't understand how to use then with my blockstate jsons

 

thank you guys!
 

Posted

Yeah I noticed that. I was looking into extended states but from what I understand I can only work with unlisted properties in extended states, that is, properties that are not in the block json blockstate file. Unless I'm wrong :)

 

In my blockstate I have a TYPE property with values between 0 (default/black texture) and 4 (red texture), the color to use is stored in the block TE.

 

In 1.12.2 my getMetaFromState() always returned 0 (so TYPE=0), leaving getActualState() to set TYPE to the color stored by the TE

 

Can I do this with extended states?

 

Thank you!

Posted

I'm sorry, I know that my property name is a bit misleading. Those  are not 5 different blocks, it's basically a chest that show how full it is by changing it's texture. The TE compute the value for the TYPE property (0/black = empty, 4/red = full, and values in between) and my old getActualState() return the corresponding value for the blockstate json property. Could this be done using extended state and my current blockstate json or should I call world.setBlockState() every time the amount of stuff in the chest change between one TYPE and the other?

 

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

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

×
×
  • Create New...

Important Information

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