From 87733ca83ba97b9256a2240d69ea27fe99fb0ed5 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Sun, 27 Nov 2016 20:20:05 +0000 Subject: [PATCH] Fix 1.8.9 -> 1.10.2 compile issues --- .../java/org/squiddev/cctweaks/CommandCCTweaks.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/squiddev/cctweaks/CommandCCTweaks.java b/src/main/java/org/squiddev/cctweaks/CommandCCTweaks.java index 0a3acfa9..a73872b0 100644 --- a/src/main/java/org/squiddev/cctweaks/CommandCCTweaks.java +++ b/src/main/java/org/squiddev/cctweaks/CommandCCTweaks.java @@ -13,6 +13,7 @@ import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.Style; @@ -20,6 +21,7 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; +import net.minecraft.world.World; import org.apache.commons.lang3.StringUtils; import org.squiddev.cctweaks.core.utils.ComputerAccessor; import org.squiddev.cctweaks.core.utils.WorldPosition; @@ -199,7 +201,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args if (computer.isOn()) shutdown++; computer.unload(); } - sender.addChatMessage(new ChatComponentText("Shutdown " + shutdown + " / " + computers.size())); + sender.addChatMessage(new TextComponentString("Shutdown " + shutdown + " / " + computers.size())); } else if (command.equals("pdump")) { Multimap computers = MultimapBuilder.hashKeys().hashSetValues().build(); for (ServerComputer computer : ComputerCraft.serverComputerRegistry.getComputers()) { @@ -212,7 +214,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args } for (WorldPosition position : computers.keySet()) { - sender.addChatMessage(new ChatComponentText("") + sender.addChatMessage(new TextComponentString("") .appendSibling(link(fixed(formatPosition(position.getPosition()), 19), position.getPosition(), sender)) ); @@ -222,7 +224,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args boolean found = false; for (ServerComputer computer : computers.get(position)) { - sender.addChatMessage(new ChatComponentText(computer == actual ? " > " : " ") + sender.addChatMessage(new TextComponentString(computer == actual ? " > " : " ") .appendSibling(fixed(Integer.toString(computer.getInstanceID()), 10)) .appendSibling(SEPARATOR) .appendSibling(fixed(Integer.toString(computer.getID()), 10)) @@ -231,7 +233,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args } if (!found && actual != null) { - sender.addChatMessage(new ChatComponentText(" ?> ") + sender.addChatMessage(new TextComponentString(" ?> ") .appendSibling(fixed(Integer.toString(actual.getInstanceID()), 10)) .appendSibling(SEPARATOR) .appendSibling(fixed(Integer.toString(actual.getID()), 10))