public Resource gatherResources(World world, int x, int y, int amount) {
		if(x >= world.width || x < 0 || y >= world.height || y < 0 || world.getTile(x, y).id != this.getID()) return null;
		
		int available = getResources(world, x, y);
		int newAmount = available - amount; if(newAmount < 0) newAmount = 0;
		int gathered = available - newAmount;
		
		world.setMetadata(x, y, 0, newAmount);
		if(newAmount == 0)
			world.setTile(x, y, 0);
		
		return new Resource(this.resource, gathered);		
	}