generated from JamCoreModding/multi-loader-template-mod
-
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.
feat: datafixer for componentization
1.20.6 release is waiting on Trinkets release
- Loading branch information
1 parent
3c484ef
commit d9a0be8
Showing
9 changed files
with
53 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
- Remove the Baubly dependency | ||
- This also fixes #42 | ||
- Drop Forge and Quilt support (see Discord for reasoning). This was done pre-1.20.6 to reduce the | ||
work needed to remove Baubly. | ||
- Port to 1.20.6 | ||
- It should be safe to update worlds from 1.20.4 to 1.20.6 **ON FABRIC** as a datafixer has been | ||
implemented | ||
to migrate from NBT to components, but as always make a backup in case. | ||
- If [Curios#411](https://github.com/TheIllusiveC4/Curios/issues/411) is implemented, it will be | ||
safe to do so on Neoforge. For now, upgrading Neoforge worlds **WILL CAUSE LOSS OF ITEMS IN | ||
THE BELT**. |
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
24 changes: 24 additions & 0 deletions
24
.../io/github/jamalam360/utility_belt/mixin/datafixer/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,24 @@ | ||
package io.github.jamalam360.utility_belt.mixin.datafixer; | ||
|
||
import com.mojang.serialization.Dynamic; | ||
import io.github.jamalam360.utility_belt.UtilityBelt; | ||
import java.util.stream.Stream; | ||
import net.minecraft.util.datafix.fixes.ItemStackComponentizationFix; | ||
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 = "fixItemStack", | ||
at = @At("TAIL") | ||
) | ||
private static void utilitybelt$moveNbtToComponent(ItemStackComponentizationFix.ItemStackData itemStackData, Dynamic<?> dynamic, CallbackInfo ci) { | ||
if (itemStackData.is(UtilityBelt.id("utility_belt").toString())) { | ||
System.out.println("fixed belt"); | ||
itemStackData.moveTagToComponent("Inventory", "utility_belt:utility_belt_inventory", dynamic.createList(Stream.empty())); | ||
} | ||
} | ||
} |
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,3 @@ | ||
{ | ||
"accessWidener": "utility_belt.accesswidener" | ||
} |
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,3 @@ | ||
accessWidener v2 named | ||
|
||
accessible class net/minecraft/util/datafix/fixes/ItemStackComponentizationFix$ItemStackData |
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
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