package net.mcreator.puzzle_code.procedures;

import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.Entity;
import net.minecraft.client.gui.components.EditBox;

import net.mcreator.puzzle_code.network.PuzzleCodeModVariables;

import java.util.HashMap;

public class PositionSetPastePos2Procedure {
	public static void execute(LevelAccessor world, Entity entity, HashMap guistate) {
		if (entity == null || guistate == null)
			return;
		SetNBTNumberSystemProcedure.execute(world, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetXPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetYPos,
				entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetZPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetXPos2,
				"x1" + (guistate.containsKey("text:setNBTField") ? ((EditBox) guistate.get("text:setNBTField")).getValue() : ""));
		SetNBTNumberSystemProcedure.execute(world, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetXPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetYPos,
				entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetZPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetYPos2,
				"y1" + (guistate.containsKey("text:setNBTField") ? ((EditBox) guistate.get("text:setNBTField")).getValue() : ""));
		SetNBTNumberSystemProcedure.execute(world, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetXPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetYPos,
				entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetZPos, entity.getData(PuzzleCodeModVariables.PLAYER_VARIABLES).positionSetZPos2,
				"z1" + (guistate.containsKey("text:setNBTField") ? ((EditBox) guistate.get("text:setNBTField")).getValue() : ""));
	}
}
