修复重生时锁定瞄准的问题
This commit is contained in:
parent
b493526cf5
commit
c2ecc62537
2 changed files with 7 additions and 1 deletions
|
@ -43,6 +43,12 @@ public class PlayerEventHandler {
|
||||||
stack.getOrCreateTag().putInt("ammo", stack.getOrCreateTag().getInt("mag"));
|
stack.getOrCreateTag().putInt("ammo", stack.getOrCreateTag().getInt("mag"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||||
|
capability.zoom = false;
|
||||||
|
capability.zooming = false;
|
||||||
|
capability.syncPlayerVariables(player);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class TargetModVariables {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Capability<PlayerVariables> PLAYER_VARIABLES_CAPABILITY = CapabilityManager.get(new CapabilityToken<PlayerVariables>() {
|
public static final Capability<PlayerVariables> PLAYER_VARIABLES_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() {
|
||||||
});
|
});
|
||||||
|
|
||||||
@Mod.EventBusSubscriber
|
@Mod.EventBusSubscriber
|
||||||
|
|
Loading…
Add table
Reference in a new issue