22w16b with massive Component changes
This commit is contained in:
1 parent
8101abb431
commit
746c8548e9
31 files changed
+153
-162
No files matched your search
@@ -47,13 +47,11 @@ import net.minecraft.core.Rotations;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtIo;
|
||||
import net.minecraft.nbt.NbtOps;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.nbt.StringTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.chat.BaseComponent;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientboundClearTitlesPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundCustomSoundPacket;
|
||||
@@ -551,7 +549,7 @@ public class Auxiliary {
|
||||
else title = null; // Will never happen, just to make lambda happy
|
||||
if (packetGetter == null)
|
||||
{
|
||||
Map<String, BaseComponent> map;
|
||||
Map<String, Component> map;
|
||||
if (actionString.equals("player_list_header"))
|
||||
map = HUDController.scarpet_headers;
|
||||
else
|
||||
@@ -566,7 +564,7 @@ public class Auxiliary {
|
||||
});
|
||||
else
|
||||
targetList.forEach(target -> {
|
||||
map.put(target.getScoreboardName(), (BaseComponent) title);
|
||||
map.put(target.getScoreboardName(), (MutableComponent) title);
|
||||
total.getAndIncrement();
|
||||
});
|
||||
HUDController.update_hud(((CarpetContext)c).s.getServer(), targetList);
|
||||
@@ -621,7 +619,7 @@ public class Auxiliary {
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
return ListValue.of(Value.NULL, ListValue.of(), new FormattedTextValue(new TextComponent(exc.getMessage())));
|
||||
return ListValue.of(Value.NULL, ListValue.of(), new FormattedTextValue(Component.literal(exc.getMessage())));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.ServerScoreboard;
|
||||
import net.minecraft.server.bossevents.CustomBossEvent;
|
||||
@@ -152,7 +151,7 @@ public class Scoreboards {
|
||||
return Value.FALSE;
|
||||
}
|
||||
|
||||
scoreboard.addObjective(objectiveName, criterion, new TextComponent(objectiveName), criterion.getDefaultRenderType());
|
||||
scoreboard.addObjective(objectiveName, criterion, Component.literal(objectiveName), criterion.getDefaultRenderType());
|
||||
return Value.TRUE;
|
||||
});
|
||||
|
||||
@@ -409,7 +408,7 @@ public class Scoreboards {
|
||||
if(lv.size() == 1)
|
||||
{
|
||||
if(bossBarManager.get(identifier) != null) return Value.FALSE;
|
||||
return StringValue.of(bossBarManager.create(identifier,new TextComponent(id)).getTextId().toString());
|
||||
return StringValue.of(bossBarManager.create(identifier,Component.literal(id)).getTextId().toString());
|
||||
}
|
||||
|
||||
String property = lv.get(1).getString();
|
||||
|
||||
Reference in new issue
Block a user