A little refactoring
This commit is contained in:
parent
5ce9087ac5
commit
24f63e4d5b
2 changed files with 2 additions and 2 deletions
|
@ -59,10 +59,9 @@ public class AnvilScreenMixin extends ForgingScreen<AnvilScreenHandler> {
|
|||
|
||||
@Inject(method = "onSlotUpdate", at = @At("HEAD"), cancellable = true)
|
||||
public void onSlotUpdate(ScreenHandler handler, int slotId, ItemStack stack, CallbackInfo info) {
|
||||
AnvilScreenHandlerExtended anvilHandler = AnvilScreenHandlerExtended.class.cast(handler);
|
||||
if (anvilHandler.be_getCurrentRecipe() != null) {
|
||||
this.nameField.setText("");
|
||||
this.nameField.setEditable(false);
|
||||
this.setFocused(null);
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.screen.ForgingScreenHandler;
|
|||
import net.minecraft.screen.ScreenHandlerContext;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
|
||||
import ru.betterend.interfaces.AnvilScreenHandlerExtended;
|
||||
import ru.betterend.recipe.builders.AnvilRecipe;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue