Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Aecht_Rob

Aecht_Rob

Members
 View Profile  See their activity
  • Content Count

    4
  • Joined

    July 19, 2020
  • Last visited

    Friday at 02:18 PM

Community Reputation

0 Neutral

About Aecht_Rob

  • Rank
    Tree Puncher
  1. Aecht_Rob

    Toggle block models

    Aecht_Rob replied to Aecht_Rob's topic in Modder Support

    As no-one wanted to help me, I thought I'd update this in case anyone else wants to do something like this (which was to pseudo-embed a texturepack inside a mod to enable a user to toggle specific changed blocks textures on/off via a config). The answer I used is the extremely simple blockstate, via the getActualState method of the block to check the config setting and apply the blockstate and model as required.
    • October 20, 2020
    • 9 replies
  2. Aecht_Rob

    Toggle block models

    Aecht_Rob replied to Aecht_Rob's topic in Modder Support

    Apologies, no, I don't know at all. All I know is that the problem to solve is the same and I don't know how it's done, and assumed it would be code along the same lines. I don't have anything like the 1.12 code specifically referencing models inside the later version code. It just seems finds the right model as if by magic, and I don't know how it is doing it, unless its the text match between block and json names. My code is largely cut-and-paste from tutorials and examples, and then edited to what I need, and I'm looking for some basic help on how to make this next edit. For 1.13+, does that mean it's impossible to circumvent the "intelligent" handling? I know I can do things like use blockstates, but what I am looking for is to assign different textures (via two different models) for the same block and blockstate, depending on the value of a variable passed by a config file. Like an embedded texture resourcepack. I don't know if I am looking for a solution in the block definitions, or to pass the variable to the jsons for deal with there (and I don't know how I would do that unless I know where in the code the jsons are even referenced). Or maybe I can override the global models filepath and store the alternate models in a different folder, but have no idea how I would do that.
    • July 19, 2020
    • 9 replies
  3. Aecht_Rob

    Toggle block models

    Aecht_Rob replied to Aecht_Rob's topic in Modder Support

    Thanks - I think this the same issue presents itself with the same code in later versions - this is not specific to 1.12.2 (?) My mod is versioned over 1.12 through to 1.15 with the various code variants, and the same question applies. Thanks!
    • July 19, 2020
    • 9 replies
  4. Aecht_Rob started following Toggle block models July 19, 2020
  5. Aecht_Rob

    Toggle block models

    Aecht_Rob posted a topic in Modder Support

    Hello. I think I get how basic json block models work by default just matching on name essentially (?). How would I go about inserting a condition into my code to provide an alternative different model though? I have created two different json model files, each pointing to a different set of textures: bbb.json + 32bbb.json I tried this simple code here in the public block class for the block called bbb, but this does not result in the 32bbb model ever being used, and the bbb model is used in both cases: @SideOnly(Side.CLIENT) @Override public void registerModels(ModelRegistryEvent event) { if (somecondition) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation("aaa:bbb", "inventory")); } else { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation("aaa:32bbb", "inventory")); } } Is this something to do with having to force a registration of the 32bbb model somehow to make it visible to the bbb block? If so, how and where do I do this so that the block class can see it? Or is it something else completely? (The condition itself is coming from a static config file, and is not dynamic so I reason can be applied at the point of creating the block like this). Thanks for any help - greatly appreciated.
    • July 19, 2020
    • 9 replies
  • All Activity
  • Home
  • Aecht_Rob
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community