Better machine hierarchy to avoid repetition

This commit is contained in:
aidancbrady committed 2017-04-27 22:00:59 -04:00
1 parent b3621cd511
commit 2c161ed4ce
28 files changed
+279 -1184

No files matched your search

@@ -13,7 +13,6 @@ import mekanism.common.recipe.machines.ChanceMachineRecipe;
import mekanism.common.recipe.outputs.ChanceOutput;
import mekanism.common.tile.component.TileComponentConfig;
import mekanism.common.tile.component.TileComponentEjector;
import mekanism.common.tile.component.TileComponentUpgrade;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.InventoryUtils;
import mekanism.common.util.MekanismUtils;
@@ -24,9 +23,9 @@ import net.minecraft.util.ResourceLocation;
public abstract class TileEntityChanceMachine<RECIPE extends ChanceMachineRecipe<RECIPE>> extends TileEntityBasicMachine<ItemStackInput, ChanceOutput, RECIPE>
{
public TileEntityChanceMachine(String soundPath, String name, ResourceLocation location, double perTick, int ticksRequired, double maxEnergy)
public TileEntityChanceMachine(String soundPath, String name, int ticksRequired, double maxEnergy, double baseEnergyUsage, ResourceLocation location)
{
super(soundPath, name, location, perTick, ticksRequired, maxEnergy);
super(soundPath, name, ticksRequired, maxEnergy, baseEnergyUsage, 3, location);
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
@@ -39,9 +38,6 @@ public abstract class TileEntityChanceMachine<RECIPE extends ChanceMachineRecipe
configComponent.setInputConfig(TransmissionType.ENERGY);
inventory = NonNullList.withSize(5, ItemStack.EMPTY);
upgradeComponent = new TileComponentUpgrade(this, 3);
upgradeComponent.setSupported(Upgrade.MUFFLING);
ejectorComponent = new TileComponentEjector(this);
ejectorComponent.setOutputData(TransmissionType.ITEM, configComponent.getOutputs(TransmissionType.ITEM).get(3));