Merge coremachine into assembly line

This commit is contained in:
Robert 2013-12-20 02:47:43 -05:00
commit a954b83014
379 changed files with 12639 additions and 0 deletions

33
CM/.gitattributes vendored Normal file
View file

@ -0,0 +1,33 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# These files are text and should be normalized (Convert crlf => lf)
*.java text
*.xml text
*.txt text
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.jar binary
*.so binary
*.dll binary

1
CM/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
!*.*

6
CM/.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "Built-Broken-Lib"]
path = Built-Broken-Lib
url = https://github.com/DarkGuardsman/Built-Broken-Lib.git
[submodule "CoreLibrary"]
path = CoreLibrary
url = https://github.com/DarksCoreMachine/CoreLibrary.git

View file

@ -0,0 +1,32 @@
package buildcraft.api.tools;
import net.minecraft.entity.player.EntityPlayer;
/***
* Implement this interface on subclasses of Item to have that item work as a wrench for buildcraft
*/
public interface IToolWrench {
/***
* Called to ensure that the wrench can be used. To get the ItemStack that is used, check player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates for the block being wrenched
*
* @return true if wrenching is allowed, false if not
*/
public boolean canWrench(EntityPlayer player, int x, int y, int z);
/***
* Callback after the wrench has been used. This can be used to decrease durability or for other purposes. To get the ItemStack that was used, check
* player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates of the block being wrenched
*/
public void wrenchUsed(EntityPlayer player, int x, int y, int z);
}

View file

@ -0,0 +1,24 @@
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);
}

View file

@ -0,0 +1,63 @@
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;
}
}

View file

@ -0,0 +1,14 @@
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
{
}

View file

@ -0,0 +1,16 @@
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);
}

View file

@ -0,0 +1,26 @@
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);
}

View file

@ -0,0 +1,19 @@
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();
}

View file

@ -0,0 +1,50 @@
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();
}

View file

@ -0,0 +1,53 @@
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);
}

View file

@ -0,0 +1,27 @@
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);
}

View file

@ -0,0 +1,18 @@
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);
}

View file

@ -0,0 +1,24 @@
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);
}

View file

@ -0,0 +1,12 @@
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);
}

View file

@ -0,0 +1,12 @@
package icbm.api;
/**
* Types of missile launchers
*
* @author Calclavia
*
*/
public enum LauncherType
{
TRADITIONAL, CRUISE
}

View file

@ -0,0 +1,150 @@
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();
}
}
}

View file

@ -0,0 +1,141 @@
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);
}
}
}

View file

@ -0,0 +1,24 @@
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;
}
}

View file

@ -0,0 +1,22 @@
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);
}

View file

@ -0,0 +1,23 @@
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);
}

View file

@ -0,0 +1,26 @@
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();
}

View file

@ -0,0 +1,79 @@
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();
}

View file

@ -0,0 +1,17 @@
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();
}

View file

@ -0,0 +1,12 @@
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);
}

View file

@ -0,0 +1,34 @@
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);
}

View file

@ -0,0 +1,17 @@
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>();
}

View file

@ -0,0 +1,29 @@
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;
}
}

View file

@ -0,0 +1,8 @@
package mffs.api;
public interface IActivatable
{
public boolean isActive();
public void setActive(boolean flag);
}

View file

@ -0,0 +1,18 @@
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();
}

View file

@ -0,0 +1,16 @@
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();
}

View file

@ -0,0 +1,71 @@
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);
}

View file

@ -0,0 +1,16 @@
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);
}

View file

@ -0,0 +1,33 @@
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();
}

View file

@ -0,0 +1,35 @@
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();
}

View file

@ -0,0 +1,6 @@
package mffs.api.card;
public interface ICard
{
}

View file

@ -0,0 +1,23 @@
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);
}

View file

@ -0,0 +1,6 @@
package mffs.api.card;
public interface ICardInfinite
{
}

View file

@ -0,0 +1,11 @@
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);
}

View file

@ -0,0 +1,191 @@
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;
}
}

View file

@ -0,0 +1,18 @@
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();
}

View file

@ -0,0 +1,8 @@
package mffs.api.fortron;
import icbm.api.IBlockFrequency;
public interface IFortronFrequency extends IFortronStorage, IBlockFrequency
{
}

View file

@ -0,0 +1,41 @@
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);
}

View file

@ -0,0 +1,14 @@
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);
}

View file

@ -0,0 +1,56 @@
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);
}

View file

@ -0,0 +1,18 @@
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();
}

View file

@ -0,0 +1,34 @@
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);
}

View file

@ -0,0 +1,32 @@
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();
}

View file

@ -0,0 +1,47 @@
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();
}

View file

@ -0,0 +1,67 @@
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;
}
}

View file

