dev.creoii.creoapi.mixin.block.EntityMixin Maven / Gradle / Ivy
package dev.creoii.creoapi.mixin.block;
import dev.creoii.creoapi.impl.block.BlockImpl;
import net.minecraft.class_1297;
import net.minecraft.class_1313;
import net.minecraft.class_243;
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;
@Mixin(class_1297.class)
public abstract class EntityMixin {
@Inject(method = "baseTick", at = @At("TAIL"))
private void creo$lookAtBlock(CallbackInfo ci) {
BlockImpl.applyLookAtBlock((class_1297) (Object) this);
}
@Inject(method = "move", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;pop()V", ordinal = 2))
private void creo$collideAdjacentBlock(class_1313 movementType, class_243 movement, CallbackInfo ci) {
BlockImpl.applyCollideAdjacent((class_1297) (Object) this);
}
}