Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

Commit

Permalink
Fix 1.8.9 -> 1.10.2 compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Nov 27, 2016
1 parent a40e8d3 commit 87733ca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/squiddev/cctweaks/CommandCCTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
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;
import net.minecraft.util.text.TextComponentString;
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;
Expand Down Expand Up @@ -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<WorldPosition, ServerComputer> computers = MultimapBuilder.hashKeys().hashSetValues().build();
for (ServerComputer computer : ComputerCraft.serverComputerRegistry.getComputers()) {
Expand All @@ -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))
);

Expand All @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit 87733ca

Please sign in to comment.