@ -0,0 +1,18 @@
package micdoodle8.mods.galacticraft.api.world;
/**
* Used to change the solar multiplier of certain world providers
*
* If you have a solar feature in your mod, check whether the world's provider
* inherits this class and multiply the solar generation by the solar multiplier
* double
*
* for example:
*
* if (worldObj.provider instanceof ISolarLevel) solarStrength *= ((ISolarLevel)
* worldObj.provider).getSolarEnergyMultiplier();
*/
public interface ISolarLevel
{
public double getSolarEnergyMultiplier();
}

View file

@ -0,0 +1,35 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats;
public interface IModstatsReporter
{
public void registerMod(Object mod);
public void doManualCheck();
}

View file

@ -0,0 +1,117 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats;
import java.util.HashMap;
import java.util.Map;
public class ModVersionData
{
public String prefix;
public String name;
public String version;
public String downloadUrl;
public String changeLogUrl;
public Map<String, String> extraFields;
public ModVersionData()
{
extraFields = new HashMap<String, String>();
}
public ModVersionData(String prefix, String name, String version)
{
this.prefix = prefix;
this.name = name;
this.version = version;
extraFields = new HashMap<String, String>();
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((changeLogUrl == null) ? 0 : changeLogUrl.hashCode());
result = prime * result + ((downloadUrl == null) ? 0 : downloadUrl.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((prefix == null) ? 0 : prefix.hashCode());
result = prime * result + ((version == null) ? 0 : version.hashCode());
return result;
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ModVersionData other = (ModVersionData) obj;
if (changeLogUrl == null)
{
if (other.changeLogUrl != null)
return false;
}
else if (!changeLogUrl.equals(other.changeLogUrl))
return false;
if (downloadUrl == null)
{
if (other.downloadUrl != null)
return false;
}
else if (!downloadUrl.equals(other.downloadUrl))
return false;
if (name == null)
{
if (other.name != null)
return false;
}
else if (!name.equals(other.name))
return false;
if (prefix == null)
{
if (other.prefix != null)
return false;
}
else if (!prefix.equals(other.prefix))
return false;
if (version == null)
{
if (other.version != null)
return false;
}
else if (!version.equals(other.version))
return false;
return true;
}
}

View file

@ -0,0 +1,64 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats;
import java.util.LinkedList;
import java.util.List;
import net.minecraftforge.event.Cancelable;
import net.minecraftforge.event.Event;
import cpw.mods.fml.common.FMLLog;
@Cancelable
public class ModsUpdateEvent extends Event
{
private List<ModVersionData> updatedMods;
public ModsUpdateEvent()
{
updatedMods = new LinkedList<ModVersionData>();
}
public void add(ModVersionData data)
{
if (!updatedMods.contains(data))
{
updatedMods.add(data);
}
else
{
FMLLog.info("ModsUpdateEvent shouldn't have same mods data", data);
}
}
public List<ModVersionData> getUpdatedMods()
{
return updatedMods;
}
}

View file

@ -0,0 +1,59 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ModstatInfo
{
/**
* Modstats mod prefix.
*
* @return
*/
public String prefix();
/**
* Mod name. Use this if your mod doesn't have @Mod annotation
*
* @return
*/
public String name() default "";
/**
* Mod version. Use this if your mod doesn't have @Mod annotation
*
* @return
*/
public String version() default "";
}

View file

@ -0,0 +1,91 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats;
import cpw.mods.fml.common.FMLLog;
public class Modstats
{
private static final Modstats INSTANCE = new Modstats();
private static final String CLASS_TEMPLATE = "org.modstats.reporter.v%d.Reporter";
private IModstatsReporter reporter;
private Modstats()
{
reporter = locateReporter();
}
public IModstatsReporter getReporter()
{
return reporter;
}
private IModstatsReporter locateReporter()
{
int i = 1;
Class<?> latest = null;
while (i < 100)
{
try
{
Class<?> candidate = Class.forName(String.format(CLASS_TEMPLATE, i));
if (IModstatsReporter.class.isAssignableFrom(candidate))
{
latest = candidate;
}
}
catch (Exception e)
{
break;
}
i++;
}
if (latest == null)
{
FMLLog.warning("Modstats reporter class not found.");
}
else
{
try
{
return (IModstatsReporter) latest.newInstance();
}
catch (Exception e)
{
FMLLog.warning("Modstats reporter class can't be instantiated.");
}
}
return null;
}
public static Modstats instance()
{
return INSTANCE;
}
}

View file

@ -0,0 +1,73 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats.reporter.v1;
import java.io.File;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
public class Config
{
private static final String CONFIG_NAME = "modstats.cfg";
public boolean allowUpdates;
public boolean betaNotifications;
public boolean forCurrentMinecraftVersion;
public boolean logOnly;
public Config()
{
File configLocation = new File(Loader.instance().getConfigDir(), CONFIG_NAME);
Configuration configuration = new Configuration(configLocation);
configuration.load();
Property prop = configuration.get("updates", "AllowUpdates", true);
prop.comment = "Allow to send current mod versions to the server and check for updates.\nIt allows to mod authors to see mod's popularity. Please don't disable it without necessity";
allowUpdates = prop.getBoolean(true);
prop = configuration.get("updates", "LogOnly", false);
prop.comment = "Don't display chat message, just add message to the log.";
logOnly = prop.getBoolean(false);
prop = configuration.get("updates", "BetaNotifications", false);
prop.comment = "Set true to receive notifications about beta versions. Otherwise you will only receive information about stable versions";
betaNotifications = prop.getBoolean(false);
prop = configuration.get("updates", "ForCurrentMinecraftVersion", false);
prop.comment = "Check for updates only for current MC version.\nEx:if you have MC 1.4.2 and ForCurrentMinecraftVersion is true, then you wouldn't receive notifications about versions for MC 1.4.5";
forCurrentMinecraftVersion = prop.getBoolean(false);
configuration.save();
FMLLog.info("[Modstats] Config loaded. allowUpdates: %b, betaNotification: %b, strict: %b", allowUpdates, betaNotifications, forCurrentMinecraftVersion);
}
}

View file

@ -0,0 +1,296 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats.reporter.v1;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.NetworkInterface;
import java.net.URL;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import net.minecraft.client.Minecraft;
import net.minecraft.crash.CallableMinecraftVersion;
import net.minecraftforge.common.MinecraftForge;
import org.modstats.ModVersionData;
import org.modstats.ModsUpdateEvent;
import argo.jdom.JdomParser;
import argo.jdom.JsonNode;
import argo.jdom.JsonRootNode;
import argo.jdom.JsonStringNode;
import argo.saj.InvalidSyntaxException;
import com.google.common.base.Charsets;
import com.google.common.hash.Hashing;
import com.google.common.io.Files;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.versioning.ComparableVersion;
class DataSender extends Thread
{
private static final String urlAutoTemplate = "http://modstats.org/api/v1/report?mc=%s&user=%s&data=%s&sign=%s&beta=%b&strict=%b";
private static final String urlManualTemplate = "http://modstats.org/api/v1/check?mc=%s&user=%s&data=%s&sign=%s&beta=%b&strict=%b";
private final Reporter reporter;
public final boolean manual;
public DataSender(Reporter reporter, boolean manual)
{
this.reporter = reporter;
this.manual = manual;
}
private String toHexString(byte[] bytes)
{
char[] hexArray = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
char[] hexChars = new char[bytes.length * 2];
int v;
for (int j = 0; j < bytes.length; j++)
{
v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v / 16];
hexChars[j * 2 + 1] = hexArray[v % 16];
}
return new String(hexChars);
}
private String getPlayerId() throws IOException
{
File statDir = new File(FMLClientHandler.instance().getClient().mcDataDir, "stats");
if (!statDir.exists())
{
statDir.mkdirs();
}
String mac = "";
try
{
InetAddress address = InetAddress.getLocalHost();
NetworkInterface ni = NetworkInterface.getByInetAddress(address);
byte[] macArray = ni.getHardwareAddress();
if (macArray != null)
{
mac = toHexString(macArray);
}
}
catch (Exception ex)
{
}
File uidFile = new File(statDir, "player.uid");
if (uidFile.exists() && uidFile.canRead() && uidFile.length() == 32 + mac.length())
{
String data = Files.toString(uidFile, Charsets.US_ASCII);
String storedMac = data.substring(32);
if (storedMac.equalsIgnoreCase(mac))
return data.substring(0, 32);
}
uidFile.createNewFile();
if (uidFile.canWrite())
{
String uid = UUID.randomUUID().toString().replace("-", "");
FileOutputStream output = new FileOutputStream(uidFile);
output.write((uid + mac).getBytes());
output.close();
return uid;
}
return "";
}
private String getSignature(String data)
{
return Hashing.md5().hashString(data).toString();
}
private String getData()
{
StringBuilder b = new StringBuilder();
for (Map.Entry<String, ModVersionData> item : reporter.registeredMods.entrySet())
{
b.append(item.getKey()).append("+").append(item.getValue().version).append("$");
}
return b.toString();
}
private boolean checkIsNewer(String current, String received)
{
return new ComparableVersion(received).compareTo(new ComparableVersion(current)) > 0;
}
private void parseResponse(String response)
{
try
{
JsonRootNode json = (new JdomParser()).parse(response);
// empty result
if (!json.isNode("mods"))
{
FMLLog.info("[Modstats] Empty result");
return;
}
List<JsonNode> modList = json.getArrayNode("mods");
ModsUpdateEvent event = new ModsUpdateEvent();
for (JsonNode modObject : modList)
{
String prefix = modObject.getStringValue("code");
if (!reporter.registeredMods.containsKey(prefix))
{
FMLLog.warning("[Modstats] Extra mod '%s' in service response", prefix);
continue;
}
String version = modObject.getStringValue("ver");
if (version == null || version.equals(reporter.registeredMods.get(prefix).version))
{
continue;
}
if (checkIsNewer(reporter.registeredMods.get(prefix).version, version))
{
ModVersionData data = new ModVersionData(prefix, reporter.registeredMods.get(prefix).name, version);
Map<JsonStringNode, JsonNode> fields = modObject.getFields();
for (Map.Entry<JsonStringNode, JsonNode> entry : fields.entrySet())
{
String fieldName = entry.getKey().getText();
if (fieldName.equals("code") || fieldName.equals("ver"))
continue;
if (!(entry.getValue() instanceof JsonStringNode))
{
FMLLog.warning(String.format("[Modstats] Too complex data in response for field '%s'.", fieldName));
continue;
}
String value = ((JsonStringNode) entry.getValue()).getText();
if (fieldName.equals("chlog"))
{
data.changeLogUrl = value;
}
else if (fieldName.equals("link"))
{
data.downloadUrl = value;
}
else
{
data.extraFields.put(fieldName, value);
}
}
event.add(data);
}
}
if (event.getUpdatedMods().size() > 0)
{
MinecraftForge.EVENT_BUS.post(event);
}
if (!event.isCanceled() && event.getUpdatedMods().size() > 0)
{
List<ModVersionData> updatedModsToOutput = event.getUpdatedMods();
StringBuilder builder = new StringBuilder("Updates found: ");
Iterator<ModVersionData> iterator = updatedModsToOutput.iterator();
while (iterator.hasNext())
{
ModVersionData modVersionData = iterator.next();
builder.append(modVersionData.name).append(" (").append(modVersionData.version).append(")").append(iterator.hasNext() ? "," : ".");
}
FMLLog.info("[Modstats] %s", builder.toString());
if (!reporter.config.logOnly && FMLCommonHandler.instance().getSide().isClient())
{
Minecraft mc = FMLClientHandler.instance().getClient();
int maxTries = 30;
while (mc.thePlayer == null && maxTries > 0)
{
try
{
sleep(1000);
}
catch (InterruptedException e)
{
}
maxTries--;
}
if (mc.thePlayer != null)
{
mc.thePlayer.addChatMessage(builder.toString());
}
}
}
}
catch (InvalidSyntaxException e)
{
FMLLog.warning("[Modstats] Can't parse response: '%s'.", e.getMessage());
}
}
@Override
public void run()
{
try
{
String data = getData();
String playerId = getPlayerId();
String hash = getSignature(playerId + "!" + data);
String template = manual ? urlManualTemplate : urlAutoTemplate;
String mcVersion = new CallableMinecraftVersion(null).minecraftVersion();
URL url = new URL(String.format(template, mcVersion, playerId, data, hash, reporter.config.betaNotifications, reporter.config.forCurrentMinecraftVersion));
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
String out = "";
while ((line = reader.readLine()) != null)
{
// in most cases it will contain just one line
out += line;
}
reader.close();
parseResponse(out);
}
catch (MalformedURLException e)
{
FMLLog.warning("[Modstats] Invalid stat report url");
}
catch (IOException e)
{
FMLLog.info("[Modstats] Stat wasn't reported '" + e.getMessage() + "'");
}
catch (Exception e)
{
FMLLog.warning("[Modstats] Something wrong: " + e.toString());
}
}
}

