From 9e8be8e63f3d0ba1ab8e39a2a2393df0faa8cbc1 Mon Sep 17 00:00:00 2001 From: Xander Date: Wed, 29 Nov 2017 22:04:44 +0800 Subject: [PATCH] fix TextComponentBase helper not being network serialisable --- src/main/java/mekanism/common/util/TextComponentGroup.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/mekanism/common/util/TextComponentGroup.java b/src/main/java/mekanism/common/util/TextComponentGroup.java index 8c382e63a..915637252 100644 --- a/src/main/java/mekanism/common/util/TextComponentGroup.java +++ b/src/main/java/mekanism/common/util/TextComponentGroup.java @@ -1,7 +1,6 @@ package mekanism.common.util; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentBase; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.util.text.TextFormatting; @@ -9,14 +8,16 @@ import net.minecraft.util.text.TextFormatting; /** * Created by Thiakil on 8/11/2017. */ -public class TextComponentGroup extends TextComponentBase +public class TextComponentGroup extends TextComponentString { public TextComponentGroup(){ + super(""); } public TextComponentGroup(TextFormatting color) { + super(""); getStyle().setColor(color); } @@ -27,7 +28,7 @@ public class TextComponentGroup extends TextComponentBase } @Override - public ITextComponent createCopy() + public TextComponentGroup createCopy() { TextComponentGroup textcomponentstring = new TextComponentGroup(); textcomponentstring.setStyle(this.getStyle().createShallowCopy());