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