mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 22:31:52 +00:00
fix refmap issues
This commit is contained in:
@@ -33,7 +33,7 @@ dependencies {
|
|||||||
|
|
||||||
configure<LoomGradleExtension> {
|
configure<LoomGradleExtension> {
|
||||||
accessWidener("src/main/resources/terra.accesswidener")
|
accessWidener("src/main/resources/terra.accesswidener")
|
||||||
refmapName = "terra.refmap.json"
|
refmapName = "terra-refmap.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ public abstract class EntityMixin {
|
|||||||
teleport(location.getX(), location.getY(), location.getZ());
|
teleport(location.getX(), location.getY(), location.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public World getWorld() {
|
public World terra$getWorld() {
|
||||||
return (World) world;
|
return (World) world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
@@ -5,6 +5,7 @@ import com.dfsek.terra.api.platform.inventory.item.ItemMeta;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
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;
|
||||||
|
|
||||||
@@ -20,6 +21,9 @@ 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();
|
||||||
|
|
||||||
public int terra$getAmount() {
|
public int terra$getAmount() {
|
||||||
return getCount();
|
return getCount();
|
||||||
}
|
}
|
||||||
@@ -43,4 +47,9 @@ public abstract class ItemStackMixin {
|
|||||||
public Object terra$getHandle() {
|
public Object terra$getHandle() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Intrinsic
|
||||||
|
public boolean terra$isDamageable() {
|
||||||
|
return isDamageable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -4,6 +4,7 @@ import com.dfsek.terra.api.platform.inventory.item.Damageable;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
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;
|
||||||
|
|
||||||
@@ -13,7 +14,23 @@ public abstract class ItemStackDamageableMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
public abstract boolean isDamaged();
|
public abstract boolean isDamaged();
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
public abstract int getDamage();
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
public abstract void setDamage(int damage);
|
||||||
|
|
||||||
public boolean terra$hasDamage() {
|
public boolean terra$hasDamage() {
|
||||||
return isDamaged();
|
return isDamaged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Intrinsic
|
||||||
|
public void terra$setDamage(int damage) {
|
||||||
|
setDamage(damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Intrinsic
|
||||||
|
public int terra$getDamage() {
|
||||||
|
return getDamage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -18,6 +18,7 @@ import net.minecraft.world.ServerWorldAccess;
|
|||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
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;
|
||||||
|
|
||||||
@@ -28,6 +29,10 @@ public abstract class ChunkRegionMixin {
|
|||||||
@Final
|
@Final
|
||||||
private ServerWorld world;
|
private ServerWorld world;
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
@Final
|
||||||
|
private long seed;
|
||||||
|
|
||||||
public int terra$getMaxHeight() {
|
public int terra$getMaxHeight() {
|
||||||
return ((ChunkRegion) (Object) this).getDimensionHeight();
|
return ((ChunkRegion) (Object) this).getDimensionHeight();
|
||||||
}
|
}
|
||||||
@@ -53,6 +58,11 @@ public abstract class ChunkRegionMixin {
|
|||||||
return (Entity) entity;
|
return (Entity) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Intrinsic
|
||||||
|
public long terra$getSeed() {
|
||||||
|
return seed;
|
||||||
|
}
|
||||||
|
|
||||||
public int terra$getMinHeight() {
|
public int terra$getMinHeight() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -16,11 +16,16 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.world.ServerWorldAccess;
|
import net.minecraft.world.ServerWorldAccess;
|
||||||
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;
|
||||||
|
|
||||||
@Mixin(ServerWorld.class)
|
@Mixin(ServerWorld.class)
|
||||||
@Implements(@Interface(iface = World.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = World.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class ServerWorldMixin {
|
public abstract class ServerWorldMixin {
|
||||||
|
@Shadow
|
||||||
|
public abstract long getSeed();
|
||||||
|
|
||||||
public int terra$getMaxHeight() {
|
public int terra$getMaxHeight() {
|
||||||
return ((ServerWorld) (Object) this).getDimensionHeight();
|
return ((ServerWorld) (Object) this).getDimensionHeight();
|
||||||
}
|
}
|
||||||
@@ -44,6 +49,11 @@ public abstract class ServerWorldMixin {
|
|||||||
return (Entity) entity;
|
return (Entity) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Intrinsic
|
||||||
|
public long terra$getSeed() {
|
||||||
|
return getSeed();
|
||||||
|
}
|
||||||
|
|
||||||
public int terra$getMinHeight() {
|
public int terra$getMinHeight() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ apply(plugin = "net.minecraftforge.gradle")
|
|||||||
apply(plugin = "org.spongepowered.mixin")
|
apply(plugin = "org.spongepowered.mixin")
|
||||||
|
|
||||||
configure<org.spongepowered.asm.gradle.plugins.MixinExtension> {
|
configure<org.spongepowered.asm.gradle.plugins.MixinExtension> {
|
||||||
add(sourceSets.main.get(), "terra.refmap.json")
|
add(sourceSets.main.get(), "terra-refmap.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.dfsek.terra.forge.mixin",
|
"package": "com.dfsek.terra.forge.mixin",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"refmap": "terra.refmap.json",
|
"refmap": "terra-refmap.json",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
|
|||||||
Reference in New Issue
Block a user