updated to UE3.0 and remove unneeded API files
This commit is contained in:
parent
f47e584fb3
commit
916559e802
149 changed files with 726 additions and 2848 deletions
|
@ -1,24 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all blocks that has a frequency.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface IBlockFrequency
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param data - Pass an ItemStack if dealing with items with frequencies.
|
|
||||||
* @return The frequency of this object.
|
|
||||||
*/
|
|
||||||
public int getFrequency();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the frequency
|
|
||||||
*
|
|
||||||
* @param frequency - The frequency of this object.
|
|
||||||
* @param data - Pass an ItemStack if dealing with items with frequencies.
|
|
||||||
*/
|
|
||||||
public void setFrequency(int frequency);
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import icbm.api.explosion.IExplosive;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* General ICBM references.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ICBM
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Name of the channel and mod ID.
|
|
||||||
*/
|
|
||||||
public static final String NAME = "ICBM";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The version of ICBM.
|
|
||||||
*/
|
|
||||||
public static final String MAJOR_VERSION = "@MAJOR@";
|
|
||||||
public static final String MINOR_VERSION = "@MINOR@";
|
|
||||||
public static final String REVISION_VERSION = "@REVIS@";
|
|
||||||
public static final String BUILD_VERSION = "@BUILD@";
|
|
||||||
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The block ID in which ICBM starts with. ICBM Explosion will count up, ICBM Contraption will
|
|
||||||
* count down.
|
|
||||||
*/
|
|
||||||
public static final int BLOCK_ID_PREFIX = 3880;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The item ID in which ICBM starts with.
|
|
||||||
*/
|
|
||||||
public static final int ITEM_ID_PREFIX = 3900;
|
|
||||||
|
|
||||||
public static Class explosionManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets an explosive object based on the name of the explosive.
|
|
||||||
*/
|
|
||||||
public static IExplosive getExplosive(String name)
|
|
||||||
{
|
|
||||||
if (name != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Method method = explosionManager.getMethod("get", String.class);
|
|
||||||
return (IExplosive) method.invoke(null, name);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
System.out.println("ICBM: Failed to get explosive with the name: " + name);
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all blocks that can be used as a camouflage for the camouflage block. Use this
|
|
||||||
* interface if your block is not a normal block but yet would like it to be used as a camouflage
|
|
||||||
* material.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ICamouflageMaterial
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
|
|
||||||
public interface IHackable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Causes the machine to generate a new pass key
|
|
||||||
*/
|
|
||||||
public void generateNewKey();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks to see if the pass key matches the stored one
|
|
||||||
*/
|
|
||||||
public boolean tryForAccess(EntityPlayer player, String pass);
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all items that has a frequency.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface IItemFrequency
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param data - Pass an ItemStack if dealing with items with frequencies.
|
|
||||||
* @return The frequency of this object.
|
|
||||||
*/
|
|
||||||
public int getFrequency(ItemStack itemStack);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the frequency
|
|
||||||
*
|
|
||||||
* @param frequency - The frequency of this object.
|
|
||||||
* @param data - Pass an ItemStack if dealing with items with frequencies.
|
|
||||||
*/
|
|
||||||
public void setFrequency(int frequency, ItemStack itemStack);
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to TileEntities that contains missiles within them.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ILauncherContainer
|
|
||||||
{
|
|
||||||
public IMissile getContainingMissile();
|
|
||||||
|
|
||||||
public void setContainingMissile(IMissile missile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the launcher controller controlling this container.
|
|
||||||
*/
|
|
||||||
public ILauncherController getController();
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import universalelectricity.core.block.IElectricalStorage;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all launcher TileEntitiies that operates the launching of missiles.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*/
|
|
||||||
public interface ILauncherController extends IElectricalStorage, IBlockFrequency
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* What type of launcher is this?
|
|
||||||
*/
|
|
||||||
public LauncherType getLauncherType();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launches the missile into the specified target.
|
|
||||||
*/
|
|
||||||
public void launch();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Can the launcher launch the missile?
|
|
||||||
*/
|
|
||||||
public boolean canLaunch();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The status of the launcher.
|
|
||||||
*/
|
|
||||||
public String getStatus();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The target of the launcher.
|
|
||||||
*/
|
|
||||||
public Vector3 getTarget();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param target Sets the target of the launcher
|
|
||||||
*/
|
|
||||||
public void setTarget(Vector3 target);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Places a missile into the launcher.
|
|
||||||
*/
|
|
||||||
public void placeMissile(ItemStack itemStack);
|
|
||||||
|
|
||||||
public IMissile getMissile();
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import icbm.api.explosion.IExplosiveContainer;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is an interface applied by all missile entities. You may cast this into an @Entity. The
|
|
||||||
* "set" version of the function will make the entity do the action on the next tick.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*/
|
|
||||||
public interface IMissile extends IExplosiveContainer
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Blows up this missile. It will detonate the missile with the appropriate explosion.
|
|
||||||
*/
|
|
||||||
public void explode();
|
|
||||||
|
|
||||||
public void setExplode();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Blows up this missile like a TNT explosion. Small explosion used for events such as a missile
|
|
||||||
* crashing or failure to explode will result in this function being called.
|
|
||||||
*/
|
|
||||||
public void normalExplode();
|
|
||||||
|
|
||||||
public void setNormalExplode();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Drops the specified missile as an item.
|
|
||||||
*/
|
|
||||||
public void dropMissileAsItem();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The amount of ticks this missile has been flying for. Returns -1 if the missile is not
|
|
||||||
* flying.
|
|
||||||
*/
|
|
||||||
public int getTicksInAir();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the launcher this missile is launched from.
|
|
||||||
*/
|
|
||||||
public ILauncherContainer getLauncher();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launches the missile into a specific target.
|
|
||||||
*
|
|
||||||
* @param target
|
|
||||||
*/
|
|
||||||
public void launch(Vector3 target);
|
|
||||||
|
|
||||||
public void launch(Vector3 target, int height);
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implement this to your entity if you want antiballistic missiles to be able to lock onto it.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IMissileLockable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Can this entity be locked on by a missile?
|
|
||||||
*
|
|
||||||
* @return True if so.
|
|
||||||
*/
|
|
||||||
public boolean canLock(IMissile missile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the predicted position of this entity after a specified amount of ticks.
|
|
||||||
*
|
|
||||||
* @param ticks - The amount of time.
|
|
||||||
* @return The predicted Vector, or if not predictable, the current position.
|
|
||||||
*/
|
|
||||||
public Vector3 getPredictedPosition(int ticks);
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make your TileEntity implement this to have special reaction to radar scanning.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IRadarDetectable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param radar - The radar tile entity
|
|
||||||
* @return True if this tile is to be shown in the radar.
|
|
||||||
*/
|
|
||||||
public boolean canDetect(TileEntity radar);
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This interface should be applied to all things that has a tier/level.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ITier
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Gets the tier of this object
|
|
||||||
*
|
|
||||||
* @return - The tier
|
|
||||||
*/
|
|
||||||
public int getTier();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the tier of the object
|
|
||||||
*
|
|
||||||
* @param tier - The tier to be set
|
|
||||||
*/
|
|
||||||
public void setTier(int tier);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public interface ITracker
|
|
||||||
{
|
|
||||||
public void setTrackingEntity(ItemStack itemStack, Entity entity);
|
|
||||||
|
|
||||||
public Entity getTrackingEntity(World worldObj, ItemStack itemStack);
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Types of missile launchers
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public enum LauncherType
|
|
||||||
{
|
|
||||||
TRADITIONAL, CRUISE
|
|
||||||
}
|
|
|
@ -1,150 +0,0 @@
|
||||||
package icbm.api;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
import universalelectricity.prefab.vector.Region2;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class allows you to register TileEntities and Entities to be detectable by the ICBM radar.
|
|
||||||
*
|
|
||||||
* Make sure you unregister your object when it invalidates!
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class RadarRegistry
|
|
||||||
{
|
|
||||||
private static Set<TileEntity> detectableTileEntities = new HashSet<TileEntity>();
|
|
||||||
private static Set<Entity> detectableEntities = new HashSet<Entity>();
|
|
||||||
|
|
||||||
public static void register(TileEntity tileEntity)
|
|
||||||
{
|
|
||||||
if (!detectableTileEntities.contains(tileEntity))
|
|
||||||
{
|
|
||||||
detectableTileEntities.add(tileEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void unregister(TileEntity tileEntity)
|
|
||||||
{
|
|
||||||
if (detectableTileEntities.contains(tileEntity))
|
|
||||||
{
|
|
||||||
detectableTileEntities.remove(tileEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void register(Entity entity)
|
|
||||||
{
|
|
||||||
if (!detectableEntities.contains(entity))
|
|
||||||
{
|
|
||||||
detectableEntities.add(entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void unregister(Entity entity)
|
|
||||||
{
|
|
||||||
if (detectableEntities.contains(entity))
|
|
||||||
{
|
|
||||||
detectableEntities.remove(entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<TileEntity> getTileEntitiesInArea(Vector2 minVector, Vector2 maxVector)
|
|
||||||
{
|
|
||||||
cleanUpArray();
|
|
||||||
List<TileEntity> returnArray = new ArrayList<TileEntity>();
|
|
||||||
|
|
||||||
for (TileEntity tileEntity : detectableTileEntities)
|
|
||||||
{
|
|
||||||
if (new Region2(minVector, maxVector).isIn(new Vector3(tileEntity).toVector2()))
|
|
||||||
{
|
|
||||||
returnArray.add(tileEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Entity> getEntitiesWithinRadius(Vector2 vector, int radius)
|
|
||||||
{
|
|
||||||
cleanUpArray();
|
|
||||||
List<Entity> returnArray = new ArrayList<Entity>();
|
|
||||||
|
|
||||||
for (Entity entity : detectableEntities)
|
|
||||||
{
|
|
||||||
if (Vector2.distance(vector, new Vector3(entity).toVector2()) <= radius)
|
|
||||||
{
|
|
||||||
returnArray.add(entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Set<TileEntity> getTileEntities()
|
|
||||||
{
|
|
||||||
cleanUpArray();
|
|
||||||
return detectableTileEntities;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Set<Entity> getEntities()
|
|
||||||
{
|
|
||||||
cleanUpArray();
|
|
||||||
return detectableEntities;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void cleanUpArray()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Iterator<TileEntity> it = detectableTileEntities.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
TileEntity tileEntity = it.next();
|
|
||||||
|
|
||||||
if (tileEntity == null)
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
}
|
|
||||||
else if (tileEntity.isInvalid())
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
}
|
|
||||||
else if (tileEntity.worldObj.getBlockTileEntity(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord) != tileEntity)
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Iterator<Entity> it2 = detectableEntities.iterator();
|
|
||||||
|
|
||||||
while (it2.hasNext())
|
|
||||||
{
|
|
||||||
Entity entity = it2.next();
|
|
||||||
|
|
||||||
if (entity == null)
|
|
||||||
{
|
|
||||||
it2.remove();
|
|
||||||
}
|
|
||||||
else if (entity.isDead)
|
|
||||||
{
|
|
||||||
it2.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
System.out.println("Failed to clean up radar list properly.");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,141 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.world.Explosion;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.event.Cancelable;
|
|
||||||
import net.minecraftforge.event.Event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Use ForgeSubscribe to subscribe to this event. This event is called every single time when an
|
|
||||||
* ICBM explosion happens.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Cancelable
|
|
||||||
public class ExplosionEvent extends Event
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The explosion object. Can be cast into {@link Explosion}. This event can be canceled to
|
|
||||||
* prevent a specific part of an explosion from being executed.
|
|
||||||
*/
|
|
||||||
public World world;
|
|
||||||
public double x, y, z;
|
|
||||||
public IExplosion iExplosion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pre-cast explosion class.
|
|
||||||
*/
|
|
||||||
public Explosion explosion;
|
|
||||||
|
|
||||||
public ExplosionEvent(World world, IExplosion iExplosion)
|
|
||||||
{
|
|
||||||
this.world = world;
|
|
||||||
this.iExplosion = iExplosion;
|
|
||||||
this.x = ((Explosion) iExplosion).explosionX;
|
|
||||||
this.y = ((Explosion) iExplosion).explosionY;
|
|
||||||
this.z = ((Explosion) iExplosion).explosionZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called before an explosive is detonated or a missile is placed to check if detonation is
|
|
||||||
* possible. You may cancel and explosion here if needed. After this it will be a bit too late
|
|
||||||
* to prevent destruction without any losses.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Cancelable
|
|
||||||
public static class ExplosivePreDetonationEvent extends Event
|
|
||||||
{
|
|
||||||
/** The world object */
|
|
||||||
public World world;
|
|
||||||
/** The entity causing the explosion. This could be null */
|
|
||||||
public Entity entity;
|
|
||||||
/** The position in which the explosion might happen. */
|
|
||||||
public double x, y, z;
|
|
||||||
/** The explosive object. */
|
|
||||||
public IExplosive explosion;
|
|
||||||
/** The explosive type. */
|
|
||||||
public ExplosiveType type;
|
|
||||||
|
|
||||||
public ExplosivePreDetonationEvent(World world, double x, double y, double z, ExplosiveType type, IExplosive explosion)
|
|
||||||
{
|
|
||||||
this.world = world;
|
|
||||||
this.type = type;
|
|
||||||
this.explosion = explosion;
|
|
||||||
this.x = x;
|
|
||||||
this.y = y;
|
|
||||||
this.z = z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExplosivePreDetonationEvent(World world, Entity entity, ExplosiveType type, IExplosive explosion)
|
|
||||||
{
|
|
||||||
this.world = world;
|
|
||||||
this.entity = entity;
|
|
||||||
this.type = type;
|
|
||||||
this.explosion = explosion;
|
|
||||||
this.x = entity.posX;
|
|
||||||
this.y = entity.posY;
|
|
||||||
this.z = entity.posZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when an explosion is constructed.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static class ExplosionConstructionEvent extends ExplosionEvent
|
|
||||||
{
|
|
||||||
public ExplosionConstructionEvent(World world, IExplosion explosion)
|
|
||||||
{
|
|
||||||
super(world, explosion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called before an explosion happens.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static class PreExplosionEvent extends ExplosionEvent
|
|
||||||
{
|
|
||||||
public PreExplosionEvent(World world, IExplosion explosion)
|
|
||||||
{
|
|
||||||
super(world, explosion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called while an explosion happens. May be called every single tick if explosion is
|
|
||||||
* procedural. (E.g: Red matter explosive)
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static class DoExplosionEvent extends ExplosionEvent
|
|
||||||
{
|
|
||||||
public DoExplosionEvent(World world, IExplosion explosion)
|
|
||||||
{
|
|
||||||
super(world, explosion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after an explosion happens.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static class PostExplosionEvent extends ExplosionEvent
|
|
||||||
{
|
|
||||||
public PostExplosionEvent(World world, IExplosion explosion)
|
|
||||||
{
|
|
||||||
super(world, explosion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
public enum ExplosiveType
|
|
||||||
{
|
|
||||||
ALL,
|
|
||||||
/** An explosive in TNT block form. */
|
|
||||||
BLOCK,
|
|
||||||
/** An explosive in item form such as a grenade. */
|
|
||||||
ITEM,
|
|
||||||
/** An explosive in aircraft form such as a missile. */
|
|
||||||
AIR,
|
|
||||||
/** An explosive in vehicle form such as a minecart. */
|
|
||||||
VEHICLE;
|
|
||||||
|
|
||||||
public static ExplosiveType get(int id)
|
|
||||||
{
|
|
||||||
if (id >= 0 && id < ExplosiveType.values().length)
|
|
||||||
{
|
|
||||||
return ExplosiveType.values()[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all blocks that has a custom reaction to EMPs. Blocks not TileEntities.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IEMPBlock
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called when this block gets attacked by EMP.
|
|
||||||
*
|
|
||||||
* @param world - The world object.
|
|
||||||
* @param position - The position.
|
|
||||||
* @param empExplosive - The explosion
|
|
||||||
*/
|
|
||||||
public void onEMP(World world, Vector3 position, IExplosion empExplosive);
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import universalelectricity.core.item.IItemElectric;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to all items that can be protected from EMP somehow.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IEMPItem extends IItemElectric
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called when this item is being EMPed
|
|
||||||
*
|
|
||||||
* @param itemStack - The itemstack attacked by EMP
|
|
||||||
* @param entity - The entity holding the item
|
|
||||||
* @param empExplosives - The IExplosive object
|
|
||||||
*/
|
|
||||||
public void onEMP(ItemStack itemStack, Entity entity, IExplosion empExplosive);
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The actual explosion interface. Extends Explosion.java.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IExplosion
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called to initiate the explosion.
|
|
||||||
*/
|
|
||||||
public void explode();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The radius of effect of the explosion.
|
|
||||||
*/
|
|
||||||
public float getRadius();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The energy emitted by this explosive. In Joules and approximately based off of a real
|
|
||||||
* life equivalent.
|
|
||||||
*/
|
|
||||||
public float getEnergy();
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
import icbm.api.ITier;
|
|
||||||
import net.minecraft.client.model.ModelBase;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.util.Icon;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An interface used to find various types of explosive's information.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IExplosive extends ITier
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return Gets the explosive's ID.
|
|
||||||
*/
|
|
||||||
public int getID();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The unique name key in the ICBM language file.
|
|
||||||
*/
|
|
||||||
public String getUnlocalizedName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets the specific translated name of the block versions of the explosive.
|
|
||||||
*/
|
|
||||||
public String getExplosiveName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets the specific translated name of the grenade versions of the explosive.
|
|
||||||
*/
|
|
||||||
public String getGrenadeName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets the specific translated name of the missile versions of the explosive.
|
|
||||||
*/
|
|
||||||
public String getMissileName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets the specific translated name of the minecart versions of the explosive.
|
|
||||||
*/
|
|
||||||
public String getMinecartName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The tier of the explosive.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int getTier();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new explosion at a given location.
|
|
||||||
*
|
|
||||||
* @param world The world in which the explosion takes place.
|
|
||||||
* @param x The X-Coord
|
|
||||||
* @param y The Y-Coord
|
|
||||||
* @param z The Z-Coord
|
|
||||||
* @param entity Entity that caused the explosion.
|
|
||||||
*/
|
|
||||||
public void createExplosion(World world, double x, double y, double z, Entity entity);
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ModelBase getBlockModel();
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ModelBase getMissileModel();
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public ResourceLocation getBlockResource();
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public Icon getIcon();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object that contains a reference to IExplosive. Carried by explosives, grenades and missile
|
|
||||||
* entities etc.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IExplosiveContainer
|
|
||||||
{
|
|
||||||
public NBTTagCompound getTagCompound();
|
|
||||||
|
|
||||||
public IExplosive getExplosiveType();
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package icbm.api.explosion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to entities that ignore the affects of a specific explosion.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IExplosiveIgnore
|
|
||||||
{
|
|
||||||
public boolean canIgnore(IExplosion explosion);
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
package icbm.api.sentry;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Apply this to an entity if it is meant to be targeted by the AA Turret.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IAATarget
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* destroys the target with a boom. This is a forced way for the sentry too kill the target if
|
|
||||||
* it doesn't take damage
|
|
||||||
*/
|
|
||||||
public void destroyCraft();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applies damage to the the target
|
|
||||||
*
|
|
||||||
* @param damage - damage in half HP
|
|
||||||
* @return the amount of HP left. Return -1 if this target can't take damage, and will be chance
|
|
||||||
* killed. Return 0 if this target is dead and destroyCraft() will be called.
|
|
||||||
*/
|
|
||||||
public int doDamage(int damage);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Can this be targeted by automated targeting systems or AIs. Used to implement radar jammers,
|
|
||||||
* cloaking devices, and other addons for the Entity being targeted
|
|
||||||
*
|
|
||||||
* @param entity - entity that is targeting this, can be an Entity, EntityLiving, or TileEntity
|
|
||||||
* @return true if it can
|
|
||||||
*/
|
|
||||||
public boolean canBeTargeted(Object entity);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
|
|
||||||
public class Blacklist
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Adds blocks to this black list if you do not wish them to be moved by the following:
|
|
||||||
*/
|
|
||||||
public static final Set<Block> stabilizationBlacklist = new HashSet<Block>();
|
|
||||||
public static final Set<Block> disintegrationBlacklist = new HashSet<Block>();
|
|
||||||
public static final Set<Block> forceManipulationBlacklist = new HashSet<Block>();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.event.Cancelable;
|
|
||||||
import net.minecraftforge.event.Event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The event called when stabilizing a field into solid blocks. Canceling
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Cancelable
|
|
||||||
public class EventStabilize extends Event
|
|
||||||
{
|
|
||||||
public final World world;
|
|
||||||
public final ItemStack itemStack;
|
|
||||||
public final int x, y, z;
|
|
||||||
|
|
||||||
public EventStabilize(World world, int x, int y, int z, ItemStack itemStack)
|
|
||||||
{
|
|
||||||
this.world = world;
|
|
||||||
this.x = x;
|
|
||||||
this.y = y;
|
|
||||||
this.z = z;
|
|
||||||
this.itemStack = itemStack;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
public interface IActivatable
|
|
||||||
{
|
|
||||||
public boolean isActive();
|
|
||||||
|
|
||||||
public void setActive(boolean flag);
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.security.IBiometricIdentifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to TileEntities that can be linked with a Biometric Identifier.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IBiometricIdentifierLink
|
|
||||||
{
|
|
||||||
public IBiometricIdentifier getBiometricIdentifier();
|
|
||||||
|
|
||||||
public Set<IBiometricIdentifier> getBiometricIdentifiers();
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For objects that uses caching method to speed up process power.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ICache
|
|
||||||
{
|
|
||||||
public Object getCache(String cacheID);
|
|
||||||
|
|
||||||
public void clearCache(String cacheID);
|
|
||||||
|
|
||||||
public void clearCache();
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.modules.IModule;
|
|
||||||
import mffs.api.modules.IModuleAcceptor;
|
|
||||||
import mffs.api.modules.IProjectorMode;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
import universalelectricity.prefab.tile.IRotatable;
|
|
||||||
|
|
||||||
public interface IFieldInteraction extends IModuleAcceptor, IRotatable, IActivatable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Gets the mode of the projector, mainly the shape and size of it.
|
|
||||||
*/
|
|
||||||
public IProjectorMode getMode();
|
|
||||||
|
|
||||||
public ItemStack getModeStack();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the slot IDs based on the direction given.
|
|
||||||
*/
|
|
||||||
public int[] getSlotsBasedOnDirection(ForgeDirection direction);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the unspecified, direction-unspecific module slots on the left side of the GUI.
|
|
||||||
*/
|
|
||||||
public int[] getModuleSlots();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param module - The module instance.
|
|
||||||
* @param direction - The direction facing.
|
|
||||||
* @return Gets the amount of modules based on the side.
|
|
||||||
*/
|
|
||||||
public int getSidedModuleCount(IModule module, ForgeDirection... direction);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transformation information functions. Returns CACHED information unless the cache is cleared.
|
|
||||||
*/
|
|
||||||
public Vector3 getTranslation();
|
|
||||||
|
|
||||||
public Vector3 getPositiveScale();
|
|
||||||
|
|
||||||
public Vector3 getNegativeScale();
|
|
||||||
|
|
||||||
public int getRotationYaw();
|
|
||||||
|
|
||||||
public int getRotationPitch();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * @return Gets all the relative block coordinates that are occupying the force field.
|
|
||||||
*/
|
|
||||||
public Set<Vector3> getCalculatedField();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the interior points of the projector. This might cause lag so call sparingly.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Set<Vector3> getInteriorPoints();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Force field calculation flags.
|
|
||||||
*/
|
|
||||||
public void setCalculating(boolean bool);
|
|
||||||
|
|
||||||
public void setCalculated(boolean bool);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public abstract interface IForceFieldBlock
|
|
||||||
{
|
|
||||||
public IProjector getProjector(IBlockAccess iBlockAccess, int x, int y, int z);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Weakens a force field block, destroying it temporarily and draining power from the projector.
|
|
||||||
*
|
|
||||||
* @param joules - Power to drain.
|
|
||||||
*/
|
|
||||||
public void weakenForceField(World world, int x, int y, int z, int joules);
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Also extends IDisableable, IFortronFrequency
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public abstract interface IProjector extends IInventory, IBiometricIdentifierLink, IFieldInteraction
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Projects a force field.
|
|
||||||
*/
|
|
||||||
public void projectField();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destroys a force field.
|
|
||||||
*/
|
|
||||||
public void destroyField();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The speed in which a force field is constructed.
|
|
||||||
*/
|
|
||||||
public int getProjectionSpeed();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* * @return The amount of ticks this projector has existed in the world.
|
|
||||||
*/
|
|
||||||
public long getTicks();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package mffs.api;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to TileEntities who would like to handle movement by the force manipulation in a better
|
|
||||||
* way.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ISpecialForceManipulation
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called before the TileEntity is moved. After this function is called, the TileEntity will be
|
|
||||||
* moved after 1 second exactly (due to the fact that there is an animation delay).
|
|
||||||
*
|
|
||||||
* @param Coords - X, Y, Z (Target location to be moved)
|
|
||||||
* @return True if it can be moved.
|
|
||||||
*/
|
|
||||||
public boolean preMove(int x, int y, int z);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called right before the TileEntity is moved. After this function is called, the force
|
|
||||||
* manipulator will write all TileEntity data into NBT and remove the TileEntity block. A new
|
|
||||||
* TileEntity class will be instantiated after words in the new position.
|
|
||||||
*
|
|
||||||
* @param Coords - X, Y, Z (Target location to be moved)
|
|
||||||
*/
|
|
||||||
public void move(int x, int y, int z);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after the TileEntity is moved. The TileEntity will be given a
|
|
||||||
* notifyBlocksOfNeighborChange call before this is called.
|
|
||||||
*/
|
|
||||||
public void postMove();
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package mffs.api.card;
|
|
||||||
|
|
||||||
public interface ICard
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package mffs.api.card;
|
|
||||||
|
|
||||||
import mffs.api.security.Permission;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to Item ID cards.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface ICardIdentification extends ICard
|
|
||||||
{
|
|
||||||
public boolean hasPermission(ItemStack itemStack, Permission permission);
|
|
||||||
|
|
||||||
public boolean addPermission(ItemStack itemStack, Permission permission);
|
|
||||||
|
|
||||||
public boolean removePermission(ItemStack itemStack, Permission permission);
|
|
||||||
|
|
||||||
public String getUsername(ItemStack itemStack);
|
|
||||||
|
|
||||||
public void setUsername(ItemStack itemStack, String username);
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package mffs.api.card;
|
|
||||||
|
|
||||||
public interface ICardInfinite
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package mffs.api.card;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
public interface ICoordLink
|
|
||||||
{
|
|
||||||
public void setLink(ItemStack itemStack, Vector3 position);
|
|
||||||
|
|
||||||
public Vector3 getLink(ItemStack itemStack);
|
|
||||||
}
|
|
|
@ -1,191 +0,0 @@
|
||||||
package mffs.api.fortron;
|
|
||||||
|
|
||||||
import icbm.api.IBlockFrequency;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.fortron.IFortronFrequency;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A grid MFFS uses to search for machines with frequencies that can be linked and spread Fortron
|
|
||||||
* energy.
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class FrequencyGrid
|
|
||||||
{
|
|
||||||
private static FrequencyGrid CLIENT_INSTANCE = new FrequencyGrid();
|
|
||||||
private static FrequencyGrid SERVER_INSTANCE = new FrequencyGrid();
|
|
||||||
|
|
||||||
private final Set<IBlockFrequency> frequencyGrid = new HashSet<IBlockFrequency>();
|
|
||||||
|
|
||||||
public void register(IBlockFrequency tileEntity)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Iterator<IBlockFrequency> it = this.frequencyGrid.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
IBlockFrequency frequency = it.next();
|
|
||||||
|
|
||||||
if (frequency == null)
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((TileEntity) frequency).isInvalid())
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (new Vector3((TileEntity) frequency).equals(new Vector3((TileEntity) tileEntity)))
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.frequencyGrid.add(tileEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void unregister(IBlockFrequency tileEntity)
|
|
||||||
{
|
|
||||||
this.frequencyGrid.remove(tileEntity);
|
|
||||||
this.cleanUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<IBlockFrequency> get()
|
|
||||||
{
|
|
||||||
return this.frequencyGrid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a list of TileEntities that has a specific frequency.
|
|
||||||
*
|
|
||||||
* @param frequency - The Frequency
|
|
||||||
* */
|
|
||||||
public Set<IBlockFrequency> get(int frequency)
|
|
||||||
{
|
|
||||||
Set<IBlockFrequency> set = new HashSet<IBlockFrequency>();
|
|
||||||
|
|
||||||
for (IBlockFrequency tile : this.get())
|
|
||||||
{
|
|
||||||
if (tile != null && !((TileEntity) tile).isInvalid())
|
|
||||||
{
|
|
||||||
if (tile.getFrequency() == frequency)
|
|
||||||
{
|
|
||||||
set.add(tile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void cleanUp()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Iterator<IBlockFrequency> it = this.frequencyGrid.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
IBlockFrequency frequency = it.next();
|
|
||||||
|
|
||||||
if (frequency == null)
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((TileEntity) frequency).isInvalid())
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((TileEntity) frequency).worldObj.getBlockTileEntity(((TileEntity) frequency).xCoord, ((TileEntity) frequency).yCoord, ((TileEntity) frequency).zCoord) != ((TileEntity) frequency))
|
|
||||||
{
|
|
||||||
it.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<IBlockFrequency> get(World world, Vector3 position, int radius, int frequency)
|
|
||||||
{
|
|
||||||
Set<IBlockFrequency> set = new HashSet<IBlockFrequency>();
|
|
||||||
|
|
||||||
for (IBlockFrequency tileEntity : this.get(frequency))
|
|
||||||
{
|
|
||||||
if (((TileEntity) tileEntity).worldObj == world)
|
|
||||||
{
|
|
||||||
if (Vector3.distance(new Vector3((TileEntity) tileEntity), position) <= radius)
|
|
||||||
{
|
|
||||||
set.add(tileEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return set;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<IFortronFrequency> getFortronTiles(World world, Vector3 position, int radius, int frequency)
|
|
||||||
{
|
|
||||||
Set<IFortronFrequency> set = new HashSet<IFortronFrequency>();
|
|
||||||
|
|
||||||
for (IBlockFrequency tileEntity : this.get(frequency))
|
|
||||||
{
|
|
||||||
if (((TileEntity) tileEntity).worldObj == world && tileEntity instanceof IFortronFrequency)
|
|
||||||
{
|
|
||||||
if (Vector3.distance(new Vector3((TileEntity) tileEntity), position) <= radius)
|
|
||||||
{
|
|
||||||
set.add((IFortronFrequency) tileEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return set;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to re-initiate the grid. Used when server restarts or when player rejoins a world to
|
|
||||||
* clean up previously registered objects.
|
|
||||||
*/
|
|
||||||
public static void reinitiate()
|
|
||||||
{
|
|
||||||
CLIENT_INSTANCE = new FrequencyGrid();
|
|
||||||
SERVER_INSTANCE = new FrequencyGrid();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static FrequencyGrid instance()
|
|
||||||
{
|
|
||||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
|
|
||||||
{
|
|
||||||
return SERVER_INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CLIENT_INSTANCE;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package mffs.api.fortron;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to the Fortron Capacitor TileEntity. Extends IFortronFrequency
|
|
||||||
*
|
|
||||||
* @author Calclavia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface IFortronCapacitor
|
|
||||||
{
|
|
||||||
public Set<IFortronFrequency> getLinkedDevices();
|
|
||||||
|
|
||||||
public int getTransmissionRange();
|
|
||||||
|
|
||||||
public int getTransmissionRate();
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
package mffs.api.fortron;
|
|
||||||
|
|
||||||
import icbm.api.IBlockFrequency;
|
|
||||||
|
|
||||||
public interface IFortronFrequency extends IFortronStorage, IBlockFrequency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
package mffs.api.fortron;
|
|
||||||
|
|
||||||
public interface IFortronStorage
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Sets the amount of fortron energy.
|
|
||||||
*
|
|
||||||
* @param joules
|
|
||||||
*/
|
|
||||||
public void setFortronEnergy(int joules);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets the amount of fortron stored.
|
|
||||||
*/
|
|
||||||
public int getFortronEnergy();
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return Gets the maximum possible amount of fortron that can be stored.
|
|
||||||
*/
|
|
||||||
public int getFortronCapacity();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to use and consume fortron energy from this storage unit.
|
|
||||||
*
|
|
||||||
* @param joules - Amount of fortron energy to use.
|
|
||||||
* @param doUse - True if actually using, false if just simulating.
|
|
||||||
* @return joules - The amount of energy that was actually provided.
|
|
||||||
*/
|
|
||||||
public int requestFortron(int joules, boolean doUse);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to use and give fortron energy from this storage unit.
|
|
||||||
*
|
|
||||||
* @param joules - Amount of fortron energy to give.
|
|
||||||
* @param doUse - True if actually using, false if just simulating.
|
|
||||||
*
|
|
||||||
* @return joules - The amount of energy that was actually injected.
|
|
||||||
*/
|
|
||||||
public int provideFortron(int joules, boolean doUse);
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package mffs.api.modules;
|
|
||||||
|
|
||||||
import mffs.api.security.IInterdictionMatrix;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
|
|
||||||
public interface IInterdictionMatrixModule extends IModule
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called when the Interdiction Matrix attempts to defend a region.
|
|
||||||
*
|
|
||||||
* @return True if to stop processing other modules in this list.
|
|
||||||
*/
|
|
||||||
public boolean onDefend(IInterdictionMatrix defenseStation, EntityLivingBase entityLiving);
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
package mffs.api.modules;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.IFieldInteraction;
|
|
||||||
import mffs.api.IProjector;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
public interface IModule
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The amount of Fortron this module consumes per tick.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public float getFortronCost(float amplifier);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called before the projector projects a field.
|
|
||||||
*
|
|
||||||
* @param projector
|
|
||||||
* @return True to stop projecting.
|
|
||||||
*/
|
|
||||||
boolean onProject(IProjector projector, Set<Vector3> field);
|
|
||||||
|
|
||||||
boolean onDestroy(IProjector projector, Set<Vector3> field);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called right after the projector creates a force field block.
|
|
||||||
*
|
|
||||||
* @param projector
|
|
||||||
* @param position
|
|
||||||
* @return 0 - Do nothing; 1 - Skip this block and continue; 2 - Cancel rest of projection;
|
|
||||||
*/
|
|
||||||
|
|
||||||
public int onProject(IProjector projector, Vector3 position);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when an entity collides with a force field block.
|
|
||||||
*
|
|
||||||
* @return True to stop the default process of entity collision.
|
|
||||||
*/
|
|
||||||
public boolean onCollideWithForceField(World world, int x, int y, int z, Entity entity, ItemStack moduleStack);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called in this module when it is being calculated by the projector.
|
|
||||||
*
|
|
||||||
* @return False if to prevent this position from being added to the projection que.
|
|
||||||
*/
|
|
||||||
public void onCalculate(IFieldInteraction projector, Set<Vector3> fieldDefinition);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package mffs.api.modules;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public interface IModuleAcceptor
|
|
||||||
{
|
|
||||||
public ItemStack getModule(IModule module);
|
|
||||||
|
|
||||||
public int getModuleCount(IModule module, int... slots);
|
|
||||||
|
|
||||||
public Set<ItemStack> getModuleStacks(int... slots);
|
|
||||||
|
|
||||||
public Set<IModule> getModules(int... slots);
|
|
||||||
|
|
||||||
public int getFortronCost();
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
package mffs.api.modules;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.IFieldInteraction;
|
|
||||||
import mffs.api.IProjector;
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
|
||||||
|
|
||||||
public interface IProjectorMode
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Called when the force field projector calculates the shape of the module.
|
|
||||||
*
|
|
||||||
* @param projector - The Projector Object. Can cast to TileEntity.
|
|
||||||
* @param forceField - The blocks actually making up the force field. This array of blocks are
|
|
||||||
* NOT affected by rotation or translation.
|
|
||||||
*/
|
|
||||||
public Set<Vector3> getExteriorPoints(IFieldInteraction projector);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gets all interior points. Not translated or rotated.
|
|
||||||
*/
|
|
||||||
public Set<Vector3> getInteriorPoints(IFieldInteraction projector);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Is this specific position inside of this force field?
|
|
||||||
*/
|
|
||||||
public boolean isInField(IFieldInteraction projector, Vector3 position);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to render an object in front of the projection.
|
|
||||||
*/
|
|
||||||
public void render(IProjector projector, double x, double y, double z, float f, long ticks);
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
package mffs.api.security;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applied to Biometric Identifiers (extends TileEntity).
|
|
||||||
*/
|
|
||||||
public interface IBiometricIdentifier
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Is access granted to this specific user?
|
|
||||||
*
|
|
||||||
* @param username - Minecraft username.
|
|
||||||
* @param permission - The permission.
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean isAccessGranted(String username, Permission permission);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the owner of the security center.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getOwner();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the card currently placed in the manipulating slot.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public ItemStack getManipulatingCard();
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
package mffs.api.security;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import mffs.api.IActivatable;
|
|
||||||
import mffs.api.IBiometricIdentifierLink;
|
|
||||||
import mffs.api.fortron.IFortronFrequency;
|
|
||||||
import mffs.api.modules.IModuleAcceptor;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public interface IInterdictionMatrix extends IInventory, IFortronFrequency, IModuleAcceptor, IBiometricIdentifierLink, IActivatable
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The range in which the Interdiction Matrix starts warning the player.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public int getWarningRange();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The range in which the Interdiction Matrix has an effect on.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public int getActionRange();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Merges an item into the Interdiction Matrix's safe keeping inventory.
|
|
||||||
*
|
|
||||||
* @param itemStack
|
|
||||||
* @return True if kept, false if dropped.
|
|
||||||
*/
|
|
||||||
public boolean mergeIntoInventory(ItemStack itemStack);
|
|
||||||
|
|
||||||
public Set<ItemStack> getFilteredItems();
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return True if the filtering is on ban mode. False if it is on allow-only mode.
|
|
||||||
*/
|
|
||||||
public boolean getFilterMode();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getFortronCost();
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
package mffs.api.security;
|
|
||||||
|
|
||||||
public class Permission
|
|
||||||
{
|
|
||||||
// TODO: FIX NAMES
|
|
||||||
/**
|
|
||||||
* Force Field Wrap - Allows a player to go through force fields.
|
|
||||||
*/
|
|
||||||
public static final Permission FORCE_FIELD_WARP = new Permission(0, "warp");
|
|
||||||
/**
|
|
||||||
* Place Access - Allows to open GUIs and activate blocks.
|
|
||||||
*/
|
|
||||||
public static final Permission BLOCK_ALTER = new Permission(1, "blockPlaceAccess");
|
|
||||||
/**
|
|
||||||
* Block Access - Allows block access and opening GUIs.
|
|
||||||
*/
|
|
||||||
public static final Permission BLOCK_ACCESS = new Permission(2, "blockAccess");
|
|
||||||
/**
|
|
||||||
* Configure - Allows to configure biometric identifiers.
|
|
||||||
*/
|
|
||||||
public static final Permission SECURITY_CENTER_CONFIGURE = new Permission(3, "configure");
|
|
||||||
/**
|
|
||||||
* Bypass Confiscation - Allows the bypassing of interdiction matrix confiscation.
|
|
||||||
*/
|
|
||||||
public static final Permission BYPASS_INTERDICTION_MATRIX = new Permission(4, "bypassDefense");
|
|
||||||
/**
|
|
||||||
* Remote Control - Allows the usage of a remote control to open GUIs remotely.
|
|
||||||
*/
|
|
||||||
public static final Permission DEFENSE_STATION_CONFISCATION = new Permission(5, "bypassConfiscation");
|
|
||||||
/**
|
|
||||||
* Remote Control - Allows player to remotely control blocks with the remote.
|
|
||||||
*/
|
|
||||||
public static final Permission REMOTE_CONTROL = new Permission(6, "remoteControl");
|
|
||||||
|
|
||||||
private static Permission[] LIST;
|
|
||||||
|
|
||||||
public final int id;
|
|
||||||
public final String name;
|
|
||||||
|
|
||||||
public Permission(int id, String name)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
this.name = name;
|
|
||||||
|
|
||||||
if (LIST == null)
|
|
||||||
{
|
|
||||||
LIST = new Permission[7];
|
|
||||||
}
|
|
||||||
|
|
||||||
LIST[this.id] = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Permission getPermission(int id)
|
|
||||||
{
|
|
||||||
if (id < LIST.length && id >= 0)
|
|
||||||
{
|
|
||||||
return LIST[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Permission[] getPermissions()
|
|
||||||
{
|
|
||||||
return LIST;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,12 +18,11 @@ import com.builtbroken.assemblyline.item.EnumTool;
|
||||||
import com.builtbroken.assemblyline.item.ItemCommonTool;
|
import com.builtbroken.assemblyline.item.ItemCommonTool;
|
||||||
import com.builtbroken.assemblyline.item.ItemOreDirv;
|
import com.builtbroken.assemblyline.item.ItemOreDirv;
|
||||||
import com.builtbroken.assemblyline.item.ItemParts;
|
import com.builtbroken.assemblyline.item.ItemParts;
|
||||||
|
import com.builtbroken.assemblyline.item.ItemParts.Parts;
|
||||||
import com.builtbroken.assemblyline.item.ItemReadoutTools;
|
import com.builtbroken.assemblyline.item.ItemReadoutTools;
|
||||||
import com.builtbroken.assemblyline.item.ItemWrench;
|
import com.builtbroken.assemblyline.item.ItemWrench;
|
||||||
import com.builtbroken.assemblyline.item.ItemParts.Parts;
|
|
||||||
import com.builtbroken.assemblyline.machine.BlockCrate;
|
import com.builtbroken.assemblyline.machine.BlockCrate;
|
||||||
import com.builtbroken.assemblyline.machine.processor.BlockProcessor;
|
import com.builtbroken.assemblyline.machine.processor.BlockProcessor;
|
||||||
import com.builtbroken.assemblyline.transmit.BlockWire;
|
|
||||||
import com.builtbroken.minecraft.EnumMaterial;
|
import com.builtbroken.minecraft.EnumMaterial;
|
||||||
import com.builtbroken.minecraft.EnumOrePart;
|
import com.builtbroken.minecraft.EnumOrePart;
|
||||||
import com.builtbroken.minecraft.helpers.ColorCode;
|
import com.builtbroken.minecraft.helpers.ColorCode;
|
||||||
|
@ -227,10 +226,10 @@ public class ALRecipeLoader extends RecipeLoader
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockSolar, 1), "GGG", "SCS", "SWS", 'G', Block.glass, 'W', "copperWire", 'C', circuit, 'S', steel));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockSolar, 1), "GGG", "SCS", "SWS", 'G', Block.glass, 'W', "copperWire", 'C', circuit, 'S', steel));
|
||||||
}
|
}
|
||||||
if (blockWire instanceof BlockWire)
|
//if (blockWire instanceof BlockWire)
|
||||||
{
|
//{
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockWire, 16, 1), "III", "WWW", "III", 'I', Block.cloth, 'W', copper));
|
// GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockWire, 16, 1), "III", "WWW", "III", 'I', Block.cloth, 'W', copper));
|
||||||
}
|
//}
|
||||||
if (itemDiggingTool instanceof ItemCommonTool)
|
if (itemDiggingTool instanceof ItemCommonTool)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,6 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||||
import org.modstats.ModstatInfo;
|
import org.modstats.ModstatInfo;
|
||||||
import org.modstats.Modstats;
|
import org.modstats.Modstats;
|
||||||
|
|
||||||
import universalelectricity.prefab.TranslationHelper;
|
|
||||||
import universalelectricity.prefab.ore.OreGenReplaceStone;
|
|
||||||
import universalelectricity.prefab.ore.OreGenerator;
|
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.TaskRegistry;
|
import com.builtbroken.assemblyline.api.coding.TaskRegistry;
|
||||||
import com.builtbroken.assemblyline.armbot.BlockArmbot;
|
import com.builtbroken.assemblyline.armbot.BlockArmbot;
|
||||||
import com.builtbroken.assemblyline.armbot.command.TaskBreak;
|
import com.builtbroken.assemblyline.armbot.command.TaskBreak;
|
||||||
|
@ -45,9 +41,9 @@ import com.builtbroken.assemblyline.blocks.BlockColorGlowGlass;
|
||||||
import com.builtbroken.assemblyline.blocks.BlockColorSand;
|
import com.builtbroken.assemblyline.blocks.BlockColorSand;
|
||||||
import com.builtbroken.assemblyline.blocks.BlockGasOre;
|
import com.builtbroken.assemblyline.blocks.BlockGasOre;
|
||||||
import com.builtbroken.assemblyline.blocks.BlockOre;
|
import com.builtbroken.assemblyline.blocks.BlockOre;
|
||||||
|
import com.builtbroken.assemblyline.blocks.BlockOre.OreData;
|
||||||
import com.builtbroken.assemblyline.blocks.GasOreGenerator;
|
import com.builtbroken.assemblyline.blocks.GasOreGenerator;
|
||||||
import com.builtbroken.assemblyline.blocks.ItemBlockColored;
|
import com.builtbroken.assemblyline.blocks.ItemBlockColored;
|
||||||
import com.builtbroken.assemblyline.blocks.BlockOre.OreData;
|
|
||||||
import com.builtbroken.assemblyline.entities.EntityFarmEgg;
|
import com.builtbroken.assemblyline.entities.EntityFarmEgg;
|
||||||
import com.builtbroken.assemblyline.entities.EnumBird;
|
import com.builtbroken.assemblyline.entities.EnumBird;
|
||||||
import com.builtbroken.assemblyline.entities.prefab.EntityTestCar;
|
import com.builtbroken.assemblyline.entities.prefab.EntityTestCar;
|
||||||
|
@ -70,9 +66,9 @@ import com.builtbroken.assemblyline.item.ItemCommonTool;
|
||||||
import com.builtbroken.assemblyline.item.ItemFarmEgg;
|
import com.builtbroken.assemblyline.item.ItemFarmEgg;
|
||||||
import com.builtbroken.assemblyline.item.ItemOreDirv;
|
import com.builtbroken.assemblyline.item.ItemOreDirv;
|
||||||
import com.builtbroken.assemblyline.item.ItemParts;
|
import com.builtbroken.assemblyline.item.ItemParts;
|
||||||
|
import com.builtbroken.assemblyline.item.ItemParts.Parts;
|
||||||
import com.builtbroken.assemblyline.item.ItemReadoutTools;
|
import com.builtbroken.assemblyline.item.ItemReadoutTools;
|
||||||
import com.builtbroken.assemblyline.item.ItemWrench;
|
import com.builtbroken.assemblyline.item.ItemWrench;
|
||||||
import com.builtbroken.assemblyline.item.ItemParts.Parts;
|
|
||||||
import com.builtbroken.assemblyline.machine.BlockCrate;
|
import com.builtbroken.assemblyline.machine.BlockCrate;
|
||||||
import com.builtbroken.assemblyline.machine.BlockDebug;
|
import com.builtbroken.assemblyline.machine.BlockDebug;
|
||||||
import com.builtbroken.assemblyline.machine.BlockDetector;
|
import com.builtbroken.assemblyline.machine.BlockDetector;
|
||||||
|
@ -92,13 +88,14 @@ import com.builtbroken.assemblyline.machine.encoder.BlockEncoder;
|
||||||
import com.builtbroken.assemblyline.machine.encoder.ItemDisk;
|
import com.builtbroken.assemblyline.machine.encoder.ItemDisk;
|
||||||
import com.builtbroken.assemblyline.machine.processor.BlockProcessor;
|
import com.builtbroken.assemblyline.machine.processor.BlockProcessor;
|
||||||
import com.builtbroken.assemblyline.machine.red.BlockAdvancedHopper;
|
import com.builtbroken.assemblyline.machine.red.BlockAdvancedHopper;
|
||||||
import com.builtbroken.assemblyline.transmit.BlockWire;
|
import com.builtbroken.assemblyline.worldgen.OreGenReplaceStone;
|
||||||
import com.builtbroken.assemblyline.transmit.ItemBlockWire;
|
import com.builtbroken.assemblyline.worldgen.OreGenerator;
|
||||||
import com.builtbroken.minecraft.CoreRegistry;
|
import com.builtbroken.minecraft.CoreRegistry;
|
||||||
import com.builtbroken.minecraft.DarkCore;
|
import com.builtbroken.minecraft.DarkCore;
|
||||||
import com.builtbroken.minecraft.EnumMaterial;
|
import com.builtbroken.minecraft.EnumMaterial;
|
||||||
import com.builtbroken.minecraft.EnumOrePart;
|
import com.builtbroken.minecraft.EnumOrePart;
|
||||||
import com.builtbroken.minecraft.IndustryTabs;
|
import com.builtbroken.minecraft.IndustryTabs;
|
||||||
|
import com.builtbroken.minecraft.TranslationHelper;
|
||||||
import com.builtbroken.minecraft.fluid.EnumGas;
|
import com.builtbroken.minecraft.fluid.EnumGas;
|
||||||
import com.builtbroken.minecraft.network.PacketHandler;
|
import com.builtbroken.minecraft.network.PacketHandler;
|
||||||
import com.builtbroken.minecraft.prefab.ItemBlockHolder;
|
import com.builtbroken.minecraft.prefab.ItemBlockHolder;
|
||||||
|
@ -121,7 +118,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
@ModstatInfo(prefix = "asmline")
|
@ModstatInfo(prefix = "asmline")
|
||||||
@Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = AssemblyLine.VERSION, useMetadata = true)
|
@Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = AssemblyLine.VERSION, useMetadata = true)
|
||||||
@NetworkMod(channels = {DarkCore.CHANNEL}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
@NetworkMod(channels = { DarkCore.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||||
public class AssemblyLine
|
public class AssemblyLine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -293,7 +290,7 @@ public class AssemblyLine
|
||||||
|
|
||||||
ALRecipeLoader.blockSteamGen = CoreRegistry.createNewBlock("DMBlockSteamMachine", AssemblyLine.MOD_ID, BlockSmallSteamGen.class, ItemBlockHolder.class);
|
ALRecipeLoader.blockSteamGen = CoreRegistry.createNewBlock("DMBlockSteamMachine", AssemblyLine.MOD_ID, BlockSmallSteamGen.class, ItemBlockHolder.class);
|
||||||
ALRecipeLoader.blockOre = CoreRegistry.createNewBlock("DMBlockOre", AssemblyLine.MOD_ID, BlockOre.class, ItemBlockOre.class);
|
ALRecipeLoader.blockOre = CoreRegistry.createNewBlock("DMBlockOre", AssemblyLine.MOD_ID, BlockOre.class, ItemBlockOre.class);
|
||||||
ALRecipeLoader.blockWire = CoreRegistry.createNewBlock("DMBlockWire", AssemblyLine.MOD_ID, BlockWire.class, ItemBlockWire.class);
|
//ALRecipeLoader.blockWire = CoreRegistry.createNewBlock("DMBlockWire", AssemblyLine.MOD_ID, BlockWire.class, ItemBlockWire.class);
|
||||||
ALRecipeLoader.blockDebug = CoreRegistry.createNewBlock("DMBlockDebug", AssemblyLine.MOD_ID, BlockDebug.class, ItemBlockHolder.class);
|
ALRecipeLoader.blockDebug = CoreRegistry.createNewBlock("DMBlockDebug", AssemblyLine.MOD_ID, BlockDebug.class, ItemBlockHolder.class);
|
||||||
ALRecipeLoader.blockStainGlass = CoreRegistry.createNewBlock("DMBlockStainedGlass", AssemblyLine.MOD_ID, BlockColorGlass.class, ItemBlockColored.class);
|
ALRecipeLoader.blockStainGlass = CoreRegistry.createNewBlock("DMBlockStainedGlass", AssemblyLine.MOD_ID, BlockColorGlass.class, ItemBlockColored.class);
|
||||||
ALRecipeLoader.blockColorSand = CoreRegistry.createNewBlock("DMBlockColorSand", AssemblyLine.MOD_ID, BlockColorSand.class, ItemBlockColored.class);
|
ALRecipeLoader.blockColorSand = CoreRegistry.createNewBlock("DMBlockColorSand", AssemblyLine.MOD_ID, BlockColorSand.class, ItemBlockColored.class);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
import net.minecraftforge.event.Event;
|
import net.minecraftforge.event.Event;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.minecraft.recipes.AutoCraftingManager.IAutoCrafter;
|
import com.builtbroken.minecraft.recipes.AutoCraftingManager.IAutoCrafter;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.builtbroken.assemblyline.api;
|
package com.builtbroken.assemblyline.api;
|
||||||
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
public interface IArmbot extends Cloneable, IProgrammableMachine
|
public interface IArmbot extends Cloneable, IProgrammableMachine
|
||||||
{
|
{
|
||||||
/** Location of the hand, or working location of the object */
|
/** Location of the hand, or working location of the object */
|
||||||
public universalelectricity.core.vector.Vector3 getHandPos();
|
public Vector3 getHandPos();
|
||||||
|
|
||||||
/** Gets the rotation as a Vector2 (X - Yaw, Y - pitch) */
|
/** Gets the rotation as a Vector2 (X - Yaw, Y - pitch) */
|
||||||
public Vector2 getRotation();
|
public Vector2 getRotation();
|
||||||
|
|
23
src/com/builtbroken/assemblyline/api/IRotatable.java
Normal file
23
src/com/builtbroken/assemblyline/api/IRotatable.java
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
package com.builtbroken.assemblyline.api;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The interface is applied to TileEntities that can rotate.
|
||||||
|
*
|
||||||
|
* @author Calclavia
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface IRotatable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return Gets the facing direction. Always returns the front side of the block.
|
||||||
|
*/
|
||||||
|
public ForgeDirection getDirection();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Sets the facing direction.
|
||||||
|
*/
|
||||||
|
public void setDirection(ForgeDirection direection);
|
||||||
|
}
|
17
src/com/builtbroken/assemblyline/api/IRotatableBlock.java
Normal file
17
src/com/builtbroken/assemblyline/api/IRotatableBlock.java
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
package com.builtbroken.assemblyline.api;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
|
/** The interface is applied to Blocks that can rotate.
|
||||||
|
*
|
||||||
|
* @author DarkGuardsman */
|
||||||
|
|
||||||
|
public interface IRotatableBlock
|
||||||
|
{
|
||||||
|
/** @return Gets the facing direction. Always returns the front side of the block. */
|
||||||
|
public ForgeDirection getDirection(World world, int x, int y, int z);
|
||||||
|
|
||||||
|
/** @param Sets the facing direction. */
|
||||||
|
public void setDirection(World world, int x, int y, int z, ForgeDirection direection);
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package com.builtbroken.assemblyline.api;
|
package com.builtbroken.assemblyline.api;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
/** Class used in the creation of servo based object
|
/** Class used in the creation of servo based object
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.builtbroken.assemblyline.api.coding;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
/** Task in which it doesn't go right to the next task in the row. In this case the task will store
|
/** Task in which it doesn't go right to the next task in the row. In this case the task will store
|
||||||
* the entry point, and exit points. As well handle anything in between. Examples are IF statements
|
* the entry point, and exit points. As well handle anything in between. Examples are IF statements
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.builtbroken.assemblyline.api.coding;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
/** Flow chart style program. Each command in the program needs to have a stored location so it can
|
/** Flow chart style program. Each command in the program needs to have a stored location so it can
|
||||||
* be saved and loaded with its correct connections. Though the location only need to be a simple
|
* be saved and loaded with its correct connections. Though the location only need to be a simple
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.builtbroken.assemblyline.api.coding;
|
package com.builtbroken.assemblyline.api.coding;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.common.Pair;
|
import com.builtbroken.common.Pair;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.args.ArgumentData;
|
import com.builtbroken.assemblyline.api.coding.args.ArgumentData;
|
||||||
import com.builtbroken.minecraft.save.ISaveObj;
|
import com.builtbroken.minecraft.save.ISaveObj;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IProcessTask.ProcessReturn;
|
import com.builtbroken.assemblyline.api.coding.IProcessTask.ProcessReturn;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.builtbroken.assemblyline.api.coding.args;
|
package com.builtbroken.assemblyline.api.coding.args;
|
||||||
|
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
import universalelectricity.api.energy.UnitDisplay;
|
||||||
|
|
||||||
/** Used to create argument data for the encoder. Should only be used if the value needs to be
|
/** Used to create argument data for the encoder. Should only be used if the value needs to be
|
||||||
* clearly limited inside the encoder display.
|
* clearly limited inside the encoder display.
|
||||||
|
@ -32,6 +32,6 @@ public class ArgumentDoubleData extends ArgumentData
|
||||||
@Override
|
@Override
|
||||||
public String warning()
|
public String warning()
|
||||||
{
|
{
|
||||||
return "" + ElectricityDisplay.roundDecimals(min, 2) + " - " + ElectricityDisplay.roundDecimals(max, 2);
|
return "" + UnitDisplay.roundDecimals(min, 2) + " - " + UnitDisplay.roundDecimals(max, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.builtbroken.assemblyline.api.coding.args;
|
package com.builtbroken.assemblyline.api.coding.args;
|
||||||
|
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
import universalelectricity.api.energy.UnitDisplay;
|
||||||
|
|
||||||
/** Used to create argument data for the encoder. Should only be used if the value needs to be
|
/** Used to create argument data for the encoder. Should only be used if the value needs to be
|
||||||
* clearly limited inside the encoder display.
|
* clearly limited inside the encoder display.
|
||||||
|
@ -32,6 +32,6 @@ public class ArgumentFloatData extends ArgumentData
|
||||||
@Override
|
@Override
|
||||||
public String warning()
|
public String warning()
|
||||||
{
|
{
|
||||||
return "" + ElectricityDisplay.roundDecimals(min, 2) + " - " + ElectricityDisplay.roundDecimals(max, 2);
|
return "" + UnitDisplay.roundDecimals(min, 2) + " - " + UnitDisplay.roundDecimals(max, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
import net.minecraftforge.fluids.FluidEvent;
|
import net.minecraftforge.fluids.FluidEvent;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
public class FluidMixingEvent extends FluidEvent
|
public class FluidMixingEvent extends FluidEvent
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,8 +4,9 @@ import java.util.Set;
|
||||||
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import universalelectricity.prefab.tile.IRotatable;
|
|
||||||
|
import com.builtbroken.assemblyline.api.IRotatable;
|
||||||
|
|
||||||
/** Interface to make or use the TileEntityDrain. This is mostly a dummy interface to help the
|
/** Interface to make or use the TileEntityDrain. This is mostly a dummy interface to help the
|
||||||
* construction pump use the TileEntity as the center of drain location
|
* construction pump use the TileEntity as the center of drain location
|
||||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.core.UniversalElectricity;
|
import universalelectricity.api.UniversalElectricity;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.blocks.BlockAssembly;
|
import com.builtbroken.assemblyline.blocks.BlockAssembly;
|
||||||
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Map.Entry;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgram;
|
import com.builtbroken.assemblyline.api.coding.IProgram;
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgram;
|
import com.builtbroken.assemblyline.api.coding.IProgram;
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
|
|
|
@ -14,9 +14,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import universalelectricity.prefab.TranslationHelper;
|
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.ALRecipeLoader;
|
import com.builtbroken.assemblyline.ALRecipeLoader;
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
|
@ -26,6 +25,7 @@ import com.builtbroken.assemblyline.machine.TileEntityAssembly;
|
||||||
import com.builtbroken.assemblyline.machine.encoder.ItemDisk;
|
import com.builtbroken.assemblyline.machine.encoder.ItemDisk;
|
||||||
import com.builtbroken.common.Pair;
|
import com.builtbroken.common.Pair;
|
||||||
import com.builtbroken.minecraft.DarkCore;
|
import com.builtbroken.minecraft.DarkCore;
|
||||||
|
import com.builtbroken.minecraft.TranslationHelper;
|
||||||
import com.builtbroken.minecraft.helpers.DarksHelper;
|
import com.builtbroken.minecraft.helpers.DarksHelper;
|
||||||
import com.builtbroken.minecraft.helpers.MathHelper;
|
import com.builtbroken.minecraft.helpers.MathHelper;
|
||||||
import com.builtbroken.minecraft.interfaces.IMultiBlock;
|
import com.builtbroken.minecraft.interfaces.IMultiBlock;
|
||||||
|
@ -66,7 +66,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
||||||
|
|
||||||
public TileEntityArmbot()
|
public TileEntityArmbot()
|
||||||
{
|
{
|
||||||
super(.02f);
|
super(20);
|
||||||
programHelper = new ProgramHelper(this).setMemoryLimit(20);
|
programHelper = new ProgramHelper(this).setMemoryLimit(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
||||||
@Override
|
@Override
|
||||||
public Packet getDescriptionPacket()
|
public Packet getDescriptionPacket()
|
||||||
{
|
{
|
||||||
return PacketHandler.instance().getTilePacket(this.getChannel(), this, "armbot", this.functioning, this.rotationYaw, this.rotationPitch);
|
return PacketHandler.instance().getTilePacket(this.getChannel(), "armbot", this, this.functioning, this.rotationYaw, this.rotationPitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendRotationPacket()
|
public void sendRotationPacket()
|
||||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.ITask;
|
import com.builtbroken.assemblyline.api.coding.ITask;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.builtbroken.assemblyline.armbot.command;
|
package com.builtbroken.assemblyline.armbot.command;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.armbot.TaskBaseArmbot;
|
import com.builtbroken.assemblyline.armbot.TaskBaseArmbot;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.args.ArgumentFloatData;
|
import com.builtbroken.assemblyline.api.coding.args.ArgumentFloatData;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IRedirectTask;
|
import com.builtbroken.assemblyline.api.coding.IRedirectTask;
|
||||||
import com.builtbroken.assemblyline.api.coding.ITask;
|
import com.builtbroken.assemblyline.api.coding.ITask;
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
|
|
|
@ -2,8 +2,8 @@ package com.builtbroken.assemblyline.armbot.command;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.IBelt;
|
import com.builtbroken.assemblyline.api.IBelt;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.builtbroken.assemblyline.armbot.command;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
import com.builtbroken.assemblyline.api.coding.IProgrammableMachine;
|
||||||
import com.builtbroken.assemblyline.api.coding.ITask;
|
import com.builtbroken.assemblyline.api.coding.ITask;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.common.IPlantable;
|
import net.minecraftforge.common.IPlantable;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.armbot.TaskBaseArmbot;
|
import com.builtbroken.assemblyline.armbot.TaskBaseArmbot;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.builtbroken.assemblyline.armbot.command;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.builtbroken.assemblyline.armbot.command;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.IArmbot;
|
import com.builtbroken.assemblyline.api.IArmbot;
|
||||||
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
import com.builtbroken.assemblyline.api.coding.args.ArgumentIntData;
|
||||||
|
|
|
@ -19,7 +19,7 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.IFluidBlock;
|
import net.minecraftforge.fluids.IFluidBlock;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.minecraft.DarkCore;
|
import com.builtbroken.minecraft.DarkCore;
|
||||||
|
|
|
@ -14,10 +14,10 @@ import net.minecraft.util.Icon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import universalelectricity.prefab.ore.OreGenReplaceStone;
|
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.ALRecipeLoader;
|
import com.builtbroken.assemblyline.ALRecipeLoader;
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
|
import com.builtbroken.assemblyline.worldgen.OreGenReplaceStone;
|
||||||
import com.builtbroken.common.Pair;
|
import com.builtbroken.common.Pair;
|
||||||
import com.builtbroken.minecraft.DarkCore;
|
import com.builtbroken.minecraft.DarkCore;
|
||||||
import com.builtbroken.minecraft.EnumMaterial;
|
import com.builtbroken.minecraft.EnumMaterial;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
import universalelectricity.api.energy.UnitDisplay;
|
||||||
import universalelectricity.core.electricity.ElectricityDisplay.ElectricUnit;
|
import universalelectricity.api.energy.UnitDisplay.Unit;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.machine.ContainerBatteryBox;
|
import com.builtbroken.assemblyline.machine.ContainerBatteryBox;
|
||||||
|
@ -39,8 +39,8 @@ public class GuiBatteryBox extends GuiContainer
|
||||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||||
{
|
{
|
||||||
this.fontRenderer.drawString(this.tileEntity.getInvName(), 65, 6, 4210752);
|
this.fontRenderer.drawString(this.tileEntity.getInvName(), 65, 6, 4210752);
|
||||||
String displayJoules = ElectricityDisplay.getDisplayShort(tileEntity.getEnergyStored(), ElectricUnit.JOULES) + " of";
|
String displayJoules = UnitDisplay.getDisplayShort(tileEntity.getEnergyStored(), Unit.JOULES) + " of";
|
||||||
String displayMaxJoules = ElectricityDisplay.getDisplay(tileEntity.getMaxEnergyStored(), ElectricUnit.JOULES);
|
String displayMaxJoules = UnitDisplay.getDisplayShort(tileEntity.getMaxEnergyStored(), Unit.JOULES);
|
||||||
String displayVoltage = "Voltage: " + (int) (this.tileEntity.getVoltage() * 1000);
|
String displayVoltage = "Voltage: " + (int) (this.tileEntity.getVoltage() * 1000);
|
||||||
|
|
||||||
this.fontRenderer.drawString(displayJoules, 122 - this.fontRenderer.getStringWidth(displayJoules) / 2, 30, 4210752);
|
this.fontRenderer.drawString(displayJoules, 122 - this.fontRenderer.getStringWidth(displayJoules) / 2, 30, 4210752);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.api.coding.ITask;
|
import com.builtbroken.assemblyline.api.coding.ITask;
|
||||||
|
|
|
@ -6,12 +6,11 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.prefab.TranslationHelper;
|
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.imprinter.ContainerImprinter;
|
import com.builtbroken.assemblyline.imprinter.ContainerImprinter;
|
||||||
import com.builtbroken.assemblyline.imprinter.TileEntityImprinter;
|
import com.builtbroken.assemblyline.imprinter.TileEntityImprinter;
|
||||||
import com.builtbroken.minecraft.DarkCore;
|
import com.builtbroken.minecraft.DarkCore;
|
||||||
|
import com.builtbroken.minecraft.TranslationHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
/** Used to store info on a block mainly used for rendering */
|
/** Used to store info on a block mainly used for rendering */
|
||||||
public class BlockRenderInfo
|
public class BlockRenderInfo
|
||||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.armbot.TileEntityArmbot;
|
import com.builtbroken.assemblyline.armbot.TileEntityArmbot;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
public class RenderBlockEntity extends Render
|
public class RenderBlockEntity extends Render
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.compatibility.Compatibility;
|
import universalelectricity.api.Compatibility;
|
||||||
import universalelectricity.core.block.IConnector;
|
import universalelectricity.api.net.IConnector;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import universalelectricity.core.vector.VectorHelper;
|
import universalelectricity.api.vector.VectorHelper;
|
||||||
import buildcraft.api.power.IPowerReceptor;
|
import buildcraft.api.power.IPowerReceptor;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
|
@ -51,7 +51,7 @@ public class RenderBlockWire extends TileEntitySpecialRenderer
|
||||||
renderSide[i] = true;
|
renderSide[i] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Compatibility.isIndustrialCraft2Loaded() && ent instanceof IEnergyTile)
|
else if (ent instanceof IEnergyTile)
|
||||||
{
|
{
|
||||||
if (ent instanceof IEnergyAcceptor)
|
if (ent instanceof IEnergyAcceptor)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ public class RenderBlockWire extends TileEntitySpecialRenderer
|
||||||
renderSide[i] = true;
|
renderSide[i] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Compatibility.isBuildcraftLoaded() && ent instanceof IPowerReceptor)
|
else if (ent instanceof IPowerReceptor)
|
||||||
{
|
{
|
||||||
renderSide[i] = true;
|
renderSide[i] = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.machine.TileEntityCrate;
|
import com.builtbroken.assemblyline.machine.TileEntityCrate;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import static org.lwjgl.opengl.GL11.glPopMatrix;
|
||||||
import static org.lwjgl.opengl.GL11.glPushMatrix;
|
import static org.lwjgl.opengl.GL11.glPushMatrix;
|
||||||
import static org.lwjgl.opengl.GL11.glTranslated;
|
import static org.lwjgl.opengl.GL11.glTranslated;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.client.model.ModelHelper;
|
import com.builtbroken.assemblyline.client.model.ModelHelper;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.ALRecipeLoader;
|
import com.builtbroken.assemblyline.ALRecipeLoader;
|
||||||
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidNetworkTile;
|
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidNetworkTile;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
|
import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
|
||||||
import com.builtbroken.assemblyline.fluid.network.NetworkPipes;
|
import com.builtbroken.assemblyline.fluid.network.NetworkPipes;
|
||||||
|
|
|
@ -4,9 +4,9 @@ import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.prefab.tile.TileEntityAdvanced;
|
|
||||||
|
|
||||||
import com.builtbroken.minecraft.interfaces.IToolReadOut;
|
import com.builtbroken.minecraft.interfaces.IToolReadOut;
|
||||||
|
import com.builtbroken.minecraft.prefab.TileEntityAdvanced;
|
||||||
import com.builtbroken.minecraft.tilenetwork.ITileConnector;
|
import com.builtbroken.minecraft.tilenetwork.ITileConnector;
|
||||||
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities;
|
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
|
|
||||||
import org.bouncycastle.util.Arrays;
|
import org.bouncycastle.util.Arrays;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.fluid.FluidMasterList;
|
import com.builtbroken.assemblyline.api.fluid.FluidMasterList;
|
||||||
import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart;
|
import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart;
|
||||||
|
@ -418,39 +418,37 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i
|
||||||
@Override
|
@Override
|
||||||
public Packet getDescriptionPacket()
|
public Packet getDescriptionPacket()
|
||||||
{
|
{
|
||||||
Object[] data = new Object[10];
|
Object[] data = new Object[9];
|
||||||
data[0] = "DescriptionPacket";
|
data[0] = this.subID;
|
||||||
data[1] = this.subID;
|
data[1] = this.renderConnection[0];
|
||||||
data[2] = this.renderConnection[0];
|
data[2] = this.renderConnection[1];
|
||||||
data[3] = this.renderConnection[1];
|
data[3] = this.renderConnection[2];
|
||||||
data[4] = this.renderConnection[2];
|
data[4] = this.renderConnection[3];
|
||||||
data[5] = this.renderConnection[3];
|
data[5] = this.renderConnection[4];
|
||||||
data[6] = this.renderConnection[4];
|
data[6] = this.renderConnection[5];
|
||||||
data[7] = this.renderConnection[5];
|
data[7] = this.getTank().getCapacity();
|
||||||
data[8] = this.getTank().getCapacity();
|
data[8] = this.getTank().writeToNBT(new NBTTagCompound());
|
||||||
data[9] = this.getTank().writeToNBT(new NBTTagCompound());
|
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "DescriptionPacket", this, data);
|
||||||
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, this, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendRenderUpdate()
|
public void sendRenderUpdate()
|
||||||
{
|
{
|
||||||
Object[] data = new Object[8];
|
Object[] data = new Object[7];
|
||||||
data[0] = "RenderPacket";
|
data[0] = this.subID;
|
||||||
data[1] = this.subID;
|
data[1] = this.renderConnection[0];
|
||||||
data[2] = this.renderConnection[0];
|
data[2] = this.renderConnection[1];
|
||||||
data[3] = this.renderConnection[1];
|
data[3] = this.renderConnection[2];
|
||||||
data[4] = this.renderConnection[2];
|
data[4] = this.renderConnection[3];
|
||||||
data[5] = this.renderConnection[3];
|
data[5] = this.renderConnection[4];
|
||||||
data[6] = this.renderConnection[4];
|
data[6] = this.renderConnection[5];
|
||||||
data[7] = this.renderConnection[5];
|
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL,"RenderPacket", this, data));
|
||||||
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, this, data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendTankUpdate(int index)
|
public void sendTankUpdate(int index)
|
||||||
{
|
{
|
||||||
if (this.getTank() != null && index == 0)
|
if (this.getTank() != null && index == 0)
|
||||||
{
|
{
|
||||||
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, this, "SingleTank", this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60);
|
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "SingleTank", this, this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ import java.util.Set;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.minecraft.fluid.FluidHelper;
|
import com.builtbroken.minecraft.fluid.FluidHelper;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ public class LiquidPathFinder
|
||||||
{
|
{
|
||||||
this.runs++;
|
this.runs++;
|
||||||
Vector3 vec = origin.clone().modifyPositionFromSide(direction);
|
Vector3 vec = origin.clone().modifyPositionFromSide(direction);
|
||||||
double distance = vec.toVector2().distanceTo(this.Start.toVector2());
|
double distance = vec.toVector2().distance(this.Start.toVector2());
|
||||||
if (distance <= this.range && this.isValidNode(vec))
|
if (distance <= this.range && this.isValidNode(vec))
|
||||||
{
|
{
|
||||||
if (this.fill && FluidHelper.drainBlock(world, vec, false) != null || FluidHelper.isFillableFluid(world, vec))
|
if (this.fill && FluidHelper.drainBlock(world, vec, false) != null || FluidHelper.isFillableFluid(world, vec))
|
||||||
|
|
|
@ -15,8 +15,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import universalelectricity.core.vector.VectorHelper;
|
import universalelectricity.api.vector.VectorHelper;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
||||||
import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
|
import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
|
||||||
|
@ -34,7 +34,7 @@ public class TileEntityConstructionPump extends TileEntityStarterPump implements
|
||||||
|
|
||||||
public TileEntityConstructionPump()
|
public TileEntityConstructionPump()
|
||||||
{
|
{
|
||||||
super(.05f/*50W/t */, .05f/* 5W/drain*/, 30);
|
super(50, 50, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the facing direction
|
/** Gets the facing direction
|
||||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
||||||
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidDevice;
|
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidDevice;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
import com.builtbroken.assemblyline.api.fluid.IDrain;
|
||||||
import com.builtbroken.common.Pair;
|
import com.builtbroken.common.Pair;
|
||||||
|
@ -23,7 +23,7 @@ public class TileEntityStarterPump extends TileEntityEnergyMachine implements IT
|
||||||
{
|
{
|
||||||
private int currentWorldEdits, MAX_WORLD_EDITS_PER_PROCESS;
|
private int currentWorldEdits, MAX_WORLD_EDITS_PER_PROCESS;
|
||||||
|
|
||||||
public float ENERGY_PER_DRAIN = 5;
|
public long ENERGY_PER_DRAIN = 50;
|
||||||
|
|
||||||
private LiquidPathFinder pathLiquid;
|
private LiquidPathFinder pathLiquid;
|
||||||
private Vector3 lastDrainOrigin;
|
private Vector3 lastDrainOrigin;
|
||||||
|
@ -32,13 +32,13 @@ public class TileEntityStarterPump extends TileEntityEnergyMachine implements IT
|
||||||
|
|
||||||
public TileEntityStarterPump()
|
public TileEntityStarterPump()
|
||||||
{
|
{
|
||||||
this(.01f/*10W/t */, .05f/* 50W/drain */, 5);
|
this(10, 50, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param wattTick - cost in watts per tick to run the tile
|
/** @param wattTick - cost in watts per tick to run the tile
|
||||||
* @param wattDrain - cost in watts to drain or fill one block
|
* @param wattDrain - cost in watts to drain or fill one block
|
||||||
* @param maxEdits - max world edits per update (1/2 second) */
|
* @param maxEdits - max world edits per update (1/2 second) */
|
||||||
public TileEntityStarterPump(float wattTick, float wattDrain, int maxEdits)
|
public TileEntityStarterPump(long wattTick, long wattDrain, int maxEdits)
|
||||||
{
|
{
|
||||||
//Power calculation for max power (worldEdits * watts per edit) + (watts per tick * one second)
|
//Power calculation for max power (worldEdits * watts per edit) + (watts per tick * one second)
|
||||||
super(wattTick, (maxEdits * wattDrain) + (wattTick * 20));
|
super(wattTick, (maxEdits * wattDrain) + (wattTick * 20));
|
||||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import universalelectricity.core.UniversalElectricity;
|
import universalelectricity.api.UniversalElectricity;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import universalelectricity.core.UniversalElectricity;
|
import universalelectricity.api.UniversalElectricity;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.AssemblyLine;
|
import com.builtbroken.assemblyline.AssemblyLine;
|
||||||
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
import com.builtbroken.assemblyline.client.render.BlockRenderingHandler;
|
||||||
|
@ -24,9 +24,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public class BlockSolarPanel extends BlockMachine
|
public class BlockSolarPanel extends BlockMachine
|
||||||
{
|
{
|
||||||
public static int tickRate = 10;
|
public static int tickRate = 10;
|
||||||
public static float wattDay = 0.120f;
|
public static long wattDay = 120;
|
||||||
public static float wattNight = 0.001f;
|
public static long wattNight = 1;
|
||||||
public static float wattStorm = 0.005f;
|
public static long wattStorm = 5;
|
||||||
|
|
||||||
public BlockSolarPanel()
|
public BlockSolarPanel()
|
||||||
{
|
{
|
||||||
|
@ -80,9 +80,9 @@ public class BlockSolarPanel extends BlockMachine
|
||||||
{
|
{
|
||||||
super.loadExtraConfigs(config);
|
super.loadExtraConfigs(config);
|
||||||
tickRate = config.get("settings", "PanelUpdateRate", tickRate).getInt();
|
tickRate = config.get("settings", "PanelUpdateRate", tickRate).getInt();
|
||||||
wattDay = (float) (config.get("settings", "WattDayLight", 120).getDouble(120) / 1000);
|
wattDay = config.get("settings", "WattDayLight", 120).getInt();
|
||||||
wattNight = (float) (config.get("settings", "WattMoonLight", 1).getDouble(1) / 1000);
|
wattNight = config.get("settings", "WattMoonLight", 1).getInt();
|
||||||
wattStorm = (float) (config.get("settings", "WattStorm", 6).getDouble(6) / 1000);
|
wattStorm = config.get("settings", "WattStorm", 6).getInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,11 +2,11 @@ package com.builtbroken.assemblyline.generators;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import com.builtbroken.assemblyline.machine.TileEntityGenerator;
|
|
||||||
|
|
||||||
import micdoodle8.mods.galacticraft.api.world.ISolarLevel;
|
import micdoodle8.mods.galacticraft.api.world.ISolarLevel;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
|
import com.builtbroken.assemblyline.machine.TileEntityGenerator;
|
||||||
|
|
||||||
public class TileEntitySolarPanel extends TileEntityGenerator
|
public class TileEntitySolarPanel extends TileEntityGenerator
|
||||||
{
|
{
|
||||||
public TileEntitySolarPanel()
|
public TileEntitySolarPanel()
|
||||||
|
@ -51,7 +51,6 @@ public class TileEntitySolarPanel extends TileEntityGenerator
|
||||||
{
|
{
|
||||||
this.setJoulesPerTick(0);
|
this.setJoulesPerTick(0);
|
||||||
}
|
}
|
||||||
this.produceAllSides();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue