Added Recipes
This commit is contained in:
parent
caeeaf397c
commit
afe1260213
3 changed files with 22 additions and 27 deletions
|
@ -88,29 +88,26 @@ public class RenderCrate extends TileEntitySpecialRenderer
|
|||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/*
|
||||
switch (tileEntity.getTier())
|
||||
{
|
||||
default:
|
||||
{
|
||||
itemName = "\u00a7a" + itemName;
|
||||
amount = "\u00a7a" + amount;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
itemName = "\u00a74" + itemName;
|
||||
amount = "\u00a74" + amount;
|
||||
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
itemName = "\u00a79" + itemName;
|
||||
amount = "\u00a79" + amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
this.renderText(itemName, side, 0.02f, x, y - 0.35f, z);
|
||||
|
||||
|
|
|
@ -145,6 +145,12 @@ public class AssemblyLine
|
|||
|
||||
System.out.println(NAME + " 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" }));
|
||||
|
||||
// Armbot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" }));
|
||||
|
||||
|
|
|
@ -213,39 +213,31 @@ public class BlockCrate extends BlockMachine
|
|||
*
|
||||
* @param tileEntity
|
||||
* @param player
|
||||
* @param maxStack - The maximum stack size to take out. Default should be 64.
|
||||
* @param requestSize - The maximum stack size to take out. Default should be 64.
|
||||
* @return True on success
|
||||
*/
|
||||
public boolean ejectItems(TileEntityCrate tileEntity, EntityPlayer player, int maxStack)
|
||||
public boolean ejectItems(TileEntityCrate tileEntity, EntityPlayer player, int requestSize)
|
||||
{
|
||||
World world = tileEntity.worldObj;
|
||||
ItemStack containingStack = tileEntity.getStackInSlot(0);
|
||||
|
||||
if (containingStack != null)
|
||||
{
|
||||
if (containingStack.stackSize > 0)
|
||||
if (containingStack.stackSize > 0 && requestSize > 0)
|
||||
{
|
||||
while (maxStack > 0)
|
||||
int amountToTake = Math.min(containingStack.stackSize, requestSize);
|
||||
|
||||
ItemStack dropStack = containingStack.copy();
|
||||
dropStack.stackSize = amountToTake;
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int amountToTake = Math.min(containingStack.stackSize, Math.min(maxStack, 64));
|
||||
ItemStack dropStack = containingStack.copy();
|
||||
dropStack.stackSize = amountToTake;
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, dropStack);
|
||||
|
||||
float var13 = 0.05F;
|
||||
entityItem.motionX = ((float) world.rand.nextGaussian() * var13);
|
||||
entityItem.motionY = ((float) world.rand.nextGaussian() * var13 + 0.2F);
|
||||
entityItem.motionZ = ((float) world.rand.nextGaussian() * var13);
|
||||
entityItem.delayBeforeCanPickup = 0;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
|
||||
containingStack.stackSize -= amountToTake;
|
||||
maxStack -= amountToTake;
|
||||
EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, dropStack);
|
||||
entityItem.delayBeforeCanPickup = 0;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
|
||||
containingStack.stackSize -= amountToTake;
|
||||
}
|
||||
|
||||
if (containingStack.stackSize <= 0)
|
||||
|
|
Loading…
Reference in a new issue