Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiewuzhiying committed Aug 4, 2024
1 parent ef3b246 commit 0b52cfa
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package io.github.xiewuzhiying.vs_addition.mixin.create.fan;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.simibubi.create.content.kinetics.fan.NozzleBlockEntity;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import io.github.xiewuzhiying.vs_addition.util.TransformUtils;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Vec3i;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
Expand All @@ -20,8 +18,8 @@ public abstract class MixinNozzleBlockEntity extends SmartBlockEntity {
public MixinNozzleBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
}
@WrapOperation(method = {"tick","lazyTick","canSee"},at = @At(value = "INVOKE", target = "Lcom/simibubi/create/foundation/utility/VecHelper;getCenterOf(Lnet/minecraft/core/Vec3i;)Lnet/minecraft/world/phys/Vec3;"))
private Vec3 transformToWorldPos(Vec3i pos, Operation<Vec3> original){
return TransformUtils.toWorldVec3(this.level,TransformUtils.getCenterOf(pos));
@ModifyExpressionValue(method = {"tick","lazyTick","canSee"},at = @At(value = "INVOKE", target = "Lcom/simibubi/create/foundation/utility/VecHelper;getCenterOf(Lnet/minecraft/core/Vec3i;)Lnet/minecraft/world/phys/Vec3;"))
private Vec3 transformToWorldPos(Vec3 original){
return TransformUtils.toWorldVec3(this.level, original);
}
}

0 comments on commit 0b52cfa

Please sign in to comment.