From a7ac895fd18ea685ee687d4836194225cd5ce716 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 25 Nov 2023 02:37:10 +0000 Subject: [PATCH] Trigger an update when a bed's sheets are changed --- .../java/com/minelittlepony/unicopia/block/FancyBedBlock.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/block/FancyBedBlock.java b/src/main/java/com/minelittlepony/unicopia/block/FancyBedBlock.java index 44dd6f8e..259aca1d 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/FancyBedBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/FancyBedBlock.java @@ -19,6 +19,7 @@ import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.enums.BedPart; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtCompound; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.DyeColor; import net.minecraft.util.StringIdentifiable; import net.minecraft.util.math.BlockPos; @@ -114,6 +115,9 @@ public class FancyBedBlock extends BedBlock { public void setPattern(SheetPattern pattern) { this.pattern = pattern; markDirty(); + if (world instanceof ServerWorld sw) { + sw.getChunkManager().markForUpdate(getPos()); + } } public SheetPattern getPattern() {