Update to 1.16.4

This commit is contained in:
Marcel Konrad
2020-11-02 23:51:10 +01:00
parent 6408a67956
commit 4f732a8062
18 changed files with 25 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
version = '1.16.3-2.11.1' version = '1.16.4-2.11.1'
group = 'exopandora.worldhandler' // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = 'exopandora.worldhandler' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'WorldHandler' archivesBaseName = 'WorldHandler'
@@ -27,7 +27,7 @@ minecraft {
// stable_# Stables are built at the discretion of the MCP team. // stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work. // Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace. // Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'snapshot', version: '20200723-1.16.1' mappings channel: 'snapshot', version: '20201028-1.16.3'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@@ -91,7 +91,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.16.3-34.0.4' minecraft 'net.minecraftforge:forge:1.16.4-35.0.0'
// You may put jars on which you depend on in ./libs or you may define them like so.. // You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version:classifier"

View File

@@ -11,7 +11,7 @@ public class Main
{ {
public static final String NAME = "World Handler"; public static final String NAME = "World Handler";
public static final String MODID = "worldhandler"; public static final String MODID = "worldhandler";
public static final String MC_VERSION = "1.16.3"; public static final String MC_VERSION = "1.16.4";
public static final String MOD_VERSION = "2.11.1"; public static final String MOD_VERSION = "2.11.1";
public static final String URL = "https://minecraft.curseforge.com/projects/world-handler-command-gui"; public static final String URL = "https://minecraft.curseforge.com/projects/world-handler-command-gui";

View File

@@ -16,7 +16,7 @@ import net.minecraftforge.registries.ForgeRegistries;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public abstract class ComponentAttribute implements IBuilderComponent public abstract class ComponentAttribute implements IBuilderComponent
{ {
public static final List<Attribute> ATTRIBUTES = ForgeRegistries.ATTRIBUTES.getValues().stream().filter(attribute -> !attribute.func_233754_c_().equals(I18n.format(attribute.func_233754_c_()))).collect(Collectors.toList()); public static final List<Attribute> ATTRIBUTES = ForgeRegistries.ATTRIBUTES.getValues().stream().filter(attribute -> !attribute.getAttributeName().equals(I18n.format(attribute.getAttributeName()))).collect(Collectors.toList());
protected Map<Attribute, Double> attributes = new HashMap<Attribute, Double>(); protected Map<Attribute, Double> attributes = new HashMap<Attribute, Double>();

View File

@@ -45,7 +45,7 @@ public class ContentChangeWorld extends ContentChild
IConnection connection = ContentChangeWorld.disconnect(); IConnection connection = ContentChangeWorld.disconnect();
DummyScreen dummy = new DummyScreen(() -> ContentChangeWorld.reconnect(connection)); 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)); Minecraft.getInstance().displayGuiScreen(new MultiplayerScreen(dummy));
} }
@@ -65,9 +65,9 @@ public class ContentChangeWorld extends ContentChild
if(isIntegrated) if(isIntegrated)
{ {
IntegratedServer integrated = Minecraft.getInstance().getIntegratedServer(); IntegratedServer integrated = Minecraft.getInstance().getIntegratedServer();
String folder = integrated.anvilConverterForAnvilFile.func_237282_a_(); String folder = integrated.anvilConverterForAnvilFile.getSaveName();
DimensionGeneratorSettings dimensionGeneratorSettings = integrated.func_240793_aU_().getDimensionGeneratorSettings(); DimensionGeneratorSettings dimensionGeneratorSettings = integrated.getServerConfiguration().getDimensionGeneratorSettings();
WorldSettings worldSettings = integrated.func_240793_aU_().func_230408_H_(); WorldSettings worldSettings = integrated.getServerConfiguration().getWorldSettings();
Minecraft.getInstance().world.sendQuittingDisconnectingPacket(); Minecraft.getInstance().world.sendQuittingDisconnectingPacket();
Minecraft.getInstance().unloadWorld(new DirtMessageScreen(new TranslationTextComponent("menu.savingLevel"))); Minecraft.getInstance().unloadWorld(new DirtMessageScreen(new TranslationTextComponent("menu.savingLevel")));
@@ -99,7 +99,7 @@ public class ContentChangeWorld extends ContentChild
else if(connection instanceof IntegratedConnection) else if(connection instanceof IntegratedConnection)
{ {
IntegratedConnection integrated = (IntegratedConnection) connection; 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(); Minecraft.getInstance().mouseHelper.grabMouse();
} }
else if(connection instanceof DedicatedConnection) else if(connection instanceof DedicatedConnection)

View File

@@ -170,7 +170,7 @@ public class ContentCustomItem extends Content
@Override @Override
public IFormattableTextComponent translate(Attribute item) public IFormattableTextComponent translate(Attribute item)
{ {
return new TranslationTextComponent(item.func_233754_c_()); return new TranslationTextComponent(item.getAttributeName());
} }
@Override @Override

View File

@@ -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_()); 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 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());
} }
} }

View File

@@ -177,7 +177,7 @@ public class ContentPlayer extends Content
{ {
int xPos = x + 175; int xPos = x + 175;
int yPos = y + 82; 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); 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); Minecraft.getInstance().fontRenderer.func_243248_b(matrix, Minecraft.getInstance().player.getName(), container.width / 2 - playerNameWidth + 59, yPos - 73, 0xE0E0E0);

View File

@@ -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_()); 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 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());
} }
} }

View File

@@ -194,7 +194,7 @@ public class ContentSummon extends Content
@Override @Override
public IFormattableTextComponent translate(Attribute item) public IFormattableTextComponent translate(Attribute item)
{ {
return new TranslationTextComponent(item.func_233754_c_()); return new TranslationTextComponent(item.getAttributeName());
} }
@Override @Override

