Auto-Sync

This commit is contained in:
DarkGuardsman 2013-10-09 12:25:34 -04:00
parent b5fd22ff24
commit fba2cfcd8d
20 changed files with 54 additions and 52 deletions

View file

@ -14,7 +14,6 @@ public class FormulaHelper
public static final float ACCELERATION_EARTH = 9.80665f;
public static final float ACCELERATION_MOON = 1.622f;
/** Gay-Lussac's Law (P1/T1 = P2/T2)
*
* @param pressure - original pressure

View file

@ -5,5 +5,9 @@ package com.builtbroken.common.science.units;
* @author Rsobert Seifert */
public enum ForceUnit
{
N(), dyn(), kp(), Ib(), pdl();
N(),
dyn(),
kp(),
Ib(),
pdl();
}

View file

@ -4,8 +4,8 @@ package com.builtbroken.common.science.units;
* @author Robert Seifert */
public enum ImperialUnits
{
thou("thou", "th", (float) (1 / 12000)),
inch("inch", "in", (float) (1 / 12)),
thou("thou", "th", (1 / 12000)),
inch("inch", "in", (1 / 12)),
foot("foot", "ft", 1),
yard("yard", "yd", 3),
chain("chain", "ch", 66),
@ -23,9 +23,9 @@ public enum ImperialUnits
nautical("nautical mile", "", 6080),
/** Gunter's sruvey unit */
link("link", "", (float) (66 / 100)),
link("link", "", (66 / 100)),
/** Gunter's sruvey unit */
rod("rod", "", (float) (66 / 4));
rod("rod", "", (66 / 4));
public String name, symbol;
float toFeet;

View file

@ -7,11 +7,13 @@ public enum TemperatureUnit
{
Fahrenheit("Fahrenheit", "F", new ITempConversion()
{
@Override
public float toKelvin(float temp)
{
return (float) ((temp + 459.67) * (5 / 9));
}
@Override
public float fromKelvin(float temp)
{
return (float) ((temp * (9 / 5)) - 459.67);
@ -20,11 +22,13 @@ public enum TemperatureUnit
}),
Celsius("Celsius", "C", new ITempConversion()
{
@Override
public float toKelvin(float temp)
{
return (float) (temp + 273.15);
}
@Override
public float fromKelvin(float temp)
{
return (float) (temp - 273.15);
@ -33,11 +37,13 @@ public enum TemperatureUnit
}),
Rankine("Rankine", "R", new ITempConversion()
{
@Override
public float toKelvin(float temp)
{
return (float) (temp * (5 / 9));
return (temp * (5 / 9));
}
@Override
public float fromKelvin(float temp)
{
return temp * (9 / 5);
@ -46,11 +52,13 @@ public enum TemperatureUnit
}),
Kelvin("Degrees", "F", new ITempConversion()
{
@Override
public float toKelvin(float temp)
{
return temp;
}
@Override
public float fromKelvin(float temp)
{
return temp;

View file

@ -10,7 +10,7 @@ public class UnitHelper
public static final float FEET_TO_METERS = 0.3048f;
public static final float METERS_TO_FEET = 3.28084f;
public static List<Character> numbers = new ArrayList<>();
public static List<Character> numbers = new ArrayList<Character>();
static
{

View file

@ -2,7 +2,6 @@ package dark.api;
import java.util.List;
/** Used by any object that needs to restrict access to it by a set of usernames
*
* @author DarkGuardsman */

View file

@ -1,8 +1,5 @@
package dark.api;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;

View file

@ -3,8 +3,6 @@ package dark.core.common.machines;
import java.util.List;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -13,6 +11,9 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.Configuration;
import com.builtbroken.common.Pair;
import dark.core.common.CommonProxy;
import dark.core.common.DarkMain;
import dark.core.prefab.machine.BlockMachine;
@ -21,7 +22,6 @@ import dark.core.registration.ModObjectRegistry.BlockBuildData;
public class BlockHeater extends BlockMachine
{
public BlockHeater(BlockBuildData data)
{
super(data);

View file

@ -1,14 +1,10 @@
package dark.core.common.machines;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.electricity.ElectricityPack;
@ -69,7 +65,7 @@ public class TileEntityCoalGenerator extends TileEntityEnergyMachine
this.generateWatts = Math.max(this.generateWatts - BASE_DECCELERATION, 0);
}
if(this.generateWatts >= MIN_GENERATE_WATTS)
if (this.generateWatts >= MIN_GENERATE_WATTS)
{
this.produceAllSides();
}

View file

@ -299,6 +299,7 @@ public class FluidHelper
/** Does all the work needed to fill or drain an item of fluid when a player clicks on the block. */
public static boolean playerActivatedFluidItem(World world, int x, int y, int z, EntityPlayer entityplayer, int side)
{
//TODO add double click support similar to the crates in assembly line
ItemStack current = entityplayer.inventory.getCurrentItem();
if (current != null && world.getBlockTileEntity(x, y, z) instanceof IFluidHandler)
{
@ -309,9 +310,7 @@ public class FluidHelper
if (liquid != null)
{
int qty = tank.fill(ForgeDirection.UNKNOWN, liquid, true);
if (qty != 0 && !entityplayer.capabilities.isCreativeMode)
if (tank.fill(ForgeDirection.UNKNOWN, liquid, true) != 0 && !entityplayer.capabilities.isCreativeMode)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, AutoCraftingManager.consumeItem(current, 1));
}