mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Use Recipe Generics in more places, and some general readability improvements (#5490)
* Use Recipe generics in more places * Use Recipe generics in even more places * Use Recipe generics for IMCHandler * Turns out I was wrong about the old enum names being used * More Recipe generics for getting recipes * Pass MachineType as constructor parameter up the chain * Minor readability cleanup * Use method to get block name while in external classes * Improve readability of some references to internal enum classes * More missed recipe generics to reduce number of casts * Make sure to check NBT for the recipes, and switch back to for loops from streams
This commit is contained in:
1 parent
8861e52abf
commit
7438ad4d9e
98 files changed
+534
-761
No files matched your search
@@ -6,6 +6,7 @@ import mekanism.api.EnumColor;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.ChanceMachineRecipe;
|
||||
@@ -25,8 +26,8 @@ public abstract class TileEntityChanceMachine<RECIPE extends ChanceMachineRecipe
|
||||
|
||||
private static final String[] methods = new String[]{"getEnergy", "getProgress", "isActive", "facing", "canOperate", "getMaxEnergy", "getEnergyNeeded"};
|
||||
|
||||
public TileEntityChanceMachine(String soundPath, String name, double baseMaxEnergy, double baseEnergyUsage, int ticksRequired, ResourceLocation location) {
|
||||
super(soundPath, name, baseMaxEnergy, baseEnergyUsage, 3, ticksRequired, location);
|
||||
public TileEntityChanceMachine(String soundPath, MachineType type, int ticksRequired, ResourceLocation location) {
|
||||
super(soundPath, type, 3, ticksRequired, location);
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
|
||||
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
|
||||
Reference in new issue
Block a user