Skip to content

Commit

Permalink
Port changes to 1.18 & 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksilassila committed Dec 8, 2022
1 parent fa3beaf commit a0bac3d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.aleksilassila.litematica.printer.v1_18.mixin;

import net.minecraft.block.Block;
import net.minecraft.item.AxeItem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import java.util.Map;

/**
* This class apparently fixes an issue with Quilt.
*/
@Mixin(AxeItem.class)
public interface AxeItemAccessor {
@Accessor("STRIPPED_BLOCKS")
static Map<Block, Block> getStrippedBlocks() {
throw new AssertionError("Untransformed @Accessor");
}

}
3 changes: 2 additions & 1 deletion v1_18/src/main/resources/litematica-printer.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"ConfigsMixin",
"GuiConfigsMixin",
"InputHandlerMixin",
"PlayerMoveC2SPacketMixin"
"PlayerMoveC2SPacketMixin",
"AxeItemAccessor"
],
"injectors": {
"defaultRequire": 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.aleksilassila.litematica.printer.v1_19.mixin;

import net.minecraft.block.Block;
import net.minecraft.item.AxeItem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import java.util.Map;

/**
* This class apparently fixes an issue with Quilt.
*/
@Mixin(AxeItem.class)
public interface AxeItemAccessor {
@Accessor("STRIPPED_BLOCKS")
static Map<Block, Block> getStrippedBlocks() {
throw new AssertionError("Untransformed @Accessor");
}

}
3 changes: 2 additions & 1 deletion v1_19/src/main/resources/litematica-printer.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"ConfigsMixin",
"GuiConfigsMixin",
"InputHandlerMixin",
"PlayerMoveC2SPacketMixin"
"PlayerMoveC2SPacketMixin",
"AxeItemAccessor"
],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit a0bac3d

Please sign in to comment.