[26.1] IItemStackExtension to ItemInstanceExtension pass#3071
Draft
ApexModder wants to merge 55 commits into
Draft
[26.1] IItemStackExtension to ItemInstanceExtension pass#3071ApexModder wants to merge 55 commits into
ApexModder wants to merge 55 commits into
Conversation
|
|
@ApexModder, this PR introduces breaking changes. Compatibility checks
|
XFactHD
requested changes
Apr 8, 2026
Member
XFactHD
left a comment
There was a problem hiding this comment.
These moves need more justification, it feels like some are being moved just for the sake of it, at the cost of more patching overhead
Introduce `isDamageable` extension
Introduce `isEnchanted` extension Note: This extension is not used anywhere currently, did the patches get lost during some port?
54557db to
38f3295
Compare
Member
Author
|
Converted back to draft to remain as reference material for when this is eventually taken up and implemented. |
Contributor
|
@ApexModder, this pull request has conflicts, please resolve them for this PR to move forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR does a pass over all our
IItemStackExtensionand moves what we can toItemInstanceExtensionThe following has currently been moved upstream
getCraftingRemaindergetBurnTimeIItemStackExtensionto ensure empty stacks continue to return0, templates do not support being "empty"FuelValues.burnDuration(ItemInstance)overloadgetEquipmentSlotgetEntityLifespangetXpRepairRatiocanEquipItemInstancesensitive overload forLivingEntity.isEquippableInSlot, vanilla was patched to call this new overloaddoesSneakBypassUseisPiglinCurrencymakesPiglinsNeutralisGazeDisguisecanWalkOnPowderedSnowgetSweepHitBoxcanGrindstoneRepairgetAttributeModifierscanFitInsideContainerItemsisPrimaryItemForandsupportsEnchantmentEnchantment.isSupportedItem(ItemInstance)overloadgetAllEnchantmentsisCombineRepairableisDamageableItemInstanceextensionisNotReplaceableByPickActionisEnchantedItemInstanceextensiongetHighlightTipTroublesome extensions
shouldCauseBlockBreakResetItemInstance/ItemStackTemplateand aDataComponentMapgetterVarious callers have also been updated to call the
ItemInstanceextensionFor example the
getCraftingRemainderpatch inAbstractFurnaceBlockEntitypreviously this calledItem.getCraftingRemainder()now it callsItemInstance.getCraftingRemainder().