package de.st_ddt.crazyutil.geo.block;

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;

import de.st_ddt.crazyutil.geo.location.GeoLocation;

public class GeoBlock extends GeoLocation
{

	protected Material material;
	protected byte data;

	// protected BlockState state;
	public GeoBlock(final Block block)
	{
		super(block.getX(), block.getY(), block.getZ());
		material = block.getType();
		data = block.getData();
		// state = block.getState();
	}

	public void apply(final Location target, final boolean physics)
	{
		final Block block = target.clone().add(x, y, z).getBlock();
		block.setTypeIdAndData(material.getId(), data, physics);
	}
}

package de.st_ddt.crazyutil.geo.block;

import org.bukkit.Location;
import org.bukkit.block.Block;

import de.st_ddt.crazyutil.geo.location.GeoLocation;

public class GeoBlock extends GeoLocation
{

	protected int material;
	protected byte data;

	// protected BlockState state;
	public GeoBlock(final Block block)
	{
		super(block.getX(), block.getY(), block.getZ());
		material = block.getTypeId();
		data = block.getData();
		// state = block.getState();
	}

	public void apply(final Location target, final boolean physics)
	{
		final Block block = target.clone().add(x, y, z).getBlock();
		block.setTypeIdAndData(material, data, physics);
	}
}

--- 
+++ 
@@ -1,6 +1,7 @@
 package de.st_ddt.crazyutil.geo.block;
 
 import org.bukkit.Location;
+import org.bukkit.Material;
 import org.bukkit.block.Block;
 
 import de.st_ddt.crazyutil.geo.location.GeoLocation;
@@ -8,14 +9,14 @@
 public class GeoBlock extends GeoLocation
 {
 
-	protected int material;
+	protected Material material;
 	protected byte data;
 
 	// protected BlockState state;
 	public GeoBlock(final Block block)
 	{
 		super(block.getX(), block.getY(), block.getZ());
-		material = block.getTypeId();
+		material = block.getType();
 		data = block.getData();
 		// state = block.getState();
 	}
@@ -23,6 +24,6 @@
 	public void apply(final Location target, final boolean physics)
 	{
 		final Block block = target.clone().add(x, y, z).getBlock();
-		block.setTypeIdAndData(material, data, physics);
+		block.setTypeIdAndData(material.getId(), data, physics);
 	}
 }
Store Material instead of materialid