Update MCP mappings to snapshot_nodoc_20161220 (#3551)

This commit is contained in:
James Mitchell authored and LexManos committed 2016-12-21 15:52:30 -08:00
1 parent 1f4007e5d8
commit 5165dc52bf
88 files changed
+445 -436

No files matched your search

@@ -48,7 +48,7 @@ public abstract class CommandTreeBase extends CommandBase
public void addSubcommand(ICommand c)
{
commandMap.put(c.getCommandName(), c);
commandMap.put(c.getName(), c);
}
public Collection<ICommand> getSubCommands()
@@ -82,7 +82,7 @@ public abstract class CommandTreeBase extends CommandBase
@Override
@Nonnull
public List<String> getTabCompletionOptions(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args, @Nullable BlockPos pos)
public List<String> getTabCompletions(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args, @Nullable BlockPos pos)
{
if(args.length == 1)
{
@@ -92,7 +92,7 @@ public abstract class CommandTreeBase extends CommandBase
{
if(c.checkPermission(server, sender))
{
keys.add(c.getCommandName());
keys.add(c.getName());
}
}
@@ -104,10 +104,10 @@ public abstract class CommandTreeBase extends CommandBase
if(cmd != null)
{
return cmd.getTabCompletionOptions(server, sender, shiftArgs(args), pos);
return cmd.getTabCompletions(server, sender, shiftArgs(args), pos);
}
return super.getTabCompletionOptions(server, sender, args, pos);
return super.getTabCompletions(server, sender, args, pos);
}
@Override
@@ -130,7 +130,7 @@ public abstract class CommandTreeBase extends CommandBase
{
if(args.length < 1)
{
sender.addChatMessage(new TextComponentString(CommandBase.joinNiceStringFromCollection(commandMap.keySet())));
sender.sendMessage(new TextComponentString(CommandBase.joinNiceStringFromCollection(commandMap.keySet())));
}
else
{
@@ -20,16 +20,12 @@
package net.minecraftforge.server.command;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.server.ForgeTimeTracker;
@@ -39,13 +35,13 @@ public class ForgeCommand extends CommandBase {
private static final DecimalFormat timeFormatter = new DecimalFormat("########0.000");
@Override
public String getCommandName()
public String getName()
{
return "forge";
}
@Override
public String getCommandUsage(ICommandSender icommandsender)
public String getUsage(ICommandSender icommandsender)
{
return "commands.forge.usage";
}
@@ -107,7 +103,7 @@ public class ForgeCommand extends CommandBase {
{
ForgeTimeTracker.tileEntityTrackingDuration = duration;
ForgeTimeTracker.tileEntityTracking = true;
sender.addChatMessage(new TextComponentTranslation("commands.forge.tracking.te.enabled", duration));
sender.sendMessage(new TextComponentTranslation("commands.forge.tracking.te.enabled", duration));
}
private void doTPSLog(MinecraftServer server, ICommandSender sender, String[] args)
@@ -130,17 +126,17 @@ public class ForgeCommand extends CommandBase {
{
double worldTickTime = ForgeCommand.mean(server.worldTickTimes.get(dimId)) * 1.0E-6D;
double worldTPS = Math.min(1000.0/worldTickTime, 20);
sender.addChatMessage(new TextComponentTranslation("commands.forge.tps.summary",String.format("Dim %d", dimId), timeFormatter.format(worldTickTime), timeFormatter.format(worldTPS)));
sender.sendMessage(new TextComponentTranslation("commands.forge.tps.summary",String.format("Dim %d", dimId), timeFormatter.format(worldTickTime), timeFormatter.format(worldTPS)));
}
double meanTickTime = ForgeCommand.mean(server.tickTimeArray) * 1.0E-6D;
double meanTPS = Math.min(1000.0/meanTickTime, 20);
sender.addChatMessage(new TextComponentTranslation("commands.forge.tps.summary","Overall", timeFormatter.format(meanTickTime), timeFormatter.format(meanTPS)));
sender.sendMessage(new TextComponentTranslation("commands.forge.tps.summary","Overall", timeFormatter.format(meanTickTime), timeFormatter.format(meanTPS)));
}
else
{
double worldTickTime = ForgeCommand.mean(server.worldTickTimes.get(dim)) * 1.0E-6D;
double worldTPS = Math.min(1000.0/worldTickTime, 20);
sender.addChatMessage(new TextComponentTranslation("commands.forge.tps.summary",String.format("Dim %d", dim), timeFormatter.format(worldTickTime), timeFormatter.format(worldTPS)));
sender.sendMessage(new TextComponentTranslation("commands.forge.tps.summary",String.format("Dim %d", dim), timeFormatter.format(worldTickTime), timeFormatter.format(worldTPS)));
}
}