修复遥控器的代码调用错误
This commit is contained in:
parent
8d494f6aee
commit
4e6a86a067
1 changed files with 6 additions and 2 deletions
|
@ -54,11 +54,15 @@ public class Monitor extends Item {
|
|||
|
||||
if (stack.getOrCreateTag().getBoolean("Using")) {
|
||||
stack.getOrCreateTag().putBoolean("Using", false);
|
||||
if (world.isClientSide) {
|
||||
Minecraft.getInstance().options.setCameraType(CameraType.FIRST_PERSON);
|
||||
}
|
||||
} else {
|
||||
stack.getOrCreateTag().putBoolean("Using", true);
|
||||
if (world.isClientSide) {
|
||||
Minecraft.getInstance().options.setCameraType(CameraType.THIRD_PERSON_BACK);
|
||||
}
|
||||
}
|
||||
|
||||
DroneEntity drone = player.level().getEntitiesOfClass(DroneEntity.class, player.getBoundingBox().inflate(512))
|
||||
.stream().filter(e -> e.getStringUUID().equals(stack.getOrCreateTag().getString("LinkedDrone"))).findFirst().orElse(null);
|
||||
|
|
Loading…
Add table
Reference in a new issue