Resolved #419 - Generators renamed to motor, added to Universal Recipes
This commit is contained in:
parent
2e4de27e94
commit
10bce50044
4 changed files with 18 additions and 17 deletions
|
@ -16,8 +16,8 @@ import resonantinduction.electrical.battery.ItemBlockBattery;
|
||||||
import resonantinduction.electrical.battery.TileBattery;
|
import resonantinduction.electrical.battery.TileBattery;
|
||||||
import resonantinduction.electrical.charger.ItemCharger;
|
import resonantinduction.electrical.charger.ItemCharger;
|
||||||
import resonantinduction.electrical.encoder.ItemDisk;
|
import resonantinduction.electrical.encoder.ItemDisk;
|
||||||
import resonantinduction.electrical.generator.BlockGenerator;
|
import resonantinduction.electrical.generator.BlockMotor;
|
||||||
import resonantinduction.electrical.generator.TileGenerator;
|
import resonantinduction.electrical.generator.TileMotor;
|
||||||
import resonantinduction.electrical.generator.solar.BlockSolarPanel;
|
import resonantinduction.electrical.generator.solar.BlockSolarPanel;
|
||||||
import resonantinduction.electrical.generator.solar.TileSolarPanel;
|
import resonantinduction.electrical.generator.solar.TileSolarPanel;
|
||||||
import resonantinduction.electrical.generator.thermopile.BlockThermopile;
|
import resonantinduction.electrical.generator.thermopile.BlockThermopile;
|
||||||
|
@ -82,7 +82,7 @@ public class Electrical
|
||||||
|
|
||||||
// Generators
|
// Generators
|
||||||
public static BlockSolarPanel blockSolarPanel;
|
public static BlockSolarPanel blockSolarPanel;
|
||||||
public static Block blockGenerator;
|
public static Block blockMotor;
|
||||||
public static Block blockThermopile;
|
public static Block blockThermopile;
|
||||||
|
|
||||||
// Transport
|
// Transport
|
||||||
|
@ -116,7 +116,7 @@ public class Electrical
|
||||||
|
|
||||||
// Generator
|
// Generator
|
||||||
blockSolarPanel = (BlockSolarPanel) contentRegistry.createTile(BlockSolarPanel.class, TileSolarPanel.class);
|
blockSolarPanel = (BlockSolarPanel) contentRegistry.createTile(BlockSolarPanel.class, TileSolarPanel.class);
|
||||||
blockGenerator = contentRegistry.createTile(BlockGenerator.class, TileGenerator.class);
|
blockMotor = contentRegistry.createTile(BlockMotor.class, TileMotor.class);
|
||||||
blockThermopile = contentRegistry.createTile(BlockThermopile.class, TileThermopile.class);
|
blockThermopile = contentRegistry.createTile(BlockThermopile.class, TileThermopile.class);
|
||||||
|
|
||||||
// Quantum
|
// Quantum
|
||||||
|
@ -124,6 +124,7 @@ public class Electrical
|
||||||
Settings.CONFIGURATION.save();
|
Settings.CONFIGURATION.save();
|
||||||
|
|
||||||
OreDictionary.registerOre("wire", itemWire);
|
OreDictionary.registerOre("wire", itemWire);
|
||||||
|
OreDictionary.registerOre("motor", blockMotor);
|
||||||
OreDictionary.registerOre("battery", ItemBlockBattery.setTier(new ItemStack(blockBattery, 1, 0), (byte) 0));
|
OreDictionary.registerOre("battery", ItemBlockBattery.setTier(new ItemStack(blockBattery, 1, 0), (byte) 0));
|
||||||
OreDictionary.registerOre("batteryBox", ItemBlockBattery.setTier(new ItemStack(blockBattery, 1, 0), (byte) 0));
|
OreDictionary.registerOre("batteryBox", ItemBlockBattery.setTier(new ItemStack(blockBattery, 1, 0), (byte) 0));
|
||||||
|
|
||||||
|
@ -192,7 +193,7 @@ public class Electrical
|
||||||
|
|
||||||
/** Generators **/
|
/** Generators **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockSolarPanel, "CCC", "WWW", "III", 'W', "wire", 'C', Item.coal, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockSolarPanel, "CCC", "WWW", "III", 'W', "wire", 'C', Item.coal, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockGenerator, "SRS", "SMS", "SWS", 'W', "wire", 'R', Item.redstone, 'M', UniversalRecipe.MOTOR.get(), 'S', UniversalRecipe.PRIMARY_METAL.get()));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockMotor, "SRS", "SMS", "SWS", 'W', "wire", 'R', Item.redstone, 'M', UniversalRecipe.MOTOR.get(), 'S', UniversalRecipe.PRIMARY_METAL.get()));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockThermopile, "ORO", "OWO", "OOO", 'W', "wire", 'O', Block.obsidian, 'R', Item.redstone));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockThermopile, "ORO", "OWO", "OOO", 'W', "wire", 'O', Block.obsidian, 'R', Item.redstone));
|
||||||
|
|
||||||
/** Wire Compatiblity **/
|
/** Wire Compatiblity **/
|
||||||
|
|
|
@ -10,9 +10,9 @@ import calclavia.lib.render.block.BlockRenderingHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockGenerator extends BlockRotatable
|
public class BlockMotor extends BlockRotatable
|
||||||
{
|
{
|
||||||
public BlockGenerator(int id)
|
public BlockMotor(int id)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine);
|
||||||
setTextureName(Reference.PREFIX + "material_stone");
|
setTextureName(Reference.PREFIX + "material_stone");
|
||||||
|
@ -24,11 +24,11 @@ public class BlockGenerator extends BlockRotatable
|
||||||
{
|
{
|
||||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||||
|
|
||||||
if (tileEntity instanceof TileGenerator)
|
if (tileEntity instanceof TileMotor)
|
||||||
{
|
{
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
{
|
{
|
||||||
int gear = ((TileGenerator) tileEntity).toggleGearRatio();
|
int gear = ((TileMotor) tileEntity).toggleGearRatio();
|
||||||
entityPlayer.addChatMessage("Generator set to " + (gear == 0 ? "low" : gear == 1 ? "medium" : "high") + " gear.");
|
entityPlayer.addChatMessage("Generator set to " + (gear == 0 ? "low" : gear == 1 ? "medium" : "high") + " gear.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@ public class BlockGenerator extends BlockRotatable
|
||||||
{
|
{
|
||||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||||
|
|
||||||
if (tileEntity instanceof TileGenerator)
|
if (tileEntity instanceof TileMotor)
|
||||||
{
|
{
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
{
|
{
|
||||||
((TileGenerator) tileEntity).isInversed = !((TileGenerator) tileEntity).isInversed;
|
((TileMotor) tileEntity).isInversed = !((TileMotor) tileEntity).isInversed;
|
||||||
entityPlayer.addChatMessage("Generator now producing " + (((TileGenerator) tileEntity).isInversed ? "mechanical" : "electrical") + " energy.");
|
entityPlayer.addChatMessage("Generator now producing " + (((TileMotor) tileEntity).isInversed ? "mechanical" : "electrical") + " energy.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -59,7 +59,7 @@ public class BlockGenerator extends BlockRotatable
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world)
|
public TileEntity createNewTileEntity(World world)
|
||||||
{
|
{
|
||||||
return new TileGenerator();
|
return new TileMotor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -18,7 +18,7 @@ import calclavia.lib.render.item.ISimpleItemRenderer;
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RenderGenerator extends TileEntitySpecialRenderer implements ISimpleItemRenderer
|
public class RenderMotor extends TileEntitySpecialRenderer implements ISimpleItemRenderer
|
||||||
{
|
{
|
||||||
public static final IModelCustom MODEL = AdvancedModelLoader.loadModel(Reference.MODEL_DIRECTORY + "generator.tcn");
|
public static final IModelCustom MODEL = AdvancedModelLoader.loadModel(Reference.MODEL_DIRECTORY + "generator.tcn");
|
||||||
public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "generator.png");
|
public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "generator.png");
|
|
@ -17,7 +17,7 @@ import calclavia.lib.prefab.tile.TileElectrical;
|
||||||
*
|
*
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
*/
|
*/
|
||||||
public class TileGenerator extends TileElectrical implements IRotatable, INodeProvider
|
public class TileMotor extends TileElectrical implements IRotatable, INodeProvider
|
||||||
{
|
{
|
||||||
protected IMechanicalNode node;
|
protected IMechanicalNode node;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class TileGenerator extends TileElectrical implements IRotatable, INodePr
|
||||||
public boolean isInversed = true;
|
public boolean isInversed = true;
|
||||||
private byte gearRatio;
|
private byte gearRatio;
|
||||||
|
|
||||||
public TileGenerator()
|
public TileMotor()
|
||||||
{
|
{
|
||||||
energy = new EnergyStorageHandler(1000000);
|
energy = new EnergyStorageHandler(1000000);
|
||||||
node = NodeRegistry.get(this, IMechanicalNode.class);
|
node = NodeRegistry.get(this, IMechanicalNode.class);
|
Loading…
Reference in a new issue