public S39PacketPlayerAbilities(PlayerCapabilities capabilities) {
   this.setInvulnerable(capabilities.disableDamage);
   this.setFlying(capabilities.isFlying);
   this.setAllowFlying(capabilities.allowFlying);
   this.setCreativeMode(capabilities.isCreativeMode);
   this.setFlySpeed(capabilities.getFlySpeed());
   this.setWalkSpeed(capabilities.getWalkSpeed());
 }
示例#2
0
    public void func_77147_a(PlayerCapabilities p_77147_1_) {
      if (this == CREATIVE) {
        p_77147_1_.field_75101_c = true;
        p_77147_1_.field_75098_d = true;
        p_77147_1_.field_75102_a = true;
      } else {
        p_77147_1_.field_75101_c = false;
        p_77147_1_.field_75098_d = false;
        p_77147_1_.field_75102_a = false;
        p_77147_1_.field_75100_b = false;
      }

      p_77147_1_.field_75099_e = !this.func_82752_c();
    }