mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-15 21:31:05 +00:00
mixin maintenance
This commit is contained in:
+1
-7
@@ -20,12 +20,6 @@ public abstract class ItemStackMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
public abstract net.minecraft.item.Item getItem();
|
public abstract net.minecraft.item.Item getItem();
|
||||||
|
|
||||||
@Shadow
|
|
||||||
public abstract boolean isDamageable();
|
|
||||||
|
|
||||||
@Shadow
|
|
||||||
public abstract ItemStack copy();
|
|
||||||
|
|
||||||
public int terra$getAmount() {
|
public int terra$getAmount() {
|
||||||
return getCount();
|
return getCount();
|
||||||
}
|
}
|
||||||
@@ -34,7 +28,7 @@ public abstract class ItemStackMixin {
|
|||||||
setCount(i);
|
setCount(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getType() {
|
public Item terra$getType() {
|
||||||
return (Item) getItem();
|
return (Item) getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -8,6 +8,7 @@ import net.minecraft.nbt.ListTag;
|
|||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import org.spongepowered.asm.mixin.Implements;
|
import org.spongepowered.asm.mixin.Implements;
|
||||||
import org.spongepowered.asm.mixin.Interface;
|
import org.spongepowered.asm.mixin.Interface;
|
||||||
|
import org.spongepowered.asm.mixin.Intrinsic;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ public abstract class ItemStackMetaMixin {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Intrinsic(displace = true)
|
||||||
public Map<Enchantment, Integer> terra$getEnchantments() {
|
public Map<Enchantment, Integer> terra$getEnchantments() {
|
||||||
if(!hasEnchantments()) return Collections.emptyMap();
|
if(!hasEnchantments()) return Collections.emptyMap();
|
||||||
Map<Enchantment, Integer> map = new HashMap<>();
|
Map<Enchantment, Integer> map = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user