Skip to content

Commit

Permalink
Remove MFR support
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Oct 6, 2013
1 parent 28f912a commit 4cd2d07
Show file tree
Hide file tree
Showing 31 changed files with 49 additions and 18 deletions.
1 change: 1 addition & 0 deletions graveyard/readme.txt
@@ -0,0 +1 @@
The ghost of mods past. May they rest in peace and update in explosions.
10 changes: 5 additions & 5 deletions src/tconstruct/blocks/SmelteryBlock.java
Expand Up @@ -40,11 +40,11 @@ public SmelteryBlock(int id)

/* Rendering */

@Override
/*@Override
public int getRenderType ()
{
return SmelteryRender.smelteryModel;
}
}*/

@Override
public String[] getTextureNames ()
Expand Down Expand Up @@ -216,7 +216,7 @@ public TileEntity createTileEntity (World world, int metadata)
switch (metadata)
{
case 0:
return new SmelteryLogic();
return new AdaptiveSmelteryLogic();
case 1:
return new SmelteryDrainLogic();
case 3:
Expand All @@ -225,7 +225,7 @@ public TileEntity createTileEntity (World world, int metadata)
return new MultiServantLogic();
}

@Override
/*@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
{
super.onBlockPlacedBy(world, x, y, z, entityliving, stack);
Expand All @@ -243,7 +243,7 @@ public void onBlockPlacedElsewhere (World world, int x, int y, int z, EntityLivi
public void breakBlock (World world, int x, int y, int z, int par5, int par6) //Don't drop inventory
{
world.removeBlockTileEntity(x, y, z);
}
}*/

@Override
public void getSubBlocks (int id, CreativeTabs tab, List list)
Expand Down
20 changes: 15 additions & 5 deletions src/tconstruct/blocks/component/SmelteryScan.java
@@ -1,7 +1,6 @@
package tconstruct.blocks.component;

import java.util.ArrayList;
import java.util.Iterator;

import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
Expand Down Expand Up @@ -48,13 +47,24 @@ protected boolean checkServant (int x, int y, int z)
return false;
}

protected void addAirBlock (int x, int y, int z)
protected void finalizeStructure ()
{
super.finalizeStructure();
for (CoordTuple coord : airCoords)
{
world.setBlock(coord.x, coord.y, coord.z, TContent.tankAir.blockID);
IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x, coord.y, coord.z);
servant.verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
}
}

/*protected void addAirBlock (int x, int y, int z)
{
super.addAirBlock(x, y, z);
world.setBlock(x, y, z, Block.glass.blockID);
}
}*/

public void cleanup()
/*public void cleanup()
{
System.out.println("Structure cleanup activated. Air blocks: "+airCoords.size());
super.cleanup();
Expand All @@ -66,5 +76,5 @@ public void cleanup()
CoordTuple coord = (CoordTuple) i.next();
world.setBlockToAir(coord.x, coord.y, coord.z);
}
}
}*/
}
26 changes: 26 additions & 0 deletions src/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java
Expand Up @@ -184,6 +184,32 @@ public void setInventorySlotContents (int slot, ItemStack itemstack)
updateAirBlocks(slot, itemstack);
}
}

@Override
public ItemStack decrStackSize (int slot, int quantity)
{
if (inventory[slot] != null)
{
if (inventory[slot].stackSize <= quantity)
{
ItemStack stack = inventory[slot];
inventory[slot] = null;
return stack;
}
ItemStack split = inventory[slot].splitStack(quantity);
if (inventory[slot].stackSize == 0)
{
inventory[slot] = null;
}

updateAirBlocks(slot, inventory[slot]);
return split;
}
else
{
return null;
}
}

void updateAirBlocks (int slot, ItemStack itemstack)
{
Expand Down
10 changes: 2 additions & 8 deletions src/tconstruct/library/component/TankLayerScan.java
Expand Up @@ -130,7 +130,7 @@ public void checkValidStructure ()
{
completeStructure = true;
recurseStructureUp(master.yCoord + 1);
sortStructure();
finalizeStructure();

if (!world.isRemote && debug)
{
Expand All @@ -151,15 +151,9 @@ public void checkValidStructure ()
}
}

void sortStructure ()
protected void finalizeStructure ()
{
Collections.sort(airCoords, new CoordTupleSort());
if (!world.isRemote)
{
System.out.println("Sorted coords:");
for (CoordTuple coord : airCoords)
System.out.println(coord.toString());
}
}

public boolean isComplete ()
Expand Down

0 comments on commit 4cd2d07

Please sign in to comment.