按下shift时不再激活智慧芯片
This commit is contained in:
parent
97e6012266
commit
b551801339
1 changed files with 9 additions and 5 deletions
|
@ -1362,13 +1362,17 @@ public class ClientEventHandler {
|
|||
event.setFOV(event.getFOV() / (1.0 + p * 0.01) * (1 - 0.4 * breathTime));
|
||||
fov = event.getFOV();
|
||||
|
||||
if (zoom && !notInGame()
|
||||
// 智慧芯片
|
||||
if (!player.isShiftKeyDown()
|
||||
&& zoom
|
||||
&& !notInGame()
|
||||
&& drawTime < 0.01
|
||||
&& !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) {
|
||||
int level = PerkHelper.getItemPerkLevel(ModPerks.INTELLIGENT_CHIP.get(), stack);
|
||||
if (level > 0) {
|
||||
&& !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).map(c -> c.edit).orElse(false)) {
|
||||
int intelligentChipLevel = PerkHelper.getItemPerkLevel(ModPerks.INTELLIGENT_CHIP.get(), stack);
|
||||
|
||||
if (intelligentChipLevel > 0) {
|
||||
if (ClientEventHandler.entity == null || !entity.isAlive()) {
|
||||
ClientEventHandler.entity = SeekTool.seekLivingEntity(player, player.level(), 32 + 8 * (level - 1), 16 / zoomFov);
|
||||
ClientEventHandler.entity = SeekTool.seekLivingEntity(player, player.level(), 32 + 8 * (intelligentChipLevel - 1), 16 / zoomFov);
|
||||
}
|
||||
if (entity != null && entity.isAlive()) {
|
||||
Vec3 toVec = getVec3(event, player);
|
||||
|
|
Loading…
Add table
Reference in a new issue