All Downloads are FREE. Search and download functionalities are using the official Maven repository.

personthecat.catlib.mixin.ChunkStatusMixin Maven / Gradle / Ivy

Go to download

Utilities for serialization, commands, noise generation, IO, and some new data types.

The newest version!
package personthecat.catlib.mixin;

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.CallbackInfoReturnable;
import personthecat.catlib.util.DimInjector;

import java.util.List;
import java.util.concurrent.Executor;
import java.util.function.Function;
import net.minecraft.class_2791;
import net.minecraft.class_2794;
import net.minecraft.class_2806;
import net.minecraft.class_3218;
import net.minecraft.class_3227;
import net.minecraft.class_3485;

@Mixin(value = class_2806.class)
public class ChunkStatusMixin {

    @Inject(method = "generate", at = @At("HEAD"))
    public void injectDims(
            Executor e, class_3218 l, class_2794 g, class_3485 s,
            class_3227 le, Function f, List chunks,
            boolean b, CallbackInfoReturnable cir) {
        chunks.forEach(chunk -> DimInjector.setType(chunk, l.method_8597()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy