diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 399d503ef..fbdd15ce8 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -34,6 +34,7 @@ import com.simibubi.create.foundation.utility.outliner.Outliner; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.renderer.BlockModelShapes; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.ModelResourceLocation; @@ -65,6 +66,7 @@ public class CreateClient { public static final SuperByteBufferCache BUFFER_CACHE = new SuperByteBufferCache(); public static final Outliner OUTLINER = new Outliner(); public static final GhostBlocks GHOST_BLOCKS = new GhostBlocks(); + public static final Screen EMPTY_SCREEN = new Screen(new StringTextComponent("")) {}; public static final ZapperRenderHandler ZAPPER_RENDER_HANDLER = new ZapperRenderHandler(); public static final PotatoCannonRenderHandler POTATO_CANNON_RENDER_HANDLER = new PotatoCannonRenderHandler(); diff --git a/src/main/java/com/simibubi/create/foundation/gui/IScreenRenderable.java b/src/main/java/com/simibubi/create/foundation/gui/IScreenRenderable.java index 512e8f208..ea8a9977c 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/IScreenRenderable.java +++ b/src/main/java/com/simibubi/create/foundation/gui/IScreenRenderable.java @@ -1,24 +1,20 @@ package com.simibubi.create.foundation.gui; import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.CreateClient; import net.minecraft.client.gui.AbstractGui; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.util.text.StringTextComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public interface IScreenRenderable { - @OnlyIn(Dist.CLIENT) - Screen EMPTY_SCREEN = new Screen(new StringTextComponent("")) {}; - @OnlyIn(Dist.CLIENT) void draw(MatrixStack ms, AbstractGui screen, int x, int y); @OnlyIn(Dist.CLIENT) default void draw(MatrixStack ms, int x, int y) { - draw(ms, EMPTY_SCREEN, x, y); + draw(ms, CreateClient.EMPTY_SCREEN, x, y); } }