Use tooltip context of Atomic Reconstructor (#1415)

This commit is contained in:
Mrbysco 2024-10-18 22:17:58 +02:00
parent 0ac1e81d0e
commit ae60e77a2c

View file

@ -163,8 +163,8 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
if (this.lastSysTime + 3000 < sysTime) { if (this.lastSysTime + 3000 < sysTime) {
this.lastSysTime = sysTime; this.lastSysTime = sysTime;
if (Minecraft.getInstance().level != null) { if (context.level() != null) {
RandomSource random = Minecraft.getInstance().level.random; RandomSource random = context.level().random;
this.toPick1 = random.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1; this.toPick1 = random.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1;
this.toPick2 = random.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1; this.toPick2 = random.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1;
} }