View file

@ -0,0 +1,142 @@
/**
* Copyright (c) <2012>, Oleg Romanovskiy <shedarhome@gmail.com> aka Shedar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the author nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.modstats.reporter.v1;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
import org.modstats.IModstatsReporter;
import org.modstats.ModVersionData;
import org.modstats.ModstatInfo;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
public class Reporter implements IModstatsReporter
{
public Map<String, ModVersionData> registeredMods;
private DataSender sender;
public Config config;
/**
* At least one auto check was completed successfully
*/
private boolean checkedAuto;
public Reporter()
{
checkedAuto = false;
registeredMods = new ConcurrentHashMap<String, ModVersionData>(2, 0.9f, 1);
MinecraftForge.EVENT_BUS.register(this);
config = new Config();
}
private void startCheck(boolean manual)
{
if (!config.allowUpdates)
return;
// only manual check is allowed on servers
if (!FMLCommonHandler.instance().getSide().isClient() && !manual)
return;
if (registeredMods.isEmpty())
return;
DataSender currentSender = sender;
if (!manual && checkedAuto)
return;
if (currentSender != null && (currentSender.manual == false || manual))
return;
currentSender = new DataSender(this, manual);
currentSender.start();
sender = currentSender;
}
@ForgeSubscribe
public void worldLoad(WorldEvent.Load event)
{
startCheck(false);
}
@Override
public void registerMod(Object mod)
{
if (!config.allowUpdates)
return;
if (mod == null)
{
FMLLog.warning("[Modstats] Can't register null mod.");
return;
}
ModstatInfo info = mod.getClass().getAnnotation(ModstatInfo.class);
if (info == null)
{
FMLLog.warning("[Modstats] ModstatsInfo annotation not found for given mod.");
return;
}
if (info.prefix() == null || info.prefix().equals(""))
{
FMLLog.warning("[Modstats] Mod prefix can't be empty.");
return;
}
Mod modData = mod.getClass().getAnnotation(Mod.class);
ModVersionData data;
if (modData == null)
{
if (info.name() == null || info.name().equals(""))
{
FMLLog.warning("[Modstats] Mod name can't be empty.");
return;
}
if (info.version() == null || info.version().equals(""))
{
FMLLog.warning("[Modstats] Mod version can't be empty.");
return;
}
data = new ModVersionData(info.prefix(), info.name(), info.version());
}
else
{
data = new ModVersionData(info.prefix(), modData.name(), modData.version());
}
registeredMods.put(info.prefix(), data);
}
@Override
public void doManualCheck()
{
startCheck(true);
}
}

