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.charger.ItemCharger;
|
||||
import resonantinduction.electrical.encoder.ItemDisk;
|
||||
import resonantinduction.electrical.generator.BlockGenerator;
|
||||
import resonantinduction.electrical.generator.TileGenerator;
|
||||
import resonantinduction.electrical.generator.BlockMotor;
|
||||
import resonantinduction.electrical.generator.TileMotor;
|
||||
import resonantinduction.electrical.generator.solar.BlockSolarPanel;
|
||||
import resonantinduction.electrical.generator.solar.TileSolarPanel;
|
||||
import resonantinduction.electrical.generator.thermopile.BlockThermopile;
|
||||
|
@ -82,7 +82,7 @@ public class Electrical
|
|||
|
||||
// Generators
|
||||
public static BlockSolarPanel blockSolarPanel;
|
||||
public static Block blockGenerator;
|
||||
public static Block blockMotor;
|
||||
public static Block blockThermopile;
|
||||
|
||||
// Transport
|
||||
|
@ -116,14 +116,15 @@ public class Electrical
|
|||
|
||||
// Generator
|
||||
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);
|
||||
|
||||
// Quantum
|
||||
itemQuantumGlyph = contentRegistry.createItem(ItemQuantumGlyph.class);
|
||||
Settings.CONFIGURATION.save();
|
||||
|
||||
|
||||
OreDictionary.registerOre("wire", itemWire);
|
||||
OreDictionary.registerOre("motor", blockMotor);
|
||||
OreDictionary.registerOre("battery", 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 **/
|
||||
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));
|
||||
|
||||
/** Wire Compatiblity **/
|
||||
|
|
|
@ -10,9 +10,9 @@ import calclavia.lib.render.block.BlockRenderingHandler;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
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);
|
||||
setTextureName(Reference.PREFIX + "material_stone");
|
||||
|
@ -24,11 +24,11 @@ public class BlockGenerator extends BlockRotatable
|
|||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileEntity instanceof TileGenerator)
|
||||
if (tileEntity instanceof TileMotor)
|
||||
{
|
||||
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.");
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,12 @@ public class BlockGenerator extends BlockRotatable
|
|||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileEntity instanceof TileGenerator)
|
||||
if (tileEntity instanceof TileMotor)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
((TileGenerator) tileEntity).isInversed = !((TileGenerator) tileEntity).isInversed;
|
||||
entityPlayer.addChatMessage("Generator now producing " + (((TileGenerator) tileEntity).isInversed ? "mechanical" : "electrical") + " energy.");
|
||||
((TileMotor) tileEntity).isInversed = !((TileMotor) tileEntity).isInversed;
|
||||
entityPlayer.addChatMessage("Generator now producing " + (((TileMotor) tileEntity).isInversed ? "mechanical" : "electrical") + " energy.");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -59,7 +59,7 @@ public class BlockGenerator extends BlockRotatable
|
|||
@Override
|
||||
public TileEntity createNewTileEntity(World world)
|
||||
{
|
||||
return new TileGenerator();
|
||||
return new TileMotor();
|
||||
}
|
||||
|
||||
@Override
|
|
@ -18,7 +18,7 @@ import calclavia.lib.render.item.ISimpleItemRenderer;
|
|||
* @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 ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "generator.png");
|
|
@ -17,7 +17,7 @@ import calclavia.lib.prefab.tile.TileElectrical;
|
|||
*
|
||||
* @author Calclavia
|
||||
*/
|
||||
public class TileGenerator extends TileElectrical implements IRotatable, INodeProvider
|
||||
public class TileMotor extends TileElectrical implements IRotatable, INodeProvider
|
||||
{
|
||||
protected IMechanicalNode node;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class TileGenerator extends TileElectrical implements IRotatable, INodePr
|
|||
public boolean isInversed = true;
|
||||
private byte gearRatio;
|
||||
|
||||
public TileGenerator()
|
||||
public TileMotor()
|
||||
{
|
||||
energy = new EnergyStorageHandler(1000000);
|
||||
node = NodeRegistry.get(this, IMechanicalNode.class);
|
Loading…
Reference in a new issue