Make scrapboxinator great again!

Fix input/output
Greatly reduced process time
Removed any sign of upgrades
Remove WIP tag
Add crafting recipe 
Cleaned up unused imports

Recipe:
(ironplate|circuit|ironplate)
(dirt|scrapbox|dirt)
(ironplate|circuit|ironplate)
This commit is contained in:
Dimmerworld 2017-10-04 21:02:51 +11:00
parent 4c1d011544
commit 28010d0790
4 changed files with 17 additions and 32 deletions

View file

@ -44,8 +44,6 @@ import techreborn.init.ModBlocks;
import techreborn.init.ModItems;
import techreborn.lib.ModInfo;
import java.util.Random;
@RebornRegistry(modID = ModInfo.MOD_ID)
public class TileScrapboxinator extends TilePowerAcceptor
implements IToolDrop, IInventoryProvider, ISidedInventory, IContainerProvider {
@ -57,7 +55,7 @@ public class TileScrapboxinator extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "scrapboxinator", key = "ScrapboxinatorEnergyCost", comment = "Scrapboxinator Energy Cost (Value in EU)")
public static int cost = 20;
@ConfigRegistry(config = "machines", category = "scrapboxinator", key = "ScrapboxinatorRunTime", comment = "Scrapboxinator Run Time")
public static int runTime = 200;
public static int runTime = 10;
// @ConfigRegistry(config = "machines", category = "scrapboxinator", key = "ScrapboxinatorWrenchDropRate", comment = "Scrapboxinator Wrench Drop Rate")
public static float wrenchDropRate = 1.0F;
@ -75,9 +73,6 @@ public class TileScrapboxinator extends TilePowerAcceptor
return this.progress * scale / runTime;
}
//todo Fix external interactions (Hopper etc) - Balance power - Fix progress bar flicker
@Override
public void update() {
final boolean burning = this.isBurning();
@ -157,28 +152,24 @@ public class TileScrapboxinator extends TilePowerAcceptor
}
// ISidedInventory
@Override
public int[] getSlotsForFace(final EnumFacing side) {
return side == EnumFacing.DOWN ? new int[] { 0, 1, 2 } : new int[] { 0, 1, 2 };
public int[] getSlotsForFace(EnumFacing side) {
return new int[] { 0, 1};
}
@Override
public boolean canInsertItem(final int slotIndex, final ItemStack itemStack, final EnumFacing side) {
if (slotIndex == 2)
return false;
if (slotIndex == 1) {
if (itemStack.getItem() == ModItems.SCRAP_BOX) {
return true;
}
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction){
if (index == 0) {
return true;
}
return this.isItemValidForSlot(slotIndex, itemStack);
return false;
}
@Override
public boolean canExtractItem(final int slotIndex, final ItemStack itemStack, final EnumFacing side) {
return slotIndex == 2;
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction){
return index == 1;
}
@Override
public double getBaseMaxPower() {
return maxEnergy;
@ -209,6 +200,11 @@ public class TileScrapboxinator extends TilePowerAcceptor
return this.inventory;
}
@Override
public boolean canBeUpgraded() {
return false;
}
public int getProgress() {
return this.progress;
}
@ -221,8 +217,7 @@ public class TileScrapboxinator extends TilePowerAcceptor
public BuiltContainer createContainer(final EntityPlayer player) {
return new ContainerBuilder("scrapboxinator").player(player.inventory).inventory(8, 84).hotbar(8, 142)
.addInventory().tile(this).filterSlot(0, 56, 34, stack -> stack.getItem() == ModItems.SCRAP_BOX)
.outputSlot(1, 116, 35).upgradeSlot(2, 152, 8).upgradeSlot(3, 152, 26).upgradeSlot(4, 152, 44)
.upgradeSlot(5, 152, 62).syncEnergyValue().syncIntegerValue(this::getProgress, this::setProgress)
.outputSlot(1, 116, 35).syncEnergyValue().syncIntegerValue(this::getProgress, this::setProgress)
.addInventory().create(this);
}
}