1.11 Preview

Discussion in 'Mod Development' started by FyberOptic, Aug 11, 2016.

  1. FyberOptic

    FyberOptic New Member

    I did this before with 1.9 so why not do it again as I find things.

    The snapshot that came out today claims to have "a couple of technology changes that may impact many mods." I haven't heard any specifics on what Mojang meant (other than perhaps resource pack changes), but I did find at least one thing that could be relevant. Tile entity and entity IDs are now different. They're all lower-case, some changed to have underscores in them. In the case of entities, the old name is still associated with them as well.

    The ItemStack class has become more immutable, with the Item field now final. It also now has a private field which indicates if the stack is valid, determined by a method that checks various things like stack size and damage. If invalid, it won't return the specified nbt, size, etc, and returns defaults. loadItemStackFromNBT is also removed now, made into a constructor as it should be.

    Other than that, there's some method signature changes. onItemUse and onItemRightClick no longer accept an ItemStack parameter, for example. I'm sure there's many more examples of this, because Mojang has quite a habit of changing signatures these days.

    I'm sure there's lots of other stuff, this is just what I've noticed personally so far.
     
    Last edited: Aug 11, 2016
  2. FyberOptic

    FyberOptic New Member

    I found that you can't set EntityPlayer.setHeldItem to a null ItemStack anymore, you'll crash with a null pointer because it now runs the new ItemStack validation method further down the chain. You're apparently supposed to pass the new static "null" ItemStack object available in the class (same as passing a new ItemStack with 'null' as its item).

    I'm guessing any other methods in the game where an ItemStack could once be passed as a null will now have to have this null stack passed instead. Forge mods will be no exception.
     
  3. ratchet freak

    ratchet freak Well-Known Member

    I wonder how long it will be before a "if(itemStack == null)itemStack = ItemStack.NULL_STACK;" becomes scattered through the code...
     
  4. Viesis

    Viesis Guest

    I was kind of wondering what to expect with 1.11. Overall, the changes hopefully are not as severe as the jump to 1.7.10 to 1.8.
     
  5. Golrith

    Golrith Over-Achiever Trusted User

    I hope they (or forge) make a better Biome system. Chopping the ID range in half for biome alternatives was a big fail for the mod scene. For example, add Biomes'O'Plenty (or similar) and that's pretty much it for biomes. The 1-128 range is full, while the 129-256 for alternatives is only 25% (at most) used. What a waste.
    While MC vanilla biomes are slowly improving with more detail & variation, mods still do a better job at the moment.
     

Share This Page