// Path: HexBoxServer/src/com/hexabeast/hexboxserver/NBlockModification.java
// public class NBlockModification {
// 	public int x;
// 	public int y;
// 	
// 	public int id;
// 	
// 	
// 	public boolean layer;
// }


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.hexabeast.hexboxserver.NBlockModification;
		newCellType = AllBlocTypes.instance.getType(newCell);
		
		if(!isThereObstacle(newCellType.collide) || (layer == Map.instance.backLayer))// && !isThereObstacleHouse()) )
		{
			

			//IS OBSIDIAN = NO ACTION
			if(!getCell(layer,decalaX+0,decalaY+0).unbreakable && (!AllBlocTypes.instance.getType(newCell).needBack || getCell(Map.instance.backLayer,decalaX+0,decalaY+0).collide))
			{
				float ratePose2 = ratePose;
				if(Parameters.i.ultrarate)ratePose2/=100;
				//IS PLACING TILE
				if(time>lastTimePose+ratePose2 && getCell(layer,decalaX+0,decalaY+0).air && !newCellType.air)// && (true || layer != oldLayer || decalaX != oldclicPos.x || decalaY != oldclicPos.y))
				{
					lastTimePose = time;
					setBlock(decalaX, decalaY, newCell, layer);
					if(normalWay)GameScreen.inventory.invItemsArray[selectorId][0].number--;
					Tools.checkItems();
					success = true;
				}
			}
			oldnewCell = newCell;
		}
		return success;
	}
	
	public void setBlock(int x, int y, int id, MapLayer layer)
	{
		if(NetworkManager.instance.online)
		{
// Path: HexBoxServer/src/com/hexabeast/hexboxserver/NBlockModification.java
// public class NBlockModification {
// 	public int x;
// 	public int y;
// 	
// 	public int id;
// 	
// 	
// 	public boolean layer;
// }


// Path: core/src/com/hexabeast/sandbox/ModifyTerrain.java
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.hexabeast.hexboxserver.NBlockModification;

		newCellType = AllBlocTypes.instance.getType(newCell);
		
		if(!isThereObstacle(newCellType.collide) || (layer == Map.instance.backLayer))// && !isThereObstacleHouse()) )
		{
			

			//IS OBSIDIAN = NO ACTION
			if(!getCell(layer,decalaX+0,decalaY+0).unbreakable && (!AllBlocTypes.instance.getType(newCell).needBack || getCell(Map.instance.backLayer,decalaX+0,decalaY+0).collide))
			{
				float ratePose2 = ratePose;
				if(Parameters.i.ultrarate)ratePose2/=100;
				//IS PLACING TILE
				if(time>lastTimePose+ratePose2 && getCell(layer,decalaX+0,decalaY+0).air && !newCellType.air)// && (true || layer != oldLayer || decalaX != oldclicPos.x || decalaY != oldclicPos.y))
				{
					lastTimePose = time;
					setBlock(decalaX, decalaY, newCell, layer);
					if(normalWay)GameScreen.inventory.invItemsArray[selectorId][0].number--;
					Tools.checkItems();
					success = true;
				}
			}
			oldnewCell = newCell;
		}
		return success;
	}
	
	public void setBlock(int x, int y, int id, MapLayer layer)
	{
		if(NetworkManager.instance.online)
		{
			NBlockModification nn = new NBlockModification();