diff --git a/library/block/block_content_registry/src/testmod/java/org/quiltmc/qsl/block/test/BlockContentRegistryTest.java b/library/block/block_content_registry/src/testmod/java/org/quiltmc/qsl/block/test/BlockContentRegistryTest.java index 4df5fe15b7..97dbc5a134 100644 --- a/library/block/block_content_registry/src/testmod/java/org/quiltmc/qsl/block/test/BlockContentRegistryTest.java +++ b/library/block/block_content_registry/src/testmod/java/org/quiltmc/qsl/block/test/BlockContentRegistryTest.java @@ -66,7 +66,7 @@ public class BlockContentRegistryTest implements ModInitializer, QuiltGameTest { @Override public void onInitialize(ModContainer mod) { RegistryExtensions.register(Registries.BLOCK, new Identifier(MOD_ID, "oxidizable_iron_block"), - new OxidizableBlock(Oxidizable.OxidizationLevel.UNAFFECTED, AbstractBlock.Settings.copy(Blocks.IRON_BLOCK)), + new OxidizableBlock(Oxidizable.OxidizationLevel.UNAFFECTED, AbstractBlock.Settings.method_9630(Blocks.IRON_BLOCK)), BlockContentRegistries.OXIDIZABLE, new ReversibleBlockEntry(Blocks.IRON_BLOCK, false)); BlockContentRegistries.ENCHANTING_BOOSTERS.put(Blocks.IRON_BLOCK, new ConstantBooster(3f)); diff --git a/library/block/block_entity/src/testmod/java/org/quiltmc/qsl/block/entity/test/AngyBlock.java b/library/block/block_entity/src/testmod/java/org/quiltmc/qsl/block/entity/test/AngyBlock.java index 74623540e0..1c2729aa78 100644 --- a/library/block/block_entity/src/testmod/java/org/quiltmc/qsl/block/entity/test/AngyBlock.java +++ b/library/block/block_entity/src/testmod/java/org/quiltmc/qsl/block/entity/test/AngyBlock.java @@ -16,6 +16,7 @@ package org.quiltmc.qsl.block.entity.test; +import com.mojang.serialization.MapCodec; import org.jetbrains.annotations.Nullable; import net.minecraft.block.AbstractBlock; @@ -35,7 +36,7 @@ public class AngyBlock extends BlockWithEntity { public AngyBlock(MapColor mapColor) { - super(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(mapColor)); + super(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(mapColor)); } @Override @@ -68,6 +69,11 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt return BlockEntityTypeTest.COLORFUL_BLOCK_ENTITY_TYPE.instantiate(pos, state); } + @Override + protected MapCodec getCodec() { + return null; + } + @Override public BlockRenderType getRenderType(BlockState state) { return BlockRenderType.MODEL; diff --git a/library/core/data_callback/src/testmod/java/org/quiltmc/qsl/data/callback/test/DataCallbackTests.java b/library/core/data_callback/src/testmod/java/org/quiltmc/qsl/data/callback/test/DataCallbackTests.java index f744c182f2..6d71a2a6d5 100644 --- a/library/core/data_callback/src/testmod/java/org/quiltmc/qsl/data/callback/test/DataCallbackTests.java +++ b/library/core/data_callback/src/testmod/java/org/quiltmc/qsl/data/callback/test/DataCallbackTests.java @@ -92,7 +92,7 @@ public interface ServerJoin extends CodecAware { } public record ServerJoinChat(String text, Style style) implements ServerJoin { - public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group(Codec.STRING.fieldOf("text").forGetter(ServerJoinChat::text), Style.CODEC.fieldOf("style").forGetter(ServerJoinChat::style)).apply(instance, ServerJoinChat::new)); + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group(Codec.STRING.fieldOf("text").forGetter(ServerJoinChat::text), Style.Serializer.CODEC.fieldOf("style").forGetter(ServerJoinChat::style)).apply(instance, ServerJoinChat::new)); public static final Identifier CODEC_ID = new Identifier("quilt_data_callback_testmod", "chat"); @Override diff --git a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/ChannelList.java b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/ChannelList.java index 3f68405591..82abb03fbb 100644 --- a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/ChannelList.java +++ b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/ChannelList.java @@ -26,7 +26,7 @@ final class ChannelList extends EntryListWidget { ChannelList(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) { - super(client, width, height, top, bottom, itemHeight); + super(client, top, width, bottom-top, itemHeight); } @Override @@ -39,7 +39,7 @@ void clear() { } @Override - public void appendNarrations(NarrationMessageBuilder arg) { + public void updateNarration(NarrationMessageBuilder arg) { // TODO seems to be possibly accessibility related } diff --git a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/NetworkingChannelTest.java b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/NetworkingChannelTest.java index a42ba21991..89a1b8d359 100644 --- a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/NetworkingChannelTest.java +++ b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/channeltest/NetworkingChannelTest.java @@ -106,7 +106,7 @@ private static int registerChannel(CommandContext context, System.out.printf("Received packet on channel %s%n", channel); }); - context.getSource().sendSystemMessage(Text.of(String.format("Registered channel %s for %s", channel, executor.getEntityName()))); + context.getSource().sendSystemMessage(Text.of(String.format("Registered channel %s for %s", channel, executor.getDisplayName()))); return 1; } @@ -119,7 +119,7 @@ private static int unregisterChannel(CommandContext context } ServerPlayNetworking.unregisterReceiver(player.networkHandler, channel); - context.getSource().sendSystemMessage(Text.of(String.format("Unregistered channel %s for %s", getIdentifier(context, "channel"), player.getEntityName()))); + context.getSource().sendSystemMessage(Text.of(String.format("Unregistered channel %s for %s", getIdentifier(context, "channel"), player.getDisplayName()))); return 1; } @@ -128,7 +128,7 @@ private static int infoCommand(CommandContext context, Serv ServerCommandSource source = context.getSource(); Set channels = ServerPlayNetworking.getSendable(player); - source.sendSystemMessage(Text.of(String.format("Available channels for player %s", player.getEntityName()))); + source.sendSystemMessage(Text.of(String.format("Available channels for player %s", player.getDisplayName()))); for (Identifier channel : channels) { source.sendSystemMessage(Text.of(channel.toString())); diff --git a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/trackingevents/NetworkingEntityTrackingEventsTest.java b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/trackingevents/NetworkingEntityTrackingEventsTest.java index 7e7e14fa18..51582909f2 100644 --- a/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/trackingevents/NetworkingEntityTrackingEventsTest.java +++ b/library/core/networking/src/testmod/java/org/quiltmc/qsl/networking/test/trackingevents/NetworkingEntityTrackingEventsTest.java @@ -28,7 +28,7 @@ public final class NetworkingEntityTrackingEventsTest implements EntityTrackingE @Override public void beforeStartTracking(Entity trackedEntity, ServerPlayerEntity player) { if (trackedEntity instanceof ArmorStandEntity) { - player.sendMessage(Text.literal("About to be tracking ").append(trackedEntity.getEntityName()), false); + player.sendMessage(Text.literal("About to be tracking ").append(trackedEntity.getDisplayName()), false); } } @@ -36,7 +36,7 @@ public void beforeStartTracking(Entity trackedEntity, ServerPlayerEntity player) @Override public void afterStartTracking(Entity trackedEntity, ServerPlayerEntity player) { if (trackedEntity instanceof ArmorStandEntity) { - player.sendMessage(Text.literal("Tracking ").append(trackedEntity.getEntityName()), false); + player.sendMessage(Text.literal("Tracking ").append(trackedEntity.getDisplayName()), false); } } @@ -44,7 +44,7 @@ public void afterStartTracking(Entity trackedEntity, ServerPlayerEntity player) @Override public void onStopTracking(Entity trackedEntity, ServerPlayerEntity player) { if (trackedEntity instanceof ArmorStandEntity) { - player.sendMessage(Text.literal("No longer tracking ").append(trackedEntity.getEntityName()), false); + player.sendMessage(Text.literal("No longer tracking ").append(trackedEntity.getDisplayName()), false); } } } diff --git a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibEventsTest.java b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibEventsTest.java index f6e7201d89..a22bd8c754 100644 --- a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibEventsTest.java +++ b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibEventsTest.java @@ -49,7 +49,7 @@ public void onInitialize(ModContainer mod) { } }); - register(TEST_BLOCK_ID, new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK))); + register(TEST_BLOCK_ID, new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK))); if (!entryAddEventFoundBlock) { throw new AssertionError("Registry entry add event was not invoked on the registration of block with id " + TEST_BLOCK_ID); diff --git a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorRegistrationTest.java b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorRegistrationTest.java index 63bc274a30..03c9c06bad 100644 --- a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorRegistrationTest.java +++ b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorRegistrationTest.java @@ -45,7 +45,7 @@ public class RegistryLibMonitorRegistrationTest implements ModInitializer { @Override public void onInitialize(ModContainer mod) { - register(TEST_BLOCK_A_ID, new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK))); + register(TEST_BLOCK_A_ID, new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK))); var monitor = RegistryMonitor.create(Registries.BLOCK) .filter(context -> context.id().getNamespace().equals("quilt_registry_test_monitors_registration")); @@ -55,7 +55,7 @@ public void onInitialize(ModContainer mod) { context.value(), context.id(), context.rawId(), context.registry()); if (context.id() == TEST_BLOCK_A_ID) { - context.register(TEST_BLOCK_B_ID, new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK))); + context.register(TEST_BLOCK_B_ID, new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK))); } }); } diff --git a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorTest.java b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorTest.java index 0b5aab8593..eecd0dc978 100644 --- a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorTest.java +++ b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibMonitorTest.java @@ -42,7 +42,7 @@ public class RegistryLibMonitorTest implements ModInitializer { @Override public void onInitialize(ModContainer mod) { - Block blockA = register(TEST_BLOCK_A_ID, new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK))); + Block blockA = register(TEST_BLOCK_A_ID, new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK))); var monitor = RegistryMonitor.create(Registries.BLOCK) .filter(context -> context.id().getNamespace().equals("quilt_registry_test_monitors")); @@ -61,7 +61,7 @@ public void onInitialize(ModContainer mod) { upcomingSet.add(context.value()); }); - Block blockB = register(TEST_BLOCK_B_ID, new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK))); + Block blockB = register(TEST_BLOCK_B_ID, new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK))); if (!allSet.contains(blockA) || !allSet.contains(blockB)) { throw new AssertionError("Entries " + allSet + " found by RegistryMonitor via forAll were not as expected"); diff --git a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibSyncTest.java b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibSyncTest.java index 6fca83aa9f..d175772c1b 100644 --- a/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibSyncTest.java +++ b/library/core/registry/src/testmod/java/org/quiltmc/qsl/registry/test/RegistryLibSyncTest.java @@ -119,7 +119,7 @@ private void printReg() { @SuppressWarnings("unchecked") static Identifier register(int i) { var id = new Identifier(NAMESPACE, "entry_" + i); - var block = new Block(AbstractBlock.Settings.copy(Blocks.STONE).mapColor(MapColor.BLACK)); + var block = new Block(AbstractBlock.Settings.method_9630(Blocks.STONE).mapColor(MapColor.BLACK)); Registry.register(Registries.BLOCK, id, block); Registry.register(Registries.ITEM, id, new BlockItem(block, new Item.Settings())); diff --git a/library/worldgen/dimension/src/testmod/java/org/quiltmc/qsl/worldgen/dimension/QuiltDimensionTest.java b/library/worldgen/dimension/src/testmod/java/org/quiltmc/qsl/worldgen/dimension/QuiltDimensionTest.java index 1d150ea38f..9fb5840df9 100644 --- a/library/worldgen/dimension/src/testmod/java/org/quiltmc/qsl/worldgen/dimension/QuiltDimensionTest.java +++ b/library/worldgen/dimension/src/testmod/java/org/quiltmc/qsl/worldgen/dimension/QuiltDimensionTest.java @@ -23,7 +23,6 @@ import net.minecraft.block.Blocks; import net.minecraft.command.CommandBuildContext; -import net.minecraft.command.CommandException; import net.minecraft.entity.EntityType; import net.minecraft.entity.passive.CowEntity; import net.minecraft.registry.Registries; @@ -108,10 +107,6 @@ private int swapTargeted(CommandContext context) throws Com var target = new TeleportTarget(new Vec3d(0.5, 101, 0.5), Vec3d.ZERO, 0, 0); QuiltDimensions.teleport(player, modWorld, target); - if (player.getWorld() != modWorld) { - throw new CommandException(Text.literal("Teleportation failed!")); - } - modWorld.setBlockState(new BlockPos(0, 100, 0), Blocks.DIAMOND_BLOCK.getDefaultState()); modWorld.setBlockState(new BlockPos(0, 101, 0), Blocks.TORCH.getDefaultState()); } else {