1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-10-01 00:10:47 +00:00
CC-Tweaked/src/main/java/dan200/computercraft/shared/util
SquidDev 0ce67afcc1 Be less strict in comparing upgrade crafting items
We currently generate the crafting item once when the upgrade is first
created, and cache it for the duration of the game. As the item never
changes throughout the game, and constructing a stack is a little
expensive (we need to fire an event, etc...), the caching is worth
having.

However, some mods may register capabilities after we've constructed our
ItemStack. This means the capability will be present on other items but
not ours, meaning they are not considered equivalent, and thus the item
cannot be equipped.

In order to avoid this, we use compare items using their share-tag, like
Forge's IngredientNBT. This means the items must still be "mostly" the
same (same enchantements, etc...), but allow differing capabilities.

See NillerMedDild/Enigmatica2Expert#655 for the original bug report -
in this case, Astral Sourcery was registering the capability in init,
but we construct upgrades just before then.
2019-01-19 21:57:21 +00:00
..
Colour.java Happy new year! 2019-01-01 01:10:18 +00:00
ColourTracker.java Happy new year! 2019-01-01 01:10:18 +00:00
ColourUtils.java Happy new year! 2019-01-01 01:10:18 +00:00
CreativeTabMain.java Happy new year! 2019-01-01 01:10:18 +00:00
CreativeTabTreasure.java Happy new year! 2019-01-01 01:10:18 +00:00
DefaultInventory.java Happy new year! 2019-01-01 01:10:18 +00:00
DefaultSidedInventory.java Happy new year! 2019-01-01 01:10:18 +00:00
DirectionUtil.java Add back several more methods for Plethora 2019-01-05 20:57:32 +00:00
DropConsumer.java Utilise @Mod.EventBusSubscriber a little more 2019-01-12 16:27:40 +00:00
Holiday.java Happy new year! 2019-01-01 01:10:18 +00:00
HolidayUtil.java Happy new year! 2019-01-01 01:10:18 +00:00
IDAssigner.java Even more proxy pruning 2019-01-12 18:23:22 +00:00
ImpostorRecipe.java Happy new year! 2019-01-01 01:10:18 +00:00
ImpostorShapelessRecipe.java Happy new year! 2019-01-01 01:10:18 +00:00
InventoryUtil.java Be less strict in comparing upgrade crafting items 2019-01-19 21:57:21 +00:00
IoUtil.java WIP: Http rework (#98) 2019-01-11 11:33:05 +00:00
NBTUtil.java Happy new year! 2019-01-01 01:10:18 +00:00
Palette.java Happy new year! 2019-01-01 01:10:18 +00:00
RecipeUtil.java Happy new year! 2019-01-01 01:10:18 +00:00
RecordUtil.java Move our message model to be closer to Forge's 2019-01-14 10:09:22 +00:00
RedstoneUtil.java Add back several more methods for Plethora 2019-01-05 20:57:32 +00:00
StringUtil.java Happy new year! 2019-01-01 01:10:18 +00:00
ThreadUtils.java Happy new year! 2019-01-01 01:10:18 +00:00
WorldUtil.java Add back several more methods for Plethora 2019-01-05 20:57:32 +00:00