1
CM/Built-Broken-Lib Submodule

@ -0,0 +1 @@
Subproject commit 1bf4e4b364dc01ff8634156e9cb0750769d21bc6

291
CM/CodingStandard.xml Normal file
View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Dark's Format" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="1000"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
</profile>
</profiles>

1
CM/CoreLibrary Submodule

@ -0,0 +1 @@
Subproject commit b7d6a8c6cf24a013c68d5b9fe4153d7a5a585452

91
CM/LICENSE.txt Normal file
View file

@ -0,0 +1,91 @@
Copyright (c) 2013, DarkGuardsman
All rights reserved.
0. Definitions
--------------
Minecraft: Denotes a copy of the Minecraft game licensed by Mojang AB
User: Anybody that interacts with the software in one of the following ways:
- play
- decompile
- recompile or compile
- modify
- distribute
Mod: The mod code designated by the present license, in source form, binary form, as obtained standalone, as part of a wider distribution or resulting from the compilation of the original or modified Minecraft sources.
Mod Pack - Package distribution of mods and there assets to be used by the user for easy install and collective download.
Texture Pack - Package distribution of texture or art work to change the visual look of the mod.
Dependency: Code required for the Mod to work properly. This includes dependencies required to compile the code as well as any file or modification
that is explicatively or implicatively required for the Mod to be working.
Owner: The project leader of the Mod regardlessly of repo holder, manager, or developer
1. Scope
--------
The present license is granted to any user of the Mod. As a prerequisite, a user must own a legally acquired copy of Minecraft. Terms of license may change anytime with or without notice. The user of this Mod will be subject to the newest version of this license.
2. Liability
------------
This Mod is provided 'as is' with no warranties, implied or otherwise. The owner of this Mod takes no responsibility for any damages incurred from the use of this Mod. This Mod alters fundamental parts of the Minecraft game, parts of Minecraft may not work with this Mod installed. All damages caused from the use or misuse of this Mod fall on the user.
3. Play rights
--------------
A) The user is allowed to install this Mod on a client and to play without restriction.
B) Server owners are allowed to install the mod as part of the server as long as the following is meet
1) Membership to the server is not required to access the content.
4. Modification rights
----------------------
The user may modify the original code for private use, learning experience, or to make a contribution to the original project source code. This does not give the right to redistribute any part of the original or modified code.
5. Distribution of original or modified copy rights
---------------------------------------------------
Is subject to distribution rights this entire Mod in its various forms which
includes but not limited too.
- binaries both original or modified
- source code both original or modified
- patches to its source or binary files
- any copy of a portion of its binaries, or source files
A) The user is NOT allowed to redistribute this Mod partially, in totality, or included in a distribution without explicate permissions from the owner. With the only exceptions being for the case in section 5 part B.
B) Distribution of this mod in a mod pack is only allowed if you have permission from the author. Once you have a permission you must agree to the following:
1) The mod pack should not contain a major version release of the mod within one week of its release to allow for bug fixes.
2) The mod pack should not contain a modified version of the mod unless to change the texture look of parts of the mod
3) The mod pack owner or contributors must redirect issues, errors and bug reports to the issue area of the mod's original github repo
4) The mod pack needs full public permission from all parts of the mod pack including mods, assets, and textures if it is publicly released.
5) The mod pack or its download site should allow access by users to the list of permissions and credits to authors
6) The mod pack or its download site should contain links to mod documentation and original mod sites
7) The mod pack can not make any profit from the distribution of the mod. Including but not limited to adfly links.
8) Any time any member of the mod's team can revoke the permission without reason
C)Private mod packs have permission automatically as long as its for a small server. Large server mod packs are considered to be public and need public permission from the author.
D) Textures of this mod are allowed to be used in the creation or modification of texture packs without permission. That is as long as links and credit to the original mod are given for easy user understanding.
6. Use in media creations rights
------------------------------------------------------
Subject of media includes pictures, films, streams, or any form of graphic based content.
This includes but is not limited to
- You-tube video uploads
- Live streams such as twitch.TV
- Game play videos created by programs like fraps
A) The user is fully permitted to create media that show content of the mod. However the creator is subject to the following.
1) The media can not be used to collect profit without permission
2) The media should not deface the mod in any way.
3) The media should follow the rules of distribution for the mod
4) The media should give credit to the mod author
5) At any time the author can request media to be removed

