1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Feature 1.8+ Block Variants Plugin?

Discussion in 'Bugs & Feature Requests' started by RowanFN, Jun 12, 2015.

  1. Hello Everyone!

    Wondering if this can be made or possible.

    What:
    The Ability to select a block and depending on the resourcepack used change its block variant.

    Issue:
    Looking into creating a resource pack, and making different block models, putting them into the blockstate for a random creation when loaded. I find that when the model is placed the model is then saved into the world, and no matter how many times you destroy it and replace it, it will always be the same model with your resource pack.

    How:
    What would be good is if with a command, Heighlight stick or something, select the block, and then send a command to the server to reset that location on the map to reset the block placement and issue a new random placement command, which should then give another random change for the model to appear. Either that or to scroll through and issue the next block Variant in line.

    Would something like this be possible?
     
  2. Bump.... Any Ideas?
     
  3. The models used in your blockstates files (when in an array) are randomly chosen based on the coordinates.

    If you want a different model, you have to change the coordinates. And it couldn't be solved server side, because if it is randomly picking models from a specific block state, then it's all client side.
     
  4. So is there something the server can do client side?
    as i know for some plugins its only shown/effecting the client side, this would be just redoing the random code, cause once its placed, it'll be server side also i assume, could that then be changed?
     
  5. Bump.... no idea
     
  6. Haha Thanks,

    I mean i understand, because of the texturepack is client side mostly.

    but because its random, like if you had a stick, the stick could destroy (pop off) the block and reset the spot, so when its placed again the block will be different.

    or have parts of a txturepack online? mainly the blockstates etc. I know a texturepack can't be over 50mb (mines like 120mb) but is there then a way to split the texturepack, blockstates etc being on the server, textures with the client,

    then the server can decide what happens when its placed surely? or what calculations to do? and then client can just overlap the textures to make it all work.

    any of this sound possible? or anything like it sound possible?
     
  7. Maybe my response wasn't clear. The block state chooses a model based on the coordinates. There is no way around this. Each coordinate has a unique block model it will pick.

    The formula is probably something like:

    Random r = new Random(blockX*7+blockY*9+blockZ*13);
    int modelIndex = r.nextInt(models.length);
     
  8. ahh well thats highly annoying :/

    would you think in 1.9 this might change a lil?
     
  9. Not likely. The only way I could see a "fix" for you would be if Mojang brought back invalid damage values, or allowed models based on NBT which would mean you need to use Tile Entities.
     
  10. Dang it, thats kinda really annoying,

    Could you set models based on biome? or is this the same thing and invalid also now?
     
  11. With the current block-model system, the only control anyone has is what models can be displayed. Mojang chooses which of them to display. There is no way whatsoever for you to tell the client what block model you want displayed there, unless if maybe MCPatcher supports NBT from blocks, or data values that are out of default range. But that's not something I know the answer to, you'll have to look at it yourself, and experiment.
     
  12. Hey Thanks,

    I'd rather not use any patcher or 'mod' at all for this to be done, try to be vanilla as possible, as i see it if i install a mod or client mod for this, i might as well just make a mod.

    See if anything interesting happens with 1.9 but thanks for the help and advice,