1.11 Preview

FyberOptic

New Member
Jul 29, 2019
524
0
0
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:

FyberOptic

New Member
Jul 29, 2019
524
0
0
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.
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
I wonder how long it will be before a "if(itemStack == null)itemStack = ItemStack.NULL_STACK;" becomes scattered through the code...
 
V

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.
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
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.