#705: Improve implementation of furnace related block states
CraftFurnace is the base class for all concrete types of furnaces (this mimics Minecraft's underlying type hierarchy). It is marked as abstract now to avoid accidental instantiation. Also, the various furnace sub types were missing type parameters. By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
@@ -5,7 +5,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.BlastFurnace;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
public class CraftBlastFurnace extends CraftFurnace implements BlastFurnace {
|
||||
public class CraftBlastFurnace extends CraftFurnace<TileEntityBlastFurnace> implements BlastFurnace {
|
||||
|
||||
public CraftBlastFurnace(Block block) {
|
||||
super(block, TileEntityBlastFurnace.class);
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.bukkit.block.Furnace;
|
||||
import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
|
||||
import org.bukkit.inventory.FurnaceInventory;
|
||||
|
||||
public class CraftFurnace<T extends TileEntityFurnace> extends CraftContainer<T> implements Furnace {
|
||||
public abstract class CraftFurnace<T extends TileEntityFurnace> extends CraftContainer<T> implements Furnace {
|
||||
|
||||
public CraftFurnace(Block block, Class<T> tileEntityClass) {
|
||||
super(block, tileEntityClass);
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.server.TileEntityFurnaceFurnace;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
public class CraftFurnaceFurnace extends CraftFurnace {
|
||||
public class CraftFurnaceFurnace extends CraftFurnace<TileEntityFurnaceFurnace> {
|
||||
|
||||
public CraftFurnaceFurnace(Block block) {
|
||||
super(block, TileEntityFurnaceFurnace.class);
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Smoker;
|
||||
|
||||
public class CraftSmoker extends CraftFurnace implements Smoker {
|
||||
public class CraftSmoker extends CraftFurnace<TileEntitySmoker> implements Smoker {
|
||||
|
||||
public CraftSmoker(Block block) {
|
||||
super(block, TileEntitySmoker.class);
|
||||
|
||||
Reference in New Issue
Block a user