Started on Mechanical Network
This commit is contained in:
parent
f1bd17bd35
commit
4085313f58
6 changed files with 134 additions and 0 deletions
|
@ -15,6 +15,8 @@ import resonantinduction.mechanical.fluid.pump.TileGrate;
|
|||
import resonantinduction.mechanical.fluid.pump.TilePump;
|
||||
import resonantinduction.mechanical.fluid.tank.BlockTank;
|
||||
import resonantinduction.mechanical.fluid.tank.TileTank;
|
||||
import resonantinduction.mechanical.gear.BlockGear;
|
||||
import resonantinduction.mechanical.gear.TileGear;
|
||||
import resonantinduction.mechanical.logistic.BlockDetector;
|
||||
import resonantinduction.mechanical.logistic.BlockManipulator;
|
||||
import resonantinduction.mechanical.logistic.BlockRejector;
|
||||
|
@ -57,6 +59,10 @@ public class Mechanical
|
|||
|
||||
public static final ContentRegistry contentRegistry = new ContentRegistry(Settings.CONFIGURATION, ID);
|
||||
|
||||
// Energy
|
||||
public static Block blockGear;
|
||||
public static Block blockGearShaft;
|
||||
|
||||
// Transport
|
||||
public static Block blockConveyorBelt;
|
||||
public static Block blockManipulator;
|
||||
|
@ -75,6 +81,9 @@ public class Mechanical
|
|||
{
|
||||
Settings.load();
|
||||
NetworkRegistry.instance().registerGuiHandler(this, proxy);
|
||||
blockGear = contentRegistry.createTile(BlockGear.class, TileGear.class);
|
||||
//blockGearShaft = contentRegistry.createTile(BlockRejector.class, TileRejector.class);
|
||||
|
||||
blockConveyorBelt = contentRegistry.createTile(BlockConveyorBelt.class, TileConveyorBelt.class);
|
||||
blockManipulator = contentRegistry.createTile(BlockManipulator.class, TileManipulator.class);
|
||||
blockDetector = contentRegistry.createTile(BlockDetector.class, TileDetector.class);
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package resonantinduction.mechanical.gear;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import resonantinduction.mechanical.render.MechanicalBlockRenderingHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockGear extends BlockRI
|
||||
{
|
||||
public BlockGear()
|
||||
{
|
||||
super("gear", Material.wood);
|
||||
this.setHardness(1f);
|
||||
this.setResistance(1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderType()
|
||||
{
|
||||
return MechanicalBlockRenderingHandler.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1)
|
||||
{
|
||||
return new TileGear();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package resonantinduction.mechanical.gear;
|
||||
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
|
||||
/**
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class TileGear extends TileAdvanced
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package resonantinduction.mechanical.network;
|
||||
|
||||
/**
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public interface IMechanical
|
||||
{
|
||||
public void setKineticEnergy(long energy);
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package resonantinduction.mechanical.network;
|
||||
|
||||
import universalelectricity.core.net.Network;
|
||||
|
||||
/**
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class MechanicalNetwork extends Network<MechanicalNetwork, IMechanical, IMechanical>
|
||||
{
|
||||
private long energyBuffer;
|
||||
|
||||
@Override
|
||||
public void update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean continueUpdate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addTorque(long energy)
|
||||
{
|
||||
this.energyBuffer += energy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MechanicalNetwork merge(MechanicalNetwork network)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void split(IMechanical connection)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void split(IMechanical connectorA, IMechanical connectorB)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -20,6 +20,10 @@ tile.resonantinduction\:fluidPipe.0.name=Wood Trough
|
|||
tile.resonantinduction\:fluidPipe.1.name=Stone Trough
|
||||
|
||||
### Mechanical Module
|
||||
## Energy
|
||||
tile.resonantinduction\:gear.name=Gear
|
||||
tile.resonantinduction\:gearShaft.name=Gear Shaft
|
||||
|
||||
## Transport
|
||||
tile.resonantinduction\:pump.name=Pump
|
||||
tile.resonantinduction\:grate.name=Grate
|
||||
|
|
Loading…
Reference in a new issue