Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Forge 1.16.5-36.2.39] Create new screen error

Recommended Posts

Can you help me for this error please,
For information, I do not speak English, I am French. But, you can answer me in English, I will use a translator.

Exception message: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER



ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, () -> (mc, screen) -> new NewGui());



private final ResourceLocation guiTextureLocation = new ResourceLocation(Main.MODID, "textures/gui/bann.png");
private final int xSize = 256;
private final int ySize = 202;
private int guiLeft;
private int guiTop;

public NewGui(){
     super(new TranslationTextComponent("gui.bann.test"));

public void init(){
     this.guiLeft = (this.width - this.xSize) / 2;
     this.guiTop = (this.height - this.ySize) / 2;

public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks){
     super.render(matrixStack, mouseX, mouseY, partialTicks);

private void drawBackground(MatrixStack matrixStack){
     this.blit(matrixStack, guiLeft, guiTop, 0, 0, this.xSize, this.ySize);


Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.