WIP: Ender Ore generation

This commit is contained in:
Aleksey 2020-09-30 11:50:27 +03:00
parent d272597e87
commit ad0834b25f
10 changed files with 90 additions and 18 deletions

View file

@ -8,6 +8,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.recipebook.BlastFurnaceRecipeBookScreen;
@ -18,6 +19,7 @@ import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.Recipe;
import net.minecraft.screen.slot.Slot;
import net.minecraft.util.collection.DefaultedList;
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
@Environment(EnvType.CLIENT)
@ -33,6 +35,14 @@ public class EndStoneSmelterRecipeBookScreen extends BlastFurnaceRecipeBookScree
return EndStoneSmelterBlockEntity.availableFuels().keySet();
}
@Override
public void slotClicked(Slot slot) {
super.slotClicked(slot);
if (slot != null && slot.id < this.craftingScreenHandler.getCraftingSlotCount()) {
this.fuelSlot = null;
}
}
@Override
public void showGhostRecipe(Recipe<?> recipe, List<Slot> slots) {
this.ghostSlots.reset();

View file

@ -3,6 +3,7 @@ package ru.betterend.client.gui;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.screenhandler.v1.ScreenHandlerRegistry;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventory;
@ -19,6 +20,7 @@ import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.screen.slot.Slot;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import ru.betterend.BetterEnd;
import ru.betterend.blocks.EndStoneSmelter;
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;