View File

@@ -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.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 = 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 = 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())); this.seedField.setText(I18n.format("gui.worldhandler.world_info.world.seed") + ": " + ContentWorldInfo.format(server, object -> object.func_241755_D_().getSeed()));

View File

@@ -90,7 +90,7 @@ public class WidgetNameField implements IContainerWidget
{ {
int width = font.getStringWidth(I18n.format("gui.worldhandler.generic.edit_username")) + 2; int width = font.getStringWidth(I18n.format("gui.worldhandler.generic.edit_username")) + 2;
this.nameField.setWidth(width); 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 else
{ {

View File

@@ -78,7 +78,7 @@ public class GuiButtonPiano extends GuiButtonBase
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer; FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
this.blit(matrix, this.x, this.y, 25 + hoverstate * 15 - 15, 0, 15, 92); 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) protected void drawBlackKey(MatrixStack matrix, int hoverstate)

View File

@@ -94,7 +94,7 @@ public class GuiSlider extends GuiButtonBase
int value = this.persistence.getValueInt(); int value = this.persistence.getValueInt();
IFormattableTextComponent suffix = this.logic.formatValue(value).append(this.logic.formatSuffix(value)); IFormattableTextComponent suffix = this.logic.formatValue(value).append(this.logic.formatSuffix(value));
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer; 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); this.setMessage(text);
} }

View File

@@ -1,6 +1,5 @@
package exopandora.worldhandler.util; package exopandora.worldhandler.util;
import exopandora.worldhandler.builder.INBTWritable; import exopandora.worldhandler.builder.INBTWritable;
import net.minecraft.nbt.INBT; import net.minecraft.nbt.INBT;
import net.minecraft.nbt.StringNBT; import net.minecraft.nbt.StringNBT;
@@ -75,7 +74,7 @@ public class MutableStringTextComponent extends StringTextComponent implements I
public IReorderingProcessor formatter(String string, Integer index) public IReorderingProcessor formatter(String string, Integer index)
{ {
return IReorderingProcessor.func_242239_a(string, this.getStyle()); return IReorderingProcessor.fromString(string, this.getStyle());
} }
@Override @Override

View File

@@ -37,7 +37,7 @@ public class RegistryHelper
registerRegistry(ForgeRegistries.POTIONS, Effect::getName); registerRegistry(ForgeRegistries.POTIONS, Effect::getName);
registerRegistry(ForgeRegistries.BIOMES, biome -> registerRegistry(ForgeRegistries.BIOMES, biome ->
{ {
MutableRegistry<Biome> registry = DynamicRegistries.func_239770_b_().func_243612_b(Registry.BIOME_KEY); MutableRegistry<Biome> registry = DynamicRegistries.func_239770_b_().getRegistry(Registry.BIOME_KEY);
ResourceLocation resource = registry.getKey(biome); ResourceLocation resource = registry.getKey(biome);
String key = "biome." + biome.getRegistryName().getNamespace() + "." + resource.getPath(); String key = "biome." + biome.getRegistryName().getNamespace() + "." + resource.getPath();

View File

@@ -88,7 +88,7 @@ public class RenderUtils
matrix.scale(16.0F, 16.0F, 16.0F); matrix.scale(16.0F, 16.0F, 16.0F);
IRenderTypeBuffer.Impl buffer = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); IRenderTypeBuffer.Impl buffer = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource();
boolean flag = !bakedmodel.func_230044_c_(); boolean flag = !bakedmodel.isSideLit();
if(flag) if(flag)
{ {

View File

@@ -23,7 +23,7 @@ public class TextUtils
public static IFormattableTextComponent stripText(IFormattableTextComponent string, IFormattableTextComponent prefix, int maxWidth, FontRenderer fontRenderer) public static IFormattableTextComponent stripText(IFormattableTextComponent string, IFormattableTextComponent prefix, int maxWidth, FontRenderer fontRenderer)
{ {
if(fontRenderer.func_238414_a_(prefix) + fontRenderer.func_238414_a_(string) > (maxWidth - fontRenderer.func_238414_a_(prefix))) if(fontRenderer.getStringPropertyWidth(prefix) + fontRenderer.getStringPropertyWidth(string) > (maxWidth - fontRenderer.getStringPropertyWidth(prefix)))
{ {
IFormattableTextComponent result = new StringTextComponent("").setStyle(string.getStyle()); IFormattableTextComponent result = new StringTextComponent("").setStyle(string.getStyle());
@@ -31,7 +31,7 @@ public class TextUtils
{ {
IFormattableTextComponent extension = new StringTextComponent(result.getString() + c + "...").setStyle(string.getStyle()); IFormattableTextComponent extension = new StringTextComponent(result.getString() + c + "...").setStyle(string.getStyle());
if(fontRenderer.func_238414_a_(extension) < maxWidth) if(fontRenderer.getStringPropertyWidth(extension) < maxWidth)
{ {
result = new StringTextComponent(result.getString() + c).setStyle(string.getStyle()); result = new StringTextComponent(result.getString() + c).setStyle(string.getStyle());
} }

View File

@@ -11,7 +11,7 @@ license="GPL v3.0"
[[mods]] [[mods]]
modId="worldhandler" modId="worldhandler"
version="1.16.3-2.11.1" version="1.16.4-2.11.1"
displayName="World Handler" displayName="World Handler"
description="The World Handler provides a simple and easy to use graphical user interface for commands. It lets you create powerful and complex sub-commands alongside NBT-structures within seconds." description="The World Handler provides a simple and easy to use graphical user interface for commands. It lets you create powerful and complex sub-commands alongside NBT-structures within seconds."