mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-24 05:54:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82349735e4 |
@@ -12,16 +12,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
import com.gtnewhorizons.postea.utility.ChunkFixerUtility;
|
import com.gtnewhorizons.postea.utility.ChunkFixerUtility;
|
||||||
import com.llamalad7.mixinextras.sugar.Local;
|
|
||||||
|
|
||||||
@Mixin(value = AnvilChunkLoader.class, priority = 1100)
|
@Mixin(value = AnvilChunkLoader.class, priority = 1100)
|
||||||
public abstract class MixinAnvilChunkLoader {
|
public abstract class MixinAnvilChunkLoader {
|
||||||
|
|
||||||
// This hook is compatible with Vanilla/NEID/EIDs
|
// This hook is compatible with Vanilla/NEID/EIDs
|
||||||
@Inject(method = "readChunkFromNBT", at = @At("RETURN"), require = 1)
|
@Inject(method = "readChunkFromNBT", at = @At("RETURN"), require = 1)
|
||||||
private void postea$chunkHook(CallbackInfoReturnable<Chunk> cir, @Local Chunk chunk,
|
private void postea$chunkHook(World world, NBTTagCompound tag, CallbackInfoReturnable<Chunk> cir) {
|
||||||
@Local(argsOnly = true) World world, @Local(ordinal = 0, argsOnly = true) NBTTagCompound tag) {
|
ChunkFixerUtility.onChunkRead(cir.getReturnValue(), world, tag);
|
||||||
ChunkFixerUtility.onChunkRead(chunk, world, tag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "loadChunk", at = @At("RETURN"))
|
@Inject(method = "loadChunk", at = @At("RETURN"))
|
||||||
|
|||||||
Reference in new issue
Block a user