From ae60e77a2c30ff1be951cbf6e848e39c9d991ed8 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Fri, 18 Oct 2024 22:17:58 +0200 Subject: [PATCH] Use tooltip context of Atomic Reconstructor (#1415) --- .../mod/blocks/BlockAtomicReconstructor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 3fdd39129..02d709512 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -163,8 +163,8 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im if (this.lastSysTime + 3000 < sysTime) { this.lastSysTime = sysTime; - if (Minecraft.getInstance().level != null) { - RandomSource random = Minecraft.getInstance().level.random; + if (context.level() != null) { + RandomSource random = context.level().random; this.toPick1 = random.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1; this.toPick2 = random.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1; }