Added initial wind turbine
This commit is contained in:
parent
ad89f41a58
commit
bc09bc6ca8
17 changed files with 331 additions and 25 deletions
|
@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
|
||||
public class ItemImprint extends Item
|
||||
|
@ -29,7 +29,7 @@ public class ItemImprint extends Item
|
|||
super(Settings.CONFIGURATION.getItem("imprint", id).getInt());
|
||||
this.setUnlocalizedName(Reference.PREFIX + "imprint");
|
||||
this.setTextureName(Reference.PREFIX + "imprint");
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setHasSubtypes(true);
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
|
|
@ -10,12 +10,12 @@ import net.minecraft.item.ItemStack;
|
|||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class ResonantInductionTabs extends CreativeTabs
|
||||
public class TabRI extends CreativeTabs
|
||||
{
|
||||
public static final ResonantInductionTabs CORE = new ResonantInductionTabs(CreativeTabs.getNextID(), Reference.DOMAIN);
|
||||
public static final TabRI CORE = new TabRI(CreativeTabs.getNextID(), Reference.DOMAIN);
|
||||
public static ItemStack ITEMSTACK;
|
||||
|
||||
public ResonantInductionTabs(int par1, String par2Str)
|
||||
public TabRI(int par1, String par2Str)
|
||||
{
|
||||
super(par1, par2Str);
|
||||
|
|
@ -6,7 +6,7 @@ package resonantinduction.core.prefab.block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockSidedIO;
|
||||
|
@ -29,7 +29,7 @@ public class BlockIOBase extends BlockSidedIO
|
|||
public BlockIOBase(String name, int id, Material material)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_BLOCK, name, id).getInt(id), material);
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
this.setHardness(1f);
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockTile;
|
||||
|
@ -31,7 +31,7 @@ public class BlockRI extends BlockTile
|
|||
public BlockRI(int id, String name, Material material)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_BLOCK, name, id).getInt(id), material);
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
this.setHardness(1f);
|
||||
|
|
|
@ -3,7 +3,7 @@ package resonantinduction.core.prefab.block;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockRotatable;
|
||||
|
@ -23,7 +23,7 @@ public class BlockRIRotatable extends BlockRotatable
|
|||
public BlockRIRotatable(String name, int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_BLOCK, name, id).getInt(id), UniversalElectricity.machine);
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
this.setHardness(1f);
|
||||
|
|
|
@ -3,7 +3,7 @@ package resonantinduction.core.prefab.item;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
|
||||
/** @author Calclavia */
|
||||
|
@ -17,7 +17,7 @@ public class ItemRI extends Item
|
|||
public ItemRI(String name, int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, name, id).getInt(id));
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package resonantinduction.core.prefab.part;
|
|||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import codechicken.multipart.JItemMultiPart;
|
||||
|
||||
|
@ -15,7 +15,7 @@ public abstract class ItemMultipartBase extends JItemMultiPart
|
|||
public ItemMultipartBase(String name, int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, name, id).getInt(id));
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
|
|||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.electrical.battery.BlockBattery;
|
||||
import resonantinduction.electrical.battery.ItemBlockBattery;
|
||||
|
@ -134,7 +134,7 @@ public class Electrical
|
|||
/**
|
||||
* Set reference itemstacks
|
||||
*/
|
||||
ResonantInductionTabs.ITEMSTACK = new ItemStack(itemTransformer);
|
||||
TabRI.ITEMSTACK = new ItemStack(itemTransformer);
|
||||
|
||||
for (EnumWireMaterial material : EnumWireMaterial.values())
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.Utility;
|
||||
import resonantinduction.electrical.wire.flat.PartFlatWire;
|
||||
|
@ -45,7 +45,7 @@ public class ItemWire extends JItemMultiPart
|
|||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, "wire", id).getInt(id));
|
||||
this.setUnlocalizedName(Reference.PREFIX + "wire");
|
||||
this.setTextureName(Reference.PREFIX + "wire");
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ import resonantinduction.mechanical.process.BlockFilter;
|
|||
import resonantinduction.mechanical.process.BlockGrinderWheel;
|
||||
import resonantinduction.mechanical.process.TileGrinderWheel;
|
||||
import resonantinduction.mechanical.process.TileMixer;
|
||||
import resonantinduction.mechanical.turbine.BlockWindTurbine;
|
||||
import resonantinduction.mechanical.turbine.TileWindTurbine;
|
||||
import calclavia.lib.content.ContentRegistry;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.recipe.UniversalRecipe;
|
||||
|
@ -74,6 +76,7 @@ public class Mechanical
|
|||
// Energy
|
||||
public static Item itemGear;
|
||||
public static Item itemGearShaft;
|
||||
public static Block mechanicalTurbine;
|
||||
|
||||
// Transport
|
||||
public static Block blockConveyorBelt;
|
||||
|
@ -103,6 +106,7 @@ public class Mechanical
|
|||
NetworkRegistry.instance().registerGuiHandler(this, proxy);
|
||||
itemGear = contentRegistry.createItem(ItemGear.class);
|
||||
itemGearShaft = contentRegistry.createItem(ItemGearShaft.class);
|
||||
mechanicalTurbine = contentRegistry.createTile(BlockWindTurbine.class, TileWindTurbine.class);
|
||||
|
||||
blockConveyorBelt = contentRegistry.createTile(BlockConveyorBelt.class, TileConveyorBelt.class);
|
||||
blockManipulator = contentRegistry.createTile(BlockManipulator.class, TileManipulator.class);
|
||||
|
|
|
@ -14,6 +14,7 @@ import codechicken.lib.vec.BlockCoord;
|
|||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.PartMap;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
|
||||
|
@ -38,7 +39,12 @@ public class ItemGear extends ItemMultipartBase
|
|||
|
||||
if (tile instanceof TileMultipart)
|
||||
{
|
||||
if (!(((TileMultipart) tile).partMap(side) instanceof PartGear))
|
||||
TMultiPart occupyingPart = ((TileMultipart) tile).partMap(side);
|
||||
TMultiPart centerPart = ((TileMultipart) tile).partMap(PartMap.CENTER.ordinal());
|
||||
|
||||
boolean clickedCenter = hit.mag() < 1;
|
||||
|
||||
if ((clickedCenter && centerPart instanceof PartGearShaft))
|
||||
{
|
||||
side = ForgeDirection.getOrientation(side).getOpposite().ordinal();
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
{
|
||||
IMechanical instance = ((IMechanical) tileBehind).getInstance(placementSide.getOpposite());
|
||||
|
||||
if (instance != null && instance != this && instance.canConnect(placementSide, this))
|
||||
if (instance != null && instance != this && instance.canConnect(placementSide.getOpposite(), this))
|
||||
{
|
||||
connections[placementSide.getOpposite().ordinal()] = instance;
|
||||
getNetwork().merge(instance.getNetwork());
|
||||
|
|
|
@ -65,7 +65,7 @@ public class MechanicalNetwork extends Network<IMechanicalNetwork, IMechanical>
|
|||
{
|
||||
IMechanical mechanical = it.next();
|
||||
Object[] connections = mechanical.getConnections();
|
||||
|
||||
|
||||
for (int i = 0; i < connections.length; i++)
|
||||
{
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
|
@ -80,7 +80,7 @@ public class MechanicalNetwork extends Network<IMechanicalNetwork, IMechanical>
|
|||
float ratio = adjacentMech.getRatio(dir) / mechanical.getRatio(dir.getOpposite());
|
||||
long torque = mechanical.getTorque();
|
||||
|
||||
boolean inverseRotation = mechanical.inverseRotation(dir, adjacentMech)|| adjacentMech.inverseRotation(dir.getOpposite(), mechanical);
|
||||
boolean inverseRotation = mechanical.inverseRotation(dir, adjacentMech) || adjacentMech.inverseRotation(dir.getOpposite(), mechanical);
|
||||
|
||||
int inversion = inverseRotation ? -1 : 1;
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package resonantinduction.mechanical.turbine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import calclavia.lib.prefab.turbine.BlockTurbine;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWindTurbine extends BlockTurbine
|
||||
{
|
||||
public BlockWindTurbine()
|
||||
{
|
||||
this(Settings.getNextBlockID(), "windTurbine", Material.iron);
|
||||
setTextureName(Reference.PREFIX + "material_wood_surface");
|
||||
rotationMask = Byte.parseByte("111111", 2);
|
||||
}
|
||||
|
||||
public BlockWindTurbine(int id, String name, Material material)
|
||||
{
|
||||
super(Settings.CONFIGURATION.getBlock(name, id).getInt(id), material);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setCreativeTab(TabRI.CORE);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return RIBlockRenderingHandler.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1)
|
||||
{
|
||||
return new TileWindTurbine();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package resonantinduction.mechanical.turbine;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderWindTurbine extends TileEntitySpecialRenderer
|
||||
{
|
||||
// TODO: Fix model.
|
||||
public final IModelCustom MODEL = AdvancedModelLoader.loadModel(Reference.MODEL_DIRECTORY + "gears.obj");
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f)
|
||||
{
|
||||
TileTurbine tile = (TileTurbine) t;
|
||||
|
||||
if (tile.getMultiBlock().isPrimary())
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5f, (float) y + 0.5f, (float) z + 0.5f);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tile.worldObj != null)
|
||||
{
|
||||
RenderUtility.rotateBlockBasedOnDirectionUp(tile.getDirection());
|
||||
}
|
||||
|
||||
GL11.glRotatef((float) Math.toDegrees(tile.rotation), 0, 1, 0);
|
||||
|
||||
/**
|
||||
* TODO: Bind based on tier.
|
||||
*/
|
||||
RenderUtility.bind(Reference.BLOCK_TEXTURE_DIRECTORY + "planks_oak.png");
|
||||
|
||||
if (tile.getMultiBlock().isConstructed())
|
||||
{
|
||||
MODEL.renderOnly("LargeGear");
|
||||
}
|
||||
else
|
||||
{
|
||||
MODEL.renderOnly("SmallGear");
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
package resonantinduction.mechanical.turbine;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeGenOcean;
|
||||
import net.minecraft.world.biome.BiomeGenPlains;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.mechanical.gear.PartGearShaft;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import resonantinduction.mechanical.network.IMechanicalNetwork;
|
||||
import resonantinduction.mechanical.network.MechanicalNetwork;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
|
||||
/**
|
||||
* The vertical wind turbine collects airflow.
|
||||
* The horizontal wind turbine collects steam from steam power plants.
|
||||
*
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class TileWindTurbine extends TileTurbine implements IMechanical
|
||||
{
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
getNetwork().split(this);
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
if (this.getMultiBlock().isPrimary())
|
||||
{
|
||||
/**
|
||||
* If this is a vertical turbine.
|
||||
*/
|
||||
if (getDirection().offsetY == 0)
|
||||
{
|
||||
power += getWindPower() * 10;
|
||||
maxPower = 100;
|
||||
}
|
||||
}
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
public long getWindPower()
|
||||
{
|
||||
BiomeGenBase biome = worldObj.getBiomeGenForCoords(xCoord, zCoord);
|
||||
boolean hasBonus = biome instanceof BiomeGenOcean || biome instanceof BiomeGenPlains || biome == BiomeGenBase.river;
|
||||
return (long) (worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / (float) 256) * 5 : 0) + (hasBonus ? 10 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProduce()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playSound()
|
||||
{
|
||||
if (this.ticks % 18 == 0)
|
||||
{
|
||||
// this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord,
|
||||
// "atomicscience:turbine", 0.6f, (float) (0.7f + (0.2 * ((double) this.power / (double)
|
||||
// this.getMaxPower()))));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
return ResonantInduction.PACKET_TILE.getPacket(this, (byte) 1, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendPowerUpdate()
|
||||
{
|
||||
PacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, (byte) 2, angularVelocity), this.worldObj, new Vector3(this), 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mechanical Methods
|
||||
*
|
||||
* @return The connections.
|
||||
*/
|
||||
@Override
|
||||
public Object[] getConnections()
|
||||
{
|
||||
Object[] connections = new Object[6];
|
||||
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = new Vector3(this).translate(dir).getTileEntity(worldObj);
|
||||
|
||||
if (tile instanceof IMechanical)
|
||||
{
|
||||
IMechanical mech = ((IMechanical) tile).getInstance(dir.getOpposite());
|
||||
|
||||
// Don't connect with shafts
|
||||
if (mech != null && !(mech instanceof PartGearShaft) && canConnect(dir, this) && mech.canConnect(dir.getOpposite(), this))
|
||||
{
|
||||
connections[dir.ordinal()] = mech;
|
||||
getNetwork().merge(mech.getNetwork());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return connections;
|
||||
}
|
||||
|
||||
private IMechanicalNetwork network;
|
||||
|
||||
@Override
|
||||
public IMechanicalNetwork getNetwork()
|
||||
{
|
||||
if (this.network == null)
|
||||
{
|
||||
this.network = new MechanicalNetwork();
|
||||
this.network.addConnector(this);
|
||||
}
|
||||
return this.network;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetwork(IMechanicalNetwork network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAngularVelocity()
|
||||
{
|
||||
return angularVelocity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAngularVelocity(float velocity)
|
||||
{
|
||||
this.angularVelocity = velocity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTorque()
|
||||
{
|
||||
return torque;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTorque(long torque)
|
||||
{
|
||||
this.torque = torque;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRatio(ForgeDirection dir)
|
||||
{
|
||||
return getMultiBlock().isConstructed() ? 1.5f : 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inverseRotation(ForgeDirection dir, IMechanical with)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMechanical getInstance(ForgeDirection dir)
|
||||
{
|
||||
return (IMechanical) getMultiBlock().get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection from, Object sourcen)
|
||||
{
|
||||
return from == getDirection().getOpposite();
|
||||
}
|
||||
}
|
|
@ -59,6 +59,10 @@ tile.resonantinduction\:fluidPipe.1.name=Stone Trough
|
|||
## Energy
|
||||
item.resonantinduction\:gear.name=Gear
|
||||
item.resonantinduction\:gearShaft.name=Gear Shaft
|
||||
tile.resonantinduction\:windTurbine.name=Wind Turbine
|
||||
tile.resonantinduction\:windTurbine.tooltip=The wind turbine generates power through air flow and pressure.
|
||||
tile.resonantinduction\:waterTurbine.name=Water Turbine
|
||||
tile.resonantinduction\:waterTurbine.tooltip=The water turbine generates power through water flow.
|
||||
|
||||
## Transport
|
||||
tile.resonantinduction\:releaseValve.name=Release Valve
|
||||
|
@ -134,8 +138,8 @@ tooltip.wire.helpText=Higher voltages will increase transfer rate and decrease e
|
|||
tooltip.noShift=Hold %0shift %1for more information"
|
||||
# %0 is the color for the charge level, %1 is grey to reset it back to normal (optional), %v0 is the current charge, %v1 is the max charge
|
||||
tooltip.battery.energy=Energy: %0%v0 / %v1
|
||||
tooltip.multimeter.line1=Shift-right click to place,
|
||||
tooltip.multimeter.line2=Right click to scan data.
|
||||
tooltip.multimeter.line1=Right click click to place,
|
||||
tooltip.multimeter.line2=Shift-right to scan data.
|
||||
tooltip.multimeter.noSave=No detection saved.
|
||||
tooltip.multimeter.lastSave=Last Detection: %v KJ
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue