mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-23 06:20:03 +00:00
Mark command computers as onlyOpCanSetNbt
This isn't required in vanilla, as the command computer is a
GameMasterBlock, and so isn't placeable in the first place.
*However*, this is a problem with Create contraptions — with those it's
possible to "place" a command computer complete with NBT. We override
onlyOpCanSetNbt to prevent this [^1].
[^1]: 7a7993deb8/src/main/java/com/simibubi/create/foundation/utility/NBTProcessors.java (L179)
This commit is contained in:
parent
55edced9de
commit
f212861370
@ -417,4 +417,9 @@ public abstract class AbstractComputerBlockEntity extends BlockEntity implements
|
||||
public Component getDisplayName() {
|
||||
return Nameable.super.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onlyOpCanSetNbt() {
|
||||
return getFamily() == ComputerFamily.COMMAND;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user