22w16b with massive Component changes

This commit is contained in:
gnembon committed 2022-04-21 00:26:39 +02:00
1 parent 8101abb431
commit 746c8548e9
31 files changed
+153 -162

No files matched your search

@@ -9,7 +9,7 @@ import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandRuntimeException;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.BaseComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.DyeColor;
/**
@@ -57,7 +57,7 @@ public class CounterCommand
HopperCounter counter = HopperCounter.getCounter(color);
if (counter == null) throw new CommandRuntimeException(Messenger.s("Unknown wool color: "+color));
for (BaseComponent message: counter.format(source.getServer(), realtime, false))
for (Component message: counter.format(source.getServer(), realtime, false))
{
source.sendSuccess(message, false);
}
@@ -93,7 +93,7 @@ public class CounterCommand
*/
private static int listAllCounters(CommandSourceStack source, boolean realtime)
{
for (BaseComponent message: HopperCounter.formatAll(source.getServer(), realtime))
for (Component message: HopperCounter.formatAll(source.getServer(), realtime))
{
source.sendSuccess(message, false);
}
@@ -14,7 +14,7 @@ import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.arguments.coordinates.BlockPosArgument;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.BaseComponent;
import net.minecraft.network.chat.Component;
import static com.mojang.brigadier.arguments.StringArgumentType.getString;
import static com.mojang.brigadier.arguments.StringArgumentType.greedyString;
@@ -42,7 +42,7 @@ public class InfoCommand
dispatcher.register(command);
}
public static void printBlock(List<BaseComponent> messages, CommandSourceStack source, String grep)
public static void printBlock(List<Component> messages, CommandSourceStack source, String grep)
{
Messenger.m(source, "");
if (grep != null)
@@ -51,7 +51,7 @@ public class InfoCommand
Messenger.m(source, messages.get(0));
for (int i = 1; i<messages.size(); i++)
{
BaseComponent line = messages.get(i);
Component line = messages.get(i);
Matcher m = p.matcher(line.getString());
if (m.find())
{
@@ -11,7 +11,7 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.BaseComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import static com.mojang.brigadier.arguments.FloatArgumentType.floatArg;
@@ -94,7 +94,7 @@ public class TickCommand
catch (CommandSyntaxException ignored)
{
}
BaseComponent message = TickSpeed.tickrate_advance(player, advance, tail_command, source);
Component message = TickSpeed.tickrate_advance(player, advance, tail_command, source);
source.sendSuccess(message, false);
return 1;
}