Refined IC2 support, making it work.
This commit is contained in:
parent
cad749fa5c
commit
9afab004ff
7 changed files with 31 additions and 17 deletions
|
@ -93,12 +93,15 @@ public class AssemblyLine
|
|||
|
||||
public static Logger FMLog = Logger.getLogger(AssemblyLine.NAME);
|
||||
|
||||
// TODO: MAKE THIS FALSE EVERY BUILD!
|
||||
public static final boolean DEBUG_MODE = false;
|
||||
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
FMLog.setParent(FMLLog.getLogger());
|
||||
FMLog.info("Initializing...");
|
||||
UniversalElectricity.register(this, 1, 2, 5, false);
|
||||
UniversalElectricity.register(this, 1, 2, 6, false);
|
||||
instance = this;
|
||||
|
||||
CONFIGURATION.load();
|
||||
|
@ -144,10 +147,12 @@ public class AssemblyLine
|
|||
FMLog.info("Loading...");
|
||||
proxy.init();
|
||||
GrabDictionary.registerList();
|
||||
System.out.println(NAME + " Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
||||
|
||||
FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
||||
|
||||
// Crane Controller
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockCraneController, new Object[] { "SFS", "MCM", "SMS", 'F', blockCraneFrame, 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" }));
|
||||
|
||||
// Crane Frame
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 5), new Object[] { "I I", "I I", 'I', Item.ingotIron }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCraneFrame, 5), new Object[] { "I I", "I I", 'I', "ingotBronze" }));
|
||||
|
@ -159,10 +164,10 @@ public class AssemblyLine
|
|||
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit" }));
|
||||
|
||||
// Encoder
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "S S", "SCS", "SSS", 'S', "ingotSteel", 'C', "advancedCircuit" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotSteel", 'C', "advancedCircuit" }));
|
||||
|
||||
// Imprint
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemImprint, new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
|
||||
// Imprinter (VANILLA)
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
|
|
|
@ -401,6 +401,12 @@ public class BlockCrate extends BlockMachine
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metadata)
|
||||
{
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1)
|
||||
{
|
||||
|
|
|
@ -11,11 +11,12 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.BlockMachine;
|
||||
import universalelectricity.prefab.implement.IRotatable;
|
||||
import assemblyline.common.AssemblyLine;
|
||||
import assemblyline.common.TabAssemblyLine;
|
||||
|
||||
public class BlockTurntable extends Block
|
||||
public class BlockTurntable extends BlockMachine
|
||||
{
|
||||
public BlockTurntable(int par1, int par2)
|
||||
{
|
||||
|
|
|
@ -70,6 +70,6 @@ public abstract class TIC2Runnable extends TileEntityElectricityRunnable impleme
|
|||
@Override
|
||||
public int getMaxSafeInput()
|
||||
{
|
||||
return 2048;
|
||||
return 32;
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.electricity.ElectricityPack;
|
||||
import universalelectricity.prefab.network.PacketManager;
|
||||
import assemblyline.common.AssemblyLine;
|
||||
|
||||
/**
|
||||
* A class to be inherited by all machines on the assembly line. This will allow all machines to be
|
||||
|
@ -15,7 +16,6 @@ import universalelectricity.prefab.network.PacketManager;
|
|||
*/
|
||||
public abstract class TileEntityAssemblyNetwork extends TIC2Runnable
|
||||
{
|
||||
public boolean debugMode = true;
|
||||
/**
|
||||
* The range in which power can be transfered.
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ public abstract class TileEntityAssemblyNetwork extends TIC2Runnable
|
|||
|
||||
public boolean isRunning()
|
||||
{
|
||||
return this.debugMode || this.powerTransferRange > 0 || this.wattsReceived > this.getRequest().getWatts();
|
||||
return AssemblyLine.DEBUG_MODE || this.powerTransferRange > 0 || this.wattsReceived > this.getRequest().getWatts();
|
||||
}
|
||||
|
||||
public void updatePowerTransferRange()
|
||||
|
|
|
@ -190,12 +190,15 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
|
|||
*/
|
||||
public void throwItem(Vector3 outputPosition, ItemStack items)
|
||||
{
|
||||
EntityItem entityItem = new EntityItem(worldObj, outputPosition.x + 0.5, outputPosition.y + 0.8, outputPosition.z + 0.5, items);
|
||||
entityItem.motionX = 0;
|
||||
entityItem.motionZ = 0;
|
||||
entityItem.motionY /= 5;
|
||||
entityItem.delayBeforeCanPickup = 20;
|
||||
worldObj.spawnEntityInWorld(entityItem);
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
EntityItem entityItem = new EntityItem(this.worldObj, outputPosition.x + 0.5, outputPosition.y + 0.8, outputPosition.z + 0.5, items);
|
||||
entityItem.motionX = 0;
|
||||
entityItem.motionZ = 0;
|
||||
entityItem.motionY /= 5;
|
||||
entityItem.delayBeforeCanPickup = 20;
|
||||
this.worldObj.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BlockImprinter extends BlockMachine
|
|||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int x, int y, int z, int par5, int par6)
|
||||
public void dropEntireInventory(World par1World, int x, int y, int z, int par5, int par6)
|
||||
{
|
||||
TileEntity tileEntity = par1World.getBlockTileEntity(x, y, z);
|
||||
|
||||
|
@ -112,10 +112,9 @@ public class BlockImprinter extends BlockMachine
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(par1World, x, y, z, par5, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onUseWrench(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TileEntity tileEntity = par1World.getBlockTileEntity(x, y, z);
|
||||
|
|
Loading…
Reference in a new issue