16
CM/README.md Normal file
View file

@ -0,0 +1,16 @@
## The Dark Machine
For Lack of a better name
### Brief
This is a mod set or series for minecraft that is designed to add ores, items, machines, and news ways to play the game in an industrial setting.
### Leaders and Developers
* Darkguardsman - Code & Project Lead
* HangCow - Art Lead
* Doppelgangerous - Tester
### License
Read the license.txt in the repo file for more information
### Contact
Email - DarkGuardsman - rseifert.phone@gmail.com

7
CM/bin/GitChangeLog.bat Normal file
View file

@ -0,0 +1,7 @@
cd ..
IF EXIST LastBuildData.txt (
Set /p "s=" <"LastBuildData.txt"
git log --after={"%s%"} > changeLog.txt
)
echo "%date:~10,4%-%date:~4,2%-%date:~7,2%"> LastBuildData.txt
PAUSE

8
CM/bin/GitChangeLog.sh Normal file
View file

@ -0,0 +1,8 @@
cd ..
if [-e "LastBuildData.txt"]
then
cat LastBuildData.txt
read line
git log --pretty="%s" --Since={$line} >> changeLog.txt
fi
date +"%Y-%m-%d" >> LastBuildData.txt

10
CM/bin/GitClone.bat Normal file
View file

