DonBruce64 / MinecraftTransportSimulator

A Minecraft mod that adds planes and automobiles with realistic physics!
Other
109 stars 60 forks source link

[Bug] Vehicles that fall within other vehicle's subnames mess up bench cycling. #1659

Closed DrprofLuigi closed 1 year ago

DrprofLuigi commented 1 year ago

This is best explained through example:

I have two vehicles, unucivil_vehicle_unu_labrador and unucivil_vehicle_unu_labrador_mail

unucivil_vehicle_unu_labrador has four subNames: _chocolate, _ivory, _seaweed, and _spaghetti.

unucivil_vehicle_unu_labrador_mail has two subNames: _blackthorne and _ivory.

This results in the following order when the names and subnames are combined:

unucivil_vehicle_unu_labrador_chocolate
unucivil_vehicle_unu_labrador_ivory
unucivil_vehicle_unu_labrador_mail_blackthorne
unucivil_vehicle_unu_labrador_mail_ivory
unucivil_vehicle_unu_labrador_seaweed
unucivil_vehicle_unu_labrador_spaghetti

When you scroll through the vehicle bench, you hit unucivil_vehicle_unu_labrador_chocolate, then unucivil_vehicle_unu_labrador_mail_blackthorne, then unucivil_vehicle_unu_labrador_seaweed. unucivil_vehicle_unu_labrador comes up twice.

If you are on unucivil_vehicle_unu_labrador_seaweed, and cycle to unucivil_vehicle_unu_labrador_ivory or unucivil_vehicle_unu_labrador_chocolate with the color selector, then you will go back to unucivil_vehicle_unu_labrador_mail when yo go to the next vehicle.

DonBruce64 commented 1 year ago

This is not a bug. The item registry orders alphabetically, and changing it to be JSON-smart is very difficult, especially given that skins exist. Changing this has the problem that it'll potentially mess up other pack's orderings that rely on specific JSON names.

I cannot support this.