mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-24 05:54:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0df1a2444 |
No files matched your search
+2
-2
@@ -2,7 +2,7 @@
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.9.31:dev")
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev')
|
||||
compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.6.0:dev')
|
||||
compileOnly('com.falsepattern:endlessids-mc1.7.10:1.6.0:dev')
|
||||
compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.8.2:dev')
|
||||
compileOnly('com.falsepattern:endlessids-mc1.7.10:1.7.1:dev')
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.71-GTNH:dev") { transitive = false }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.gtnewhorizons.postea.mixins;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.gtnewhorizon.gtnhmixins.ILateMixinLoader;
|
||||
import com.gtnewhorizon.gtnhmixins.LateMixin;
|
||||
|
||||
@LateMixin
|
||||
public final class PosteaLateLoadingPlugin implements ILateMixinLoader {
|
||||
|
||||
@Override
|
||||
public String getMixinConfig() {
|
||||
return "mixins.postea.late.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getMixins(Set<String> loadedMods) {
|
||||
final List<String> mixins = new ArrayList<>();
|
||||
if (loadedMods.contains("chunkapi")) {
|
||||
mixins.add("MixinDataRegistryImpl");
|
||||
}
|
||||
return mixins;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public abstract class MixinAnvilChunkLoader {
|
||||
ChunkFixerUtility.onChunkLoaded(cir.getReturnValue());
|
||||
}
|
||||
|
||||
@Inject(method = "writeChunkToNBT", at = @At("HEAD"))
|
||||
@Inject(method = "writeChunkToNBT", at = @At("HEAD"), order = 900)
|
||||
private void postea$writePosteaChunkCode(Chunk chunk, World world, NBTTagCompound nbtTagCompound, CallbackInfo ci) {
|
||||
ChunkFixerUtility.onChunkWrite(chunk, nbtTagCompound);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.gtnewhorizons.postea.mixins.late;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
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;
|
||||
|
||||
import com.falsepattern.chunk.internal.DataRegistryImpl;
|
||||
import com.gtnewhorizons.postea.utility.ChunkFixerUtility;
|
||||
|
||||
@Mixin(value = DataRegistryImpl.class, remap = false)
|
||||
public abstract class MixinDataRegistryImpl {
|
||||
|
||||
@Inject(
|
||||
method = "readChunkFromNBT(Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/nbt/NBTTagCompound;)V",
|
||||
at = @At("RETURN"),
|
||||
require = 1)
|
||||
private static void Postea$chunkReadHook(Chunk chunk, NBTTagCompound chunkNBT, CallbackInfo ci) {
|
||||
ChunkFixerUtility.onChunkRead(chunk, chunk.worldObj, chunkNBT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8.5-GTNH",
|
||||
"package": "com.gtnewhorizons.postea.mixins.late",
|
||||
"refmap": "mixins.postea.refmap.json",
|
||||
"target": "@env(DEFAULT)",
|
||||
"compatibilityLevel": "JAVA_8"
|
||||
}
|
||||
Reference in new issue
Block a user