@ -0,0 +1,10 @@
cd ..
mkdir downloads
cd downloads
git clone https://github.com/DarksCoreMachine/Fluid-Mechanics.git
git clone https://github.com/DarksCoreMachine/Assembly-Line.git
git clone https://github.com/DarksCoreMachine/FarmTech.git
git clone https://github.com/DarksCoreMachine/Greater-Security.git
git clone https://github.com/DarksCoreMachine/MechanizedMining.git
git clone https://github.com/DarkGuardsman/Built-Broken-Lib.git
git clone https://github.com/DarksCoreMachine/CoreLibrary.git

11
CM/bin/GitClone.sh Normal file
View file

@ -0,0 +1,11 @@
cd ..
mkdir downloads
cd downloads
git clone https://github.com/DarksCoreMachine/Fluid-Mechanics.git
git clone https://github.com/DarksCoreMachine/Assembly-Line.git
git clone https://github.com/DarksCoreMachine/FarmTech.git
git clone https://github.com/DarksCoreMachine/Greater-Security.git
git clone https://github.com/DarksCoreMachine/MechanizedMining.git
git clone https://github.com/DarkGuardsman/Built-Broken-Lib.git
git clone https://github.com/DarksCoreMachine/CoreLibrary.git

33
CM/bin/GitSync.bat Normal file
View file

@ -0,0 +1,33 @@
rem set defaults:
set "com=Clean up and import changes"
rem set parameters:
IF NOT "a%1"=="a" (set "com=%1")
cd ..\
git commit -am "%com%"
git submodule foreach git pull origin master
git push origin master
cd ..\
cd Assembly-Line
git commit -am "%com%"
git push origin master
cd ..\
cd FarmTech
git commit -am "%com%"
git push origin master
cd ..\
cd Fluid-Mechanics
git commit -am "%com%"
git push origin master
cd ..\
cd GreaterProtection
git commit -am "%com%"
git push origin master
cd MechanizedMining
git commit -am "%com%"
git push origin master
cd ..\
cd Empire-Engine
git submodule foreach git pull origin master
git commit -am "%com%"
git push origin master

4
CM/bin/GitUpdateCore.bat Normal file
View file

@ -0,0 +1,4 @@
cd ../
git pull origin master
git clone https://github.com/DarkGuardsman/Built-Broken-Lib.git
git clone https://github.com/DarksCoreMachine/CoreLibrary.git

34
CM/bin/GitUpdateSubs.bat Normal file
View file

@ -0,0 +1,34 @@
cd ..\
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd ..\
cd Assembly-Line
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd ..\
cd FarmTech
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd ..\
cd Fluid-Mechanics
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd ..\
cd GreaterProtection
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd MechanizedMining
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master
cd ..\
cd Empire-Engine
git submodule foreach git pull origin master
git commit -am "Updating Submodules"
git push origin master

0
CM/bin/StartClient.bat Normal file
View file

0
CM/bin/StartClient.sh Normal file
View file

0
CM/bin/StartServer.bat Normal file
View file

0
CM/bin/StartServer.sh Normal file
View file

6
CM/build.properties Normal file
View file

@ -0,0 +1,6 @@
dir.development=./
dir.mcp=${dir.development}forge/mcp
version.minecraft=1.6.2
version.mod.major=0
version.mod.minor=3
version.mod.revis=5

