dev.creoii.creoapi.mixin.block.StructureTemplateMixin Maven / Gradle / Ivy
package dev.creoii.creoapi.mixin.block;
import com.llamalad7.mixinextras.sugar.Local;
import dev.creoii.creoapi.impl.block.BlockImpl;
import net.minecraft.class_2338;
import net.minecraft.class_3341;
import net.minecraft.class_3492;
import net.minecraft.class_3499;
import net.minecraft.class_3610;
import net.minecraft.class_5425;
import net.minecraft.class_5819;
import org.spongepowered.asm.mixin.Debug;
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;
@Debug(export = true)
@Mixin(class_3499.class)
public class StructureTemplateMixin {
@Inject(method = "place", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", ordinal = 0))
private void creo$applyOnPlacedByStructureB(class_5425 world, class_2338 pos, class_2338 pivot, class_3492 placementData, class_5819 random, int flags, CallbackInfoReturnable cir, @Local class_3341 blockBox, @Local class_3499.class_3501 structureBlockInfo, @Local class_3610 fluidState) {
BlockImpl.applyOnPlacedByStructure(world, pivot, placementData, random, structureBlockInfo, structureBlockInfo.comp_1341(), fluidState, structureBlockInfo.comp_1342(), (class_3499) (Object) this);
}
}