public void UpdateOutput() { var recipe = CraftingRecipeDatabase.GetMatchingRecipe(this); OutputRecipe = recipe; if (OutputRecipe != null) { OutputStack = new ItemStack(OutputRecipe.Output.ItemKey, OutputRecipe.Output.Count, new Vector2(-1, -1)); } else { OutputStack = null; } }
protected override void OnLoad(EventArgs e) { IsLoadingDone = false; AssetDatabase.SetPack(AssetDatabase.DEFAULTPACK); GameBlocks.Init(); GameItems.Init(); CraftingRecipeDatabase.Init(); VSync = VSyncMode.Off; GL.Enable(EnableCap.CullFace); GL.CullFace(CullFaceMode.Back); GL.Enable(EnableCap.FramebufferSrgb); GL.Enable(EnableCap.DepthTest); GL.ClearColor(CLEAR_COLOUR.X, CLEAR_COLOUR.Y, CLEAR_COLOUR.Z, CLEAR_COLOUR.Z); AssetDatabase.GetAsset <Material>("Resources/Materials/Fallback.mat"); MainMenu = new MainMenu(); MainMenu.Show(); Program.Settings.UpdateAll(); //Load texture pack before generating icons AssetDatabase.GetAsset <TexturePack>(""); IconGenerator.GenerateBlockItemIcons(); WindowWidth = Program.Settings.WindowWidth; WindowHeight = Program.Settings.WindowHeight; PostProcessingEffects.RegisterEffect(new Bloom()); PostProcessingEffects.RegisterEffect(new ACESTonemapEffect()); IsLoadingDone = true; OnResize(null); base.OnLoad(e); }