package net.mcreator.puzzle_code.procedures;

import net.minecraft.core.Direction;

public class GetYOffsetSystemProcedure {
	public static double execute(double y, Direction Direction, String Offset) {
		if (Direction == null || Offset == null)
			return 0;
		if ((Offset).equals("Back")) {
			return y + (Direction.getOpposite()).getStepY();
		} else if ((Offset).equals("Front")) {
			return y + Direction.getStepY();
		} else if ((Offset).equals("North")) {
			return y + Direction.NORTH.getStepY();
		} else if ((Offset).equals("South")) {
			return y + Direction.SOUTH.getStepY();
		} else if ((Offset).equals("East")) {
			return y + Direction.WEST.getStepY();
		} else if ((Offset).equals("West")) {
			return y + Direction.EAST.getStepY();
		}
		return y + Direction.getStepY();
	}
}
