Пример #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 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;
  }