mixin maintenance

This commit is contained in:
dfsek 2021-05-03 20:12:48 -07:00
parent a30859a3d4
commit 6209b86560
2 changed files with 3 additions and 7 deletions

View File

@ -20,12 +20,6 @@ public abstract class ItemStackMixin {
@Shadow
public abstract net.minecraft.item.Item getItem();
@Shadow
public abstract boolean isDamageable();
@Shadow
public abstract ItemStack copy();
public int terra$getAmount() {
return getCount();
}
@ -34,7 +28,7 @@ public abstract class ItemStackMixin {
setCount(i);
}
public Item getType() {
public Item terra$getType() {
return (Item) getItem();
}

View File

@ -8,6 +8,7 @@ import net.minecraft.nbt.ListTag;
import net.minecraft.util.registry.Registry;
import org.spongepowered.asm.mixin.Implements;
import org.spongepowered.asm.mixin.Interface;
import org.spongepowered.asm.mixin.Intrinsic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -31,6 +32,7 @@ public abstract class ItemStackMetaMixin {
return this;
}
@Intrinsic(displace = true)
public Map<Enchantment, Integer> terra$getEnchantments() {
if(!hasEnchantments()) return Collections.emptyMap();
Map<Enchantment, Integer> map = new HashMap<>();