Dist patch?

This commit is contained in:
simibubi 2021-06-29 23:00:27 +02:00
parent c6e50ad26e
commit 7548d483fd
2 changed files with 4 additions and 6 deletions

View file

@ -34,6 +34,7 @@ import com.simibubi.create.foundation.utility.outliner.Outliner;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.renderer.BlockModelShapes; import net.minecraft.client.renderer.BlockModelShapes;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ModelResourceLocation; 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 SuperByteBufferCache BUFFER_CACHE = new SuperByteBufferCache();
public static final Outliner OUTLINER = new Outliner(); public static final Outliner OUTLINER = new Outliner();
public static final GhostBlocks GHOST_BLOCKS = new GhostBlocks(); 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 ZapperRenderHandler ZAPPER_RENDER_HANDLER = new ZapperRenderHandler();
public static final PotatoCannonRenderHandler POTATO_CANNON_RENDER_HANDLER = new PotatoCannonRenderHandler(); public static final PotatoCannonRenderHandler POTATO_CANNON_RENDER_HANDLER = new PotatoCannonRenderHandler();

View file

@ -1,24 +1,20 @@
package com.simibubi.create.foundation.gui; package com.simibubi.create.foundation.gui;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.CreateClient;
import net.minecraft.client.gui.AbstractGui; 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.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
public interface IScreenRenderable { public interface IScreenRenderable {
@OnlyIn(Dist.CLIENT)
Screen EMPTY_SCREEN = new Screen(new StringTextComponent("")) {};
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
void draw(MatrixStack ms, AbstractGui screen, int x, int y); void draw(MatrixStack ms, AbstractGui screen, int x, int y);
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
default void draw(MatrixStack ms, int x, int y) { default void draw(MatrixStack ms, int x, int y) {
draw(ms, EMPTY_SCREEN, x, y); draw(ms, CreateClient.EMPTY_SCREEN, x, y);
} }
} }