Fix crafting CPU name comparision and implement ITextComponent container sync.

This commit is contained in:
Sebastian Hartte
2020-06-19 00:08:17 +02:00
parent 3faa3db2b6
commit f2a9d8c806
6 changed files with 116 additions and 72 deletions
@@ -70,8 +70,8 @@ public class GuiCraftingStatus extends GuiCraftingCPU<ContainerCraftingStatus> {
if (this.container.selectedCpu >= 0)// && status.selectedCpu < status.cpus.size() )
{
if (this.container.myName.length() > 0) {
final String name = this.container.myName.substring(0, Math.min(20, this.container.myName.length()));
if (this.container.myName != null) {
final String name = this.container.myName.getStringTruncated(20);
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
} else {
btnTextText = GuiText.CPUs.getLocal() + ": #" + this.container.selectedCpu;