81
CM/build.xml Normal file
View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project name="CoreMachine" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.core" value="CoreMachine_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<target name="build">
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge Latest/" />
</copy>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Built-Broken-Lib">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}CoreLibrary">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}APIs">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<!-- Make all directories -->
<mkdir dir="output" />
<!-- Replace version numbers -->
<replace dir="${dir.mcp}/src/minecraft" token="@MAJOR@" value="${version.mod.major}" />
<replace dir="${dir.mcp}/src/minecraft" token="@MINOR@" value="${version.mod.minor}" />
<replace dir="${dir.mcp}/src/minecraft" token="@REVIS@" value="${version.mod.revis}" />
<replace dir="${dir.mcp}/src/minecraft" token="@BUILD@" value="${env.BUILD_NUMBER}" />
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="recompile.bat" />
</exec>
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
<!-- Copy compiled files into folders to be zipped -->
<copy todir="core">
<fileset dir="${dir.mcp}/reobf/minecraft" includes="dark/core/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="dark/machines/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="com/builtbroken/common/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="dark/api/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="buildcraft/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="dan200/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="ic2/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="org/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="themalexpansion/" />
<fileset dir="${dir.mcp}/reobf/minecraft" includes="universalelectricity/" />
<fileset dir="${dir.development}resources" excludes=".git/**" />
</copy>
<copy todir="output" file="LICENSE.txt" />
<copy todir="output" file="build.properties" />
<!-- OUTPUT LATEST JAR AND ZIP FILES -->
<jar destfile="output/${file.core}">
<fileset dir="core" />
</jar>
<copy todir="output" file="${file.all}" />
</target>
</project>

8
CM/dependancies.info Normal file
View file

@ -0,0 +1,8 @@
{
"repo": "http://files.minecraftforge.net/ForgeMultipart/",
"file": "ForgeMultipart-universal-@MCVERSION@-@VERSION@.jar",
"dev": "ForgeMultipart-dev-@MCVERSION@-@VERSION@.jar",
"class": "codechicken.multipart.MultipartMod",
"version": "1.0.0.182",
"mcversion": "1.6.4"
}

15
CM/dependencies.xml Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<dependencies mcversion = 1.6.2>
<dependency id="CoreMachine" name="Dark's Core Machine">
<versions> </version>
<download> </download>
<MD5> </MD5>
</dependency>
</dependencies>
<dependencies mcversion = 1.6.4>
<dependency id="CoreMachine" name="Dark's Core Machine">
<versions> </version>
<download> </download>
<MD5> </MD5>
</dependency>
</dependencies>

View file

@ -0,0 +1,2 @@
[InternetShortcut]
URL=http://en.wikipedia.org/wiki/Hardnesses_of_the_elements_(data_page)

View file

@ -0,0 +1 @@
Idea is to use a 3 part system to generate power from heat. A) Heat producer Anything that generates heat include engines, generators, reactors, wires, lava, sun, etc. Each object has diffrent heat values B) Heat conductor Conducts or stores heat threw diffrent methods. Is very tempory heat storage as it will cool back down without constant heat C) Heat users Machines that use the heat for a purpose. This includes boilers, themeral couples, plants, machines, etc. Each of these will involve some coding to make work correctly. For heat producers it will be a simple output X heat at Y tempature. This will be used by a manager for several uses. Main is to heat the surounding blocks, and world. As well damage, melt, or even chill block if negitive heat value. Heat conductors will work like heat users but will not work the heat. Rather they will decipate and store the heat. These are general block, and metal plates. Heat users will be generators mainly. They will each have there own code set but should use the heat in the same way. X ammount of heat equals W amount of work. Plan is to effect the enviroment with this system as well and create a conflex system. The user will never noticed the system over all. That is unless they abuse the system in some cases. These cases will be working to turn a snow boime into a desert boime using extreme heat output. Since the heat will be mapped to a seperate map with the normal block map it will work with other mods. As well effect entities like the player. If it get to warm the player will take heat damage. Too cold the player can turn into solid ice. Making for very interesting effects.

BIN
CM/docs/JHC-0803-lg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,2 @@
[InternetShortcut]
URL=http://en.wikipedia.org/wiki/Mohs_scale_of_mineral_hardness

13
CM/docs/Wires.txt Normal file
View file

