Move engine blocks to PluginEnergy.blocks

This commit is contained in:
mezz committed 2015-11-19 01:04:38 -08:00
1 parent 10e5391f48
commit ce2a2ec8ed
32 files changed
+313 -191

No files matched your search

@@ -10,17 +10,10 @@
******************************************************************************/
package forestry.factory.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import forestry.core.blocks.BlockBase;
public class BlockFactoryPlain extends BlockBase {
public class BlockFactoryPlain extends BlockBase<BlockFactoryPlainType> {
public BlockFactoryPlain() {
super(Material.iron);
}
public ItemStack get(BlockFactoryPlainType type) {
return new ItemStack(this, 1, type.ordinal());
super();
}
}
@@ -50,9 +50,4 @@ public enum BlockFactoryPlainType implements IMachineProperties {
public Class<? extends TileForestry> getTeClass() {
return teClass;
}
@Override
public String getGfxBase() {
return null;
}
}
@@ -10,17 +10,10 @@
******************************************************************************/
package forestry.factory.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import forestry.core.blocks.BlockBase;
public class BlockFactoryTesr extends BlockBase {
public class BlockFactoryTesr extends BlockBase<BlockFactoryTesrType> {
public BlockFactoryTesr() {
super(Material.iron, true);
}
public ItemStack get(BlockFactoryTesrType type) {
return new ItemStack(this, 1, type.ordinal());
super(true);
}
}
@@ -14,8 +14,10 @@ import java.util.Locale;
import org.apache.commons.lang3.text.WordUtils;
import forestry.core.blocks.IMachineProperties;
import forestry.core.blocks.IMachinePropertiesTESR;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import forestry.core.render.IBlockRenderer;
import forestry.core.tiles.TileForestry;
import forestry.factory.tiles.TileBottler;
import forestry.factory.tiles.TileCarpenter;
@@ -26,7 +28,7 @@ import forestry.factory.tiles.TileMoistener;
import forestry.factory.tiles.TileSqueezer;
import forestry.factory.tiles.TileStill;
public enum BlockFactoryTesrType implements IMachineProperties {
public enum BlockFactoryTesrType implements IMachinePropertiesTESR {
BOTTLER(TileBottler.class),
CARPENTER(TileCarpenter.class),
CENTRIFUGE(TileCentrifuge.class),
@@ -40,13 +42,13 @@ public enum BlockFactoryTesrType implements IMachineProperties {
private final String teIdent;
private final Class<? extends TileForestry> teClass;
private final String gfxBase;
private final IBlockRenderer renderer;
BlockFactoryTesrType(Class<? extends TileForestry> teClass) {
String name = toString().toLowerCase(Locale.ENGLISH);
this.teIdent = "forestry." + WordUtils.capitalize(name);
this.teClass = teClass;
this.gfxBase = Constants.TEXTURE_PATH_BLOCKS + "/" + name + "_";
this.renderer = Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/" + name + "_");
}
@Override
@@ -65,7 +67,7 @@ public enum BlockFactoryTesrType implements IMachineProperties {
}
@Override
public String getGfxBase() {
return gfxBase;
public IBlockRenderer getRenderer() {
return renderer;
}
}