mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Better machine hierarchy to avoid repetition
This commit is contained in:
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));
|
||||
|
||||
Reference in new issue
Block a user