@ -0,0 +1,13 @@
We want to keep wires very simple so that user doesn't need anything extra to run a string of machines together. However, we want to offer as many extra options that are 100% optional. This means they are not required but are avaible to more advanced users.
Features
Support UE and IC2 power as Builcraft will be converted to generator that translate the energy to UE values creating lose. The same might be done for IC2 later using a transformer if it becomes an issue.
Extra Features
Colored casings - similer to RI but not in the same way. A wire will be cased using a machine and only a machine. This way it both forces the user to think ahead, and makes it cheaper to mass produce
Multi-block - Same as RI, and redpower. We want to support multi-blocks on all levels, and in all parts of the mods. Chicken bones api will become part of the core, or we will make our own. Though the main point is too allow the user to hide the wires.
Switches & interupters - You may things these are there own blocks but the wires themselves will be the blocks. On right click of a wire with the item they will convert to a block of the type. A specially designed network system will understand the relation of the new block and know that energy can/can't flow threw it.
Multi-wire support - Similar to Redpower multi wires in which several wires can exist in the same wire. This will be a simple step once the network is told how to understand wires. Then it will be a simple fact of telling the wire what wire colors it has.
Lay down wires - Yes like Redpower once again, redpower seems to lead the way in minecraft tech, these wires will lay against the block and allow several wires to exist in the same block space. This will take a bit to code both the renderer, logic, and placement. Once done it will be a very very grand way to create networks.
Lay down pipes - this will work with the above and be added to FM but will need code base in the core wires. These pipes can exist in the same space as wires, As well right next to wires. Which will change the wire render slightly to have the wires go under the pipes. Should make for very effect space design.
Machine wiring - machines will need to be changed to allow for wires to go threw them. This will act like the wire is being passed around, under, or threw the machine. The player will right click the machine to say that it can pass wiring. After that the machine will act like a wire as well.

9
CM/docs/design.txt Normal file
View file

@ -0,0 +1,9 @@
The Core Machine
Idea
This originally started as a library for all my mods to share to cut down on code. As well provide a group API, and classes to work out of. The design now is to work it into a mod that provides very basic machine, item, and ore support. That way all my mods will have what they need in order to be used by the player. However, after 1.7 i plan to rework this back into a lib that will simpley be downloaded by each mod during run time. That way i remove the need for the core mod. As for the machines, ores, and items they will most likely become a mod of there own.
Reason
Mainly i was running into so many issues with each mod having the same Lib files inside it. So my options were either make a lib downloader, make a coremod, or make a mod core. Since make a mod core is simplier i decided to go with that. Though i plan to later make a lib downloader to support both my own libs, and other mods libs.

1
CM/docs/machines.txt Normal file
View file

@ -0,0 +1 @@
Fire Box(stone, iron, steel) Uses carbon based element to burn and generate heat. This heat can then be used by anything to do what it needs Liquid Fire Box(Prototype, basic, advanced) Burns fuel, and powered coal to generate heat at a very high rate. Heat Couple Turns heat into eletricity using thermal couples. Doesn't generate a large amount of energy but is useful. Heat Plate(copper, tin, steel, iron, bronze, lead) Hold heat for a short ammount of time. Souround a heating couple to buffer heat produced, or surround a reactor to help it stay cool. Furnace 2.0 Overrided version of the vanilla furnace. Come with two output slots, and a much inproved GUI. Can be upgraded to improve what it can do. Upgrades include senors, desplay, heating element, gas burner, and timer. Prototype Electric Furnace Upgrade of the furnace to add a heating element so that it can heat items with electicity. Looks like a furnace with wires and metal plates sticking out of it. Electric Furnace Built from scratch furnace rather than an upgrade that used electricity to cook/melt items. contains a GUI that will inform the user how much longer is left on the cook time, what tempature the device is at, estimated run time left, etc. Also contains external indicators for power, items dones, and is still running. As well has options for audio beeping when done. Battery Box Stores energy using Battery items. Has a chance to damage the battery over time. Can be networked together but at a cost of reduced power output. In which power is limited to how much the single battery box can output. Charging pad Can be placed on any surface. Allows the charging of a few items depending on its setup. Will charge and render the item inside the bad. A bar will display under the item showing how much it has been charged. Has several setup with the first being single item. In which the item will display at the center of the pad. Second version is two item setup that has reduced charge time and can store two items. Third setup is wall rack which can mount 4 items. Fourth is the same as the third but with 8 items. This is design as a rack in which the entire render will change. Instead of a part each item will be side ways, and have a red/green light above it. A larger bar will display at the top of the rack showing the racks battery life. Each setup is both designed for looks, and improved use. Capacitor Bank Improved version of the battery box. In which the batteries are replace with controled capacitors. They don't damage as easy and power output can be controled. It also allows for better networking and can be upgraded. The capacitors act like tanks and show a green fluid like level for energy. This way the user can easily see how full the batteries are. Display Used for anything. Main use in this mod will be to display Volt, amp, or watt readings from the machine next to it. Has a wide range of display modes allowing varies looks

BIN
CM/models/CoalGen.tcn Normal file

Binary file not shown.

Binary file not shown.

BIN
CM/models/FluidCan.tcn Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
CM/models/TankBodyA.tcn Normal file

Binary file not shown.

BIN
CM/models/TestCar.tcn Normal file

Binary file not shown.

Binary file not shown.

BIN
CM/models/WIP/battery.tcn Normal file

Binary file not shown.

BIN
CM/models/WIP/coilSide.tcn Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more