diff --git a/gradle.properties b/gradle.properties index 6cf8ad3..bca8cc0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ fabric_version=0.58.0+1.19 config_version=7.0.73 modmenu_version=4.0.4 satin_version=1.9.0 -limlib_version=6.3.0 +limlib_version=6.3.1 mod_version = 1.2.3 maven_group = net.ludocrypt diff --git a/src/main/java/net/ludocrypt/corners/entity/DimensionalPaintingEntity.java b/src/main/java/net/ludocrypt/corners/entity/DimensionalPaintingEntity.java index 70ac05b..fc7a23e 100644 --- a/src/main/java/net/ludocrypt/corners/entity/DimensionalPaintingEntity.java +++ b/src/main/java/net/ludocrypt/corners/entity/DimensionalPaintingEntity.java @@ -16,7 +16,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; -import net.minecraft.util.registry.RegistryEntry; +import net.minecraft.util.registry.Registry; import net.minecraft.world.TeleportTarget; import net.minecraft.world.World; @@ -35,7 +35,7 @@ public static DimensionalPaintingEntity create(World world, BlockPos pos) { public static DimensionalPaintingEntity create(World world, BlockPos pos, Direction direction, PaintingVariant variant) { if (variant instanceof DimensionalPaintingVariant) { DimensionalPaintingEntity entity = create(world, pos); - ((PaintingEntityAccessor) entity).callSetVariant(RegistryEntry.of(variant)); + ((PaintingEntityAccessor) entity).callSetVariant(Registry.PAINTING_VARIANT.getEntry(Registry.PAINTING_VARIANT.getKey(variant).get()).get()); entity.setFacing(direction); return entity; } @@ -46,7 +46,7 @@ public static DimensionalPaintingEntity create(World world, BlockPos pos, Direct public static PaintingEntity createRegular(World world, BlockPos pos, Direction direction, PaintingVariant variant) { PaintingEntity entity = new PaintingEntity(EntityType.PAINTING, world); entity.setPosition(pos.getX(), pos.getY(), pos.getZ()); - ((PaintingEntityAccessor) entity).callSetVariant(RegistryEntry.of(variant)); + ((PaintingEntityAccessor) entity).callSetVariant(Registry.PAINTING_VARIANT.getEntry(Registry.PAINTING_VARIANT.getKey(variant).get()).get()); ((AbstractDecorationEntityAccessor) entity).callSetFacing(direction); return entity; } diff --git a/src/main/java/net/ludocrypt/corners/packet/ServerToClientPackets.java b/src/main/java/net/ludocrypt/corners/packet/ServerToClientPackets.java index bf1d360..8126e76 100644 --- a/src/main/java/net/ludocrypt/corners/packet/ServerToClientPackets.java +++ b/src/main/java/net/ludocrypt/corners/packet/ServerToClientPackets.java @@ -29,9 +29,9 @@ public static void manageServerToClientPackets() { client.execute(() -> { SoundEvent id = CornerRadioRegistry.getCurrent(client); if (client.world.getBlockState(pos).isOf(CornerBlocks.TUNED_RADIO)) { - List closestPaintings = client.world.getEntitiesByClass(PaintingEntity.class, Box.from(Vec3d.of(pos)).expand(16.0D), (entity) -> entity.getVariant() instanceof DimensionalPaintingVariant).stream().sorted(Comparator.comparing((entity) -> entity.squaredDistanceTo(Vec3d.of(pos)))).toList(); + List closestPaintings = client.world.getEntitiesByClass(PaintingEntity.class, Box.from(Vec3d.of(pos)).expand(16.0D), (entity) -> entity.getVariant().value() instanceof DimensionalPaintingVariant).stream().sorted(Comparator.comparing((entity) -> entity.squaredDistanceTo(Vec3d.of(pos)))).toList(); if (!closestPaintings.isEmpty()) { - id = CornerRadioRegistry.getCurrent(((DimensionalPaintingVariant) closestPaintings.get(0).getVariant()).radioRedirect); + id = CornerRadioRegistry.getCurrent(((DimensionalPaintingVariant) closestPaintings.get(0).getVariant().value()).radioRedirect); } } diff --git a/src/main/resources/assets/corners/textures/block/tuned_radio_front.png b/src/main/resources/assets/corners/textures/block/tuned_radio_front.png index 43da159..d134fe7 100644 Binary files a/src/main/resources/assets/corners/textures/block/tuned_radio_front.png and b/src/main/resources/assets/corners/textures/block/tuned_radio_front.png differ diff --git a/src/main/resources/assets/corners/textures/block/tuned_radio_front_on.png b/src/main/resources/assets/corners/textures/block/tuned_radio_front_on.png index d6fb750..029f607 100644 Binary files a/src/main/resources/assets/corners/textures/block/tuned_radio_front_on.png and b/src/main/resources/assets/corners/textures/block/tuned_radio_front_on.png differ diff --git a/src/main/resources/assets/corners/textures/block/wooden_radio_bottom.png b/src/main/resources/assets/corners/textures/block/wooden_radio_bottom.png index a69bd63..3459d2f 100644 Binary files a/src/main/resources/assets/corners/textures/block/wooden_radio_bottom.png and b/src/main/resources/assets/corners/textures/block/wooden_radio_bottom.png differ diff --git a/src/main/resources/assets/corners/textures/block/wooden_radio_front.png b/src/main/resources/assets/corners/textures/block/wooden_radio_front.png index 8496ea6..da20586 100644 Binary files a/src/main/resources/assets/corners/textures/block/wooden_radio_front.png and b/src/main/resources/assets/corners/textures/block/wooden_radio_front.png differ diff --git a/src/main/resources/assets/corners/textures/block/wooden_radio_front_on.png b/src/main/resources/assets/corners/textures/block/wooden_radio_front_on.png index 787f1b8..fa26f7d 100644 Binary files a/src/main/resources/assets/corners/textures/block/wooden_radio_front_on.png and b/src/main/resources/assets/corners/textures/block/wooden_radio_front_on.png differ diff --git a/src/main/resources/assets/corners/textures/block/wooden_radio_side.png b/src/main/resources/assets/corners/textures/block/wooden_radio_side.png index 7c0243a..b59a3e0 100644 Binary files a/src/main/resources/assets/corners/textures/block/wooden_radio_side.png and b/src/main/resources/assets/corners/textures/block/wooden_radio_side.png differ diff --git a/src/main/resources/assets/corners/textures/block/wooden_radio_top.png b/src/main/resources/assets/corners/textures/block/wooden_radio_top.png index f540ef0..e6ad2ab 100644 Binary files a/src/main/resources/assets/corners/textures/block/wooden_radio_top.png and b/src/main/resources/assets/corners/textures/block/wooden_radio_top.png differ