mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 07:36:01 +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
@@ -15,6 +15,7 @@ import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.common.inventory.container.ContainerChanceMachine;
|
||||
import mekanism.common.recipe.machines.ChanceMachineRecipe;
|
||||
import mekanism.common.tile.TileEntityChanceMachine;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -25,10 +26,10 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChanceMachine extends GuiMekanismTile<TileEntityChanceMachine> {
|
||||
public class GuiChanceMachine<RECIPE extends ChanceMachineRecipe<RECIPE>> extends GuiMekanismTile<TileEntityChanceMachine<RECIPE>> {
|
||||
|
||||
public GuiChanceMachine(InventoryPlayer inventory, TileEntityChanceMachine tile) {
|
||||
super(tile, new ContainerChanceMachine(inventory, tile));
|
||||
public GuiChanceMachine(InventoryPlayer inventory, TileEntityChanceMachine<RECIPE> tile) {
|
||||
super(tile, new ContainerChanceMachine<>(inventory, tile));
|
||||
ResourceLocation resource = getGuiLocation();
|
||||
addGuiElement(new GuiRedstoneControl(this, tileEntity, resource));
|
||||
addGuiElement(new GuiUpgradeTab(this, tileEntity, resource));
|
||||
|
||||
Reference in new issue
Block a user