-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
21 changes: 21 additions & 0 deletions
21
src/main/java/net/pitan76/storagebox/mixin/ItemStackComponentizationFixMixin.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.pitan76.storagebox.mixin; | ||
|
||
import com.mojang.serialization.Dynamic; | ||
import net.minecraft.datafixer.fix.ItemStackComponentizationFix; | ||
import net.pitan76.storagebox.StorageBoxMod; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(ItemStackComponentizationFix.class) | ||
public class ItemStackComponentizationFixMixin { | ||
@Inject(method = "fixStack", at = @At("TAIL")) | ||
private static void storagebox$fixStack(ItemStackComponentizationFix.StackData data, Dynamic<?> dynamic, CallbackInfo ci) { | ||
if (data.itemEquals("storagebox:storagebox")) { | ||
data.moveToComponent("StorageSize", StorageBoxMod.id("size").toString()); | ||
data.moveToComponent("StorageAuto", StorageBoxMod.id("auto").toString()); | ||
data.moveToComponent("StorageItemData", StorageBoxMod.id("item_data").toString()); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
accessWidener v1 named | ||
accessible class net/minecraft/datafixer/fix/ItemStackComponentizationFix$StackData |
This file contains 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