修复无人机遥控器切换时的网络错误
This commit is contained in:
parent
20926f9469
commit
c1201cb424
1 changed files with 6 additions and 2 deletions
|
@ -114,8 +114,10 @@ public class Monitor extends Item {
|
|||
if (!selected) {
|
||||
if (itemstack.getOrCreateTag().getBoolean("Using")) {
|
||||
itemstack.getOrCreateTag().putBoolean("Using", false);
|
||||
if (entity.level().isClientSide) {
|
||||
Minecraft.getInstance().options.setCameraType(CameraType.FIRST_PERSON);
|
||||
}
|
||||
}
|
||||
|
||||
if (drone != null) {
|
||||
drone.getPersistentData().putBoolean("left", false);
|
||||
|
@ -129,9 +131,11 @@ public class Monitor extends Item {
|
|||
if (drone == null) {
|
||||
if (itemstack.getOrCreateTag().getBoolean("Using")) {
|
||||
itemstack.getOrCreateTag().putBoolean("Using", false);
|
||||
if (entity.level().isClientSide) {
|
||||
Minecraft.getInstance().options.setCameraType(CameraType.FIRST_PERSON);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue