Yarn: Extremely controversial: Block -> BlockType; Item -> ItemType; ItemStack -> Item

Created on 19 Dec 2018  路  15Comments  路  Source: FabricMC/yarn

Is this an insane idea? Probably. But it would be consistent with BlockEntityType, ParticleType, EntityType, etc.

you should probably 馃憥 right now

All 15 comments

The main thing is that there's already a BlockEntity class that necessitates BlockEntityType being called as such. There isn't a necessity for blocks or items.

ItemStack tho

Then that would require Item -> ItemStackType and that would just be hell. Plus, there's already official Mojang established names for Block and Item, but not BlockEntity and the like.

I was going to suggest this at some point, actually. Exactly the same renames. So I'm all for it :D

I'm all for this. The new name better communicates that the classes are flyweights, which is a common pitfall for new modders.

For reference, Sponge API uses BlockType[1] and ItemType[2] for the same concept.

sponge api does have many nice names, e.g. text instead of component

Not completely opposed.

"Type" is a loaded word, and that flyweight sense that we're trying to communicate might not come across. What about BlockKind/ItemKind?

I think we should keep ItemStack though.

Or Block/ItemRegistryEntry

Nah, it's main job isn't to be a registry entry.

i think type might not be the best choice but kind works well enough

tbh I am not a huge fan. I can understand where you are coming from, but we always had Block and all modders are used to them. Plus Block type would kind of imply that there is an actual Block too.
I am completely against changing ItemStack btw. That name perfectly describes what an ItemStack is.

"all modders are used to them" is not a good reason. There's a lot of names that were changed from the well known ones despite that in Yarn mappings, eg. BlockEntity

I think it's a thoroughly shit idea but "modders are used to them" is the worst argument you could've pulled out because that does not matter

With a vote ratio of 3:1 I will close this

Was this page helpful?
0 / 5 - 0 ratings