Reformat
This commit is contained in:
parent
7ab4cb1306
commit
46f591a45d
12 changed files with 17 additions and 68 deletions
|
@ -109,7 +109,7 @@ public class BlockCrate extends BlockMachine
|
||||||
|
|
||||||
containingStack.stackSize -= amountToTake;
|
containingStack.stackSize -= amountToTake;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (containingStack.stackSize <= 0)
|
if (containingStack.stackSize <= 0)
|
||||||
{
|
{
|
||||||
containingStack = null;
|
containingStack = null;
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ISidedInvento
|
||||||
{
|
{
|
||||||
this.containingItems[par1] = null;
|
this.containingItems[par1] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setInventorySlotContents(par1, this.containingItems[par1]);
|
this.setInventorySlotContents(par1, this.containingItems[par1]);
|
||||||
|
|
||||||
return var3;
|
return var3;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import universalelectricity.core.electricity.ElectricityNetwork;
|
||||||
import universalelectricity.core.electricity.ElectricityPack;
|
import universalelectricity.core.electricity.ElectricityPack;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.core.vector.Vector3;
|
||||||
import universalelectricity.prefab.tile.TileEntityElectricityReceiver;
|
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
|
* 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()
|
protected void onUpdate()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getVoltage()
|
public double getVoltage()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,11 +15,9 @@ import net.minecraft.network.packet.Packet250CustomPayload;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.implement.IConductor;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.core.vector.Vector3;
|
||||||
import universalelectricity.prefab.network.IPacketReceiver;
|
import universalelectricity.prefab.network.IPacketReceiver;
|
||||||
import universalelectricity.prefab.network.PacketManager;
|
import universalelectricity.prefab.network.PacketManager;
|
||||||
import universalelectricity.prefab.tile.TileEntityElectricityReceiver;
|
|
||||||
import assemblyline.common.AssemblyLine;
|
import assemblyline.common.AssemblyLine;
|
||||||
import assemblyline.common.machine.belt.TileEntityConveyorBelt;
|
import assemblyline.common.machine.belt.TileEntityConveyorBelt;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class BlockConveyorBelt extends BlockMachine
|
||||||
{
|
{
|
||||||
TileEntityConveyorBelt tileEntity = (TileEntityConveyorBelt) world.getBlockTileEntity(x, y, z);
|
TileEntityConveyorBelt tileEntity = (TileEntityConveyorBelt) world.getBlockTileEntity(x, y, z);
|
||||||
tileEntity.updatePowerTransferRange();
|
tileEntity.updatePowerTransferRange();
|
||||||
|
|
||||||
if (tileEntity.isRunning())
|
if (tileEntity.isRunning())
|
||||||
{
|
{
|
||||||
SlantType slantType = tileEntity.getSlant();
|
SlantType slantType = tileEntity.getSlant();
|
||||||
|
@ -133,7 +133,8 @@ public class BlockConveyorBelt extends BlockMachine
|
||||||
entity.motionZ = direction.offsetZ * tileEntity.maxSpeed;
|
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)
|
if (direction.offsetX != 0)
|
||||||
{
|
{
|
||||||
double difference = (z + 0.5) - entity.posZ;
|
double difference = (z + 0.5) - entity.posZ;
|
||||||
|
|
|
@ -4,8 +4,6 @@ import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
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.entity.player.EntityPlayer;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.INetworkManager;
|
import net.minecraft.network.INetworkManager;
|
||||||
|
@ -15,9 +13,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.electricity.ElectricityConnections;
|
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.core.vector.Vector3;
|
||||||
import universalelectricity.prefab.implement.IRotatable;
|
import universalelectricity.prefab.implement.IRotatable;
|
||||||
import universalelectricity.prefab.network.IPacketReceiver;
|
import universalelectricity.prefab.network.IPacketReceiver;
|
||||||
|
|
|
@ -193,7 +193,8 @@ public class EntityCraftingArm extends Entity
|
||||||
double diffX = posX - itemEntityTarget.posX;
|
double diffX = posX - itemEntityTarget.posX;
|
||||||
double diffY = posY - itemEntityTarget.posY;
|
double diffY = posY - itemEntityTarget.posY;
|
||||||
double diffZ = posZ - itemEntityTarget.posZ;
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class UniversalElectricity
|
||||||
*/
|
*/
|
||||||
public static final int MAJOR_VERSION = 1;
|
public static final int MAJOR_VERSION = 1;
|
||||||
public static final int MINOR_VERSION = 2;
|
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;
|
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,11 +22,16 @@ import universalelectricity.prefab.implement.IToolConfigurator;
|
||||||
*/
|
*/
|
||||||
public abstract class BlockMachine extends BlockContainer
|
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)
|
public BlockMachine(String name, int id, Material material)
|
||||||
{
|
{
|
||||||
super(id, material);
|
super(id, material);
|
||||||
this.setBlockName(name);
|
this.setBlockName(name);
|
||||||
this.setHardness(0.5F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockMachine(String name, int id, Material material, CreativeTabs creativeTab)
|
public BlockMachine(String name, int id, Material material, CreativeTabs creativeTab)
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class UpdateNotifier implements IPlayerTracker
|
||||||
|
|
||||||
if (latestUpdate != null && latestUpdate != "" && !currentVersion.trim().equals(latestUpdate.trim()))
|
if (latestUpdate != null && latestUpdate != "" && !currentVersion.trim().equals(latestUpdate.trim()))
|
||||||
{
|
{
|
||||||
modsToUpdate.put(modName, latestUpdate);
|
modsToUpdate.put(modName, latestUpdate.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
return latestUpdate;
|
return latestUpdate;
|
||||||
|
|
|
@ -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();
|
|
||||||
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
Loading…
Reference in a new issue