mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-10-01 00:10:47 +00:00
0ce67afcc1
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. |
||
---|---|---|
.. | ||
Colour.java | ||
ColourTracker.java | ||
ColourUtils.java | ||
CreativeTabMain.java | ||
CreativeTabTreasure.java | ||
DefaultInventory.java | ||
DefaultSidedInventory.java | ||
DirectionUtil.java | ||
DropConsumer.java | ||
Holiday.java | ||
HolidayUtil.java | ||
IDAssigner.java | ||
ImpostorRecipe.java | ||
ImpostorShapelessRecipe.java | ||
InventoryUtil.java | ||
IoUtil.java | ||
NBTUtil.java | ||
Palette.java | ||
RecipeUtil.java | ||
RecordUtil.java | ||
RedstoneUtil.java | ||
StringUtil.java | ||
ThreadUtils.java | ||
WorldUtil.java |