示例#1
0
 private static void func_151510_a(
     PacketBuffer p_151510_0_, DataWatcher.WatchableObject p_151510_1_) throws IOException {
   int var2 = (p_151510_1_.func_75674_c() << 5 | p_151510_1_.func_75672_a() & 31) & 255;
   p_151510_0_.writeByte(var2);
   switch (p_151510_1_.func_75674_c()) {
     case 0:
       p_151510_0_.writeByte(((Byte) p_151510_1_.func_75669_b()).byteValue());
       break;
     case 1:
       p_151510_0_.writeShort(((Short) p_151510_1_.func_75669_b()).shortValue());
       break;
     case 2:
       p_151510_0_.writeInt(((Integer) p_151510_1_.func_75669_b()).intValue());
       break;
     case 3:
       p_151510_0_.writeFloat(((Float) p_151510_1_.func_75669_b()).floatValue());
       break;
     case 4:
       p_151510_0_.func_150785_a((String) p_151510_1_.func_75669_b());
       break;
     case 5:
       ItemStack var4 = (ItemStack) p_151510_1_.func_75669_b();
       p_151510_0_.func_150788_a(var4);
       break;
     case 6:
       ChunkCoordinates var3 = (ChunkCoordinates) p_151510_1_.func_75669_b();
       p_151510_0_.writeInt(var3.field_71574_a);
       p_151510_0_.writeInt(var3.field_71572_b);
       p_151510_0_.writeInt(var3.field_71573_c);
   }
 }
示例#2
0
 public void func_75692_b(int p_75692_1_, Object p_75692_2_) {
   DataWatcher.WatchableObject var3 = this.func_75691_i(p_75692_1_);
   if (ObjectUtils.notEqual(p_75692_2_, var3.func_75669_b())) {
     var3.func_75673_a(p_75692_2_);
     this.field_151511_a.func_145781_i(p_75692_1_);
     var3.func_75671_a(true);
     this.field_75696_c = true;
   }
 }
示例#3
0
  public List func_75688_b() {
    ArrayList var1 = null;
    if (this.field_75696_c) {
      this.field_75694_d.readLock().lock();
      Iterator var2 = this.field_75695_b.values().iterator();

      while (var2.hasNext()) {
        DataWatcher.WatchableObject var3 = (DataWatcher.WatchableObject) var2.next();
        if (var3.func_75670_d()) {
          var3.func_75671_a(false);
          if (var1 == null) {
            var1 = new ArrayList();
          }

          var1.add(var3);
        }
      }

      this.field_75694_d.readLock().unlock();
    }

    this.field_75696_c = false;
    return var1;
  }
示例#4
0
  public void func_75687_a(List p_75687_1_) {
    this.field_75694_d.writeLock().lock();
    Iterator var2 = p_75687_1_.iterator();

    while (var2.hasNext()) {
      DataWatcher.WatchableObject var3 = (DataWatcher.WatchableObject) var2.next();
      DataWatcher.WatchableObject var4 =
          (DataWatcher.WatchableObject)
              this.field_75695_b.get(Integer.valueOf(var3.func_75672_a()));
      if (var4 != null) {
        var4.func_75673_a(var3.func_75669_b());
        this.field_151511_a.func_145781_i(var3.func_75672_a());
      }
    }

    this.field_75694_d.writeLock().unlock();
    this.field_75696_c = true;
  }