This commit is contained in:
Henry Mao 2012-12-20 00:59:16 +08:00
parent 7ab4cb1306
commit 46f591a45d
12 changed files with 17 additions and 68 deletions

View file

@ -109,7 +109,7 @@ public class BlockCrate extends BlockMachine
containingStack.stackSize -= amountToTake;
}
if (containingStack.stackSize <= 0)
{
containingStack = null;

View file

@ -95,7 +95,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ISidedInvento
{
this.containingItems[par1] = null;
}
this.setInventorySlotContents(par1, this.containingItems[par1]);
return var3;

View file

@ -7,7 +7,6 @@ import universalelectricity.core.electricity.ElectricityNetwork;
import universalelectricity.core.electricity.ElectricityPack;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.tile.TileEntityElectricityReceiver;
import assemblyline.common.machine.belt.TileEntityConveyorBelt;
/**
* A class to be inherited by all machines on the assembly line. This will allow all machines to be
@ -111,9 +110,9 @@ public abstract class TileEntityAssemblyNetwork extends TileEntityElectricityRec
protected void onUpdate()
{
}
@Override
public double getVoltage()
{

View file

@ -15,11 +15,9 @@ import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.implement.IConductor;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.network.IPacketReceiver;
import universalelectricity.prefab.network.PacketManager;
import universalelectricity.prefab.tile.TileEntityElectricityReceiver;
import assemblyline.common.AssemblyLine;
import assemblyline.common.machine.belt.TileEntityConveyorBelt;

View file

@ -107,7 +107,7 @@ public class BlockConveyorBelt extends BlockMachine
{
TileEntityConveyorBelt tileEntity = (TileEntityConveyorBelt) world.getBlockTileEntity(x, y, z);
tileEntity.updatePowerTransferRange();
if (tileEntity.isRunning())
{
SlantType slantType = tileEntity.getSlant();
@ -133,7 +133,8 @@ public class BlockConveyorBelt extends BlockMachine
entity.motionZ = direction.offsetZ * tileEntity.maxSpeed;
}
// Attempt to move entity to the center of the belt to prevent them from flying off.
// Attempt to move entity to the center of the belt to prevent them
// from flying off.
if (direction.offsetX != 0)
{
double difference = (z + 0.5) - entity.posZ;

View file

@ -4,8 +4,6 @@ import java.util.EnumSet;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
@ -15,9 +13,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.electricity.ElectricityConnections;
import universalelectricity.core.electricity.ElectricityNetwork;
import universalelectricity.core.electricity.ElectricityPack;
import universalelectricity.core.implement.IConductor;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.implement.IRotatable;
import universalelectricity.prefab.network.IPacketReceiver;

View file

@ -193,7 +193,8 @@ public class EntityCraftingArm extends Entity
double diffX = posX - itemEntityTarget.posX;
double diffY = posY - itemEntityTarget.posY;
double diffZ = posZ - itemEntityTarget.posZ;
// TODO decide on how fast the claw should move toward the target, and move it
// TODO decide on how fast the claw should move toward the
// target, and move it
}
}
}

View file

@ -31,7 +31,7 @@ public class UniversalElectricity
*/
public static final int MAJOR_VERSION = 1;
public static final int MINOR_VERSION = 2;
public static final int REVISION_VERSION = 0;
public static final int REVISION_VERSION = 1;
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION;
/**

View file

@ -22,11 +22,16 @@ import universalelectricity.prefab.implement.IToolConfigurator;
*/
public abstract class BlockMachine extends BlockContainer
{
public BlockMachine(int id, Material material)
{
super(id, material);
this.setHardness(0.5F);
}
public BlockMachine(String name, int id, Material material)
{
super(id, material);
this.setBlockName(name);
this.setHardness(0.5F);
}
public BlockMachine(String name, int id, Material material, CreativeTabs creativeTab)

View file

@ -45,7 +45,7 @@ public class UpdateNotifier implements IPlayerTracker
if (latestUpdate != null && latestUpdate != "" && !currentVersion.trim().equals(latestUpdate.trim()))
{
modsToUpdate.put(modName, latestUpdate);
modsToUpdate.put(modName, latestUpdate.trim());
}
return latestUpdate;

View file

@ -1,31 +0,0 @@
package universalelectricity.prefab.repair;
import net.minecraft.entity.player.EntityPlayer;
/**
* Applied to TileEntities/Machines that can be repaired.
*
* @author Calclavia
*
*/
public interface IRepairable
{
/**
* Called when the machine is being repaired.
*
* @param itemStack - The repairing tool that the player is holding
* @param player - The player who is repairing this machine.
*/
public void onRepair(IToolRepair itemStack, EntityPlayer player);
/**
* @return The maximum possible damage of this machine.
*/
public int getMaxDamage();
/**
* @return How damaged is this machine?
*/
public int getDamage();
}

View file

@ -1,19 +0,0 @@
package universalelectricity.prefab.repair;
import net.minecraft.item.ItemStack;
public interface IToolRepair
{
/**
* A unique ID for mods to recognize what repair tool this is.
*/
public String getID();
/**
* How effective is this repairing tool?
*
* @param itemStack The ItemStack
* @return A effectiveness value.
*/
public int getEffectiveness(ItemStack itemStack);
}