Update to 1.16.4
This commit is contained in:
@@ -45,7 +45,7 @@ public class ContentChangeWorld extends ContentChild
|
||||
IConnection connection = ContentChangeWorld.disconnect();
|
||||
DummyScreen dummy = new DummyScreen(() -> ContentChangeWorld.reconnect(connection));
|
||||
|
||||
if(Minecraft.getInstance().gameSettings.field_230152_Z_)
|
||||
if(Minecraft.getInstance().gameSettings.skipMultiplayerWarning)
|
||||
{
|
||||
Minecraft.getInstance().displayGuiScreen(new MultiplayerScreen(dummy));
|
||||
}
|
||||
@@ -65,9 +65,9 @@ public class ContentChangeWorld extends ContentChild
|
||||
if(isIntegrated)
|
||||
{
|
||||
IntegratedServer integrated = Minecraft.getInstance().getIntegratedServer();
|
||||
String folder = integrated.anvilConverterForAnvilFile.func_237282_a_();
|
||||
DimensionGeneratorSettings dimensionGeneratorSettings = integrated.func_240793_aU_().getDimensionGeneratorSettings();
|
||||
WorldSettings worldSettings = integrated.func_240793_aU_().func_230408_H_();
|
||||
String folder = integrated.anvilConverterForAnvilFile.getSaveName();
|
||||
DimensionGeneratorSettings dimensionGeneratorSettings = integrated.getServerConfiguration().getDimensionGeneratorSettings();
|
||||
WorldSettings worldSettings = integrated.getServerConfiguration().getWorldSettings();
|
||||
|
||||
Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
|
||||
Minecraft.getInstance().unloadWorld(new DirtMessageScreen(new TranslationTextComponent("menu.savingLevel")));
|
||||
@@ -99,7 +99,7 @@ public class ContentChangeWorld extends ContentChild
|
||||
else if(connection instanceof IntegratedConnection)
|
||||
{
|
||||
IntegratedConnection integrated = (IntegratedConnection) connection;
|
||||
Minecraft.getInstance().func_238192_a_(integrated.getFolder(), integrated.getWorldSettings(), DynamicRegistries.func_239770_b_(), integrated.getDimensionGeneratorSettings()); //launchIntegratedServer
|
||||
Minecraft.getInstance().createWorld(integrated.getFolder(), integrated.getWorldSettings(), DynamicRegistries.func_239770_b_(), integrated.getDimensionGeneratorSettings());
|
||||
Minecraft.getInstance().mouseHelper.grabMouse();
|
||||
}
|
||||
else if(connection instanceof DedicatedConnection)
|
||||
|
||||
@@ -170,7 +170,7 @@ public class ContentCustomItem extends Content
|
||||
@Override
|
||||
public IFormattableTextComponent translate(Attribute item)
|
||||
{
|
||||
return new TranslationTextComponent(item.func_233754_c_());
|
||||
return new TranslationTextComponent(item.getAttributeName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -206,7 +206,7 @@ public class ContentNoteEditor extends Content
|
||||
|
||||
TranslationTextComponent text = new TranslationTextComponent("gui.worldhandler.blocks.note_block_editor.look_at_note_block", KeyHandler.KEY_WORLD_HANDLER.func_238171_j_());
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
fontRenderer.func_243248_b(matrix, text, x + 116 - fontRenderer.func_238414_a_(text) / 2, y + 70, Config.getSkin().getLabelColor());
|
||||
fontRenderer.func_243248_b(matrix, text, x + 116 - fontRenderer.getStringPropertyWidth(text) / 2, y + 70, Config.getSkin().getLabelColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ public class ContentPlayer extends Content
|
||||
{
|
||||
int xPos = x + 175;
|
||||
int yPos = y + 82;
|
||||
int playerNameWidth = Minecraft.getInstance().fontRenderer.func_238414_a_(Minecraft.getInstance().player.getName()) / 2;
|
||||
int playerNameWidth = Minecraft.getInstance().fontRenderer.getStringPropertyWidth(Minecraft.getInstance().player.getName()) / 2;
|
||||
|
||||
AbstractGui.fill(matrix, container.width / 2 - playerNameWidth - 1 + 59, yPos - 74, container.width / 2 + playerNameWidth + 1 + 59, yPos - 65, 0x3F000000);
|
||||
Minecraft.getInstance().fontRenderer.func_243248_b(matrix, Minecraft.getInstance().player.getName(), container.width / 2 - playerNameWidth + 59, yPos - 73, 0xE0E0E0);
|
||||
|
||||
@@ -189,7 +189,7 @@ public class ContentSignEditor extends Content
|
||||
|
||||
TranslationTextComponent text = new TranslationTextComponent("gui.worldhandler.blocks.sign_editor.look_at_sign", KeyHandler.KEY_WORLD_HANDLER.func_238171_j_());
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
fontRenderer.func_243248_b(matrix, text, x + 116 - fontRenderer.func_238414_a_(text) / 2, y + 70, Config.getSkin().getLabelColor());
|
||||
fontRenderer.func_243248_b(matrix, text, x + 116 - fontRenderer.getStringPropertyWidth(text) / 2, y + 70, Config.getSkin().getLabelColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ public class ContentSummon extends Content
|
||||
@Override
|
||||
public IFormattableTextComponent translate(Attribute item)
|
||||
{
|
||||
return new TranslationTextComponent(item.func_233754_c_());
|
||||
return new TranslationTextComponent(item.getAttributeName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ContentWorldInfo extends Content
|
||||
this.posZField.setText(I18n.format("gui.worldhandler.world_info.start.spawn") + " Z: " + ContentWorldInfo.format(world, object -> object.getWorldInfo().getSpawnZ()));
|
||||
|
||||
this.worldField = new GuiTextFieldTooltip(x + 118, y + 12, 114, 20);
|
||||
this.worldField.setText(I18n.format("gui.worldhandler.world_info.world.name") + ": " + ContentWorldInfo.format(server, object -> object.func_240793_aU_().getWorldName()));
|
||||
this.worldField.setText(I18n.format("gui.worldhandler.world_info.world.name") + ": " + ContentWorldInfo.format(server, object -> object.getServerConfiguration().getWorldName()));
|
||||
|
||||
this.seedField = new GuiTextFieldTooltip(x + 118, y + 36, 114, 20);
|
||||
this.seedField.setText(I18n.format("gui.worldhandler.world_info.world.seed") + ": " + ContentWorldInfo.format(server, object -> object.func_241755_D_().getSeed()));
|
||||
|
||||
@@ -90,7 +90,7 @@ public class WidgetNameField implements IContainerWidget
|
||||
{
|
||||
int width = font.getStringWidth(I18n.format("gui.worldhandler.generic.edit_username")) + 2;
|
||||
this.nameField.setWidth(width);
|
||||
this.nameField.setPosition(x - (font.func_238414_a_(container.getContent().getTitle()) + 2), y);
|
||||
this.nameField.setPosition(x - (font.getStringPropertyWidth(container.getContent().getTitle()) + 2), y);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ public class GuiButtonPiano extends GuiButtonBase
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
|
||||
this.blit(matrix, this.x, this.y, 25 + hoverstate * 15 - 15, 0, 15, 92);
|
||||
fontRenderer.func_243248_b(matrix, this.getMessage(), (float) (this.x + this.width / 2 - fontRenderer.func_238414_a_(this.getMessage()) / 2), (float) (this.y + (this.height - 8) / 2 + 36), textColor); //drawString
|
||||
fontRenderer.func_243248_b(matrix, this.getMessage(), (float) (this.x + this.width / 2 - fontRenderer.getStringPropertyWidth(this.getMessage()) / 2), (float) (this.y + (this.height - 8) / 2 + 36), textColor); //drawString
|
||||
}
|
||||
|
||||
protected void drawBlackKey(MatrixStack matrix, int hoverstate)
|
||||
|
||||
@@ -94,7 +94,7 @@ public class GuiSlider extends GuiButtonBase
|
||||
int value = this.persistence.getValueInt();
|
||||
IFormattableTextComponent suffix = this.logic.formatValue(value).append(this.logic.formatSuffix(value));
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
IFormattableTextComponent text = TextUtils.stripText(this.logic.formatPrefix(value), this.width - fontRenderer.func_238414_a_(suffix), fontRenderer).append(suffix);
|
||||
IFormattableTextComponent text = TextUtils.stripText(this.logic.formatPrefix(value), this.width - fontRenderer.getStringPropertyWidth(suffix), fontRenderer).append(suffix);
|
||||
this.setMessage(text);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user