protected NBTTagList a() {
    NBTTagList var1 = new NBTTagList();
    Collection var2 = this.c.g();
    Iterator var3 = var2.iterator();

    while (var3.hasNext()) {
      class_awk var4 = (class_awk) var3.next();
      NBTTagCompound var5 = new NBTTagCompound();
      var5.put("Name", var4.b());
      var5.put("DisplayName", var4.c());
      if (var4.l().getId() >= 0) {
        var5.put("TeamColor", var4.l().getName());
      }

      var5.put("Prefix", var4.e());
      var5.put("Suffix", var4.f());
      var5.put("AllowFriendlyFire", var4.g());
      var5.put("SeeFriendlyInvisibles", var4.h());
      var5.put("NameTagVisibility", var4.i().e);
      var5.put("DeathMessageVisibility", var4.j().e);
      NBTTagList var6 = new NBTTagList();
      Iterator var7 = var4.d().iterator();

      while (var7.hasNext()) {
        String var8 = (String) var7.next();
        var6.add((NBTTag) (new NBTTagString(var8)));
      }

      var5.put((String) "Players", (NBTTag) var6);
      var1.add((NBTTag) var5);
    }

    return var1;
  }
Exemplo n.º 2
0
  @Override
  void applyToItem(NBTTagCompound tag) {
    super.applyToItem(tag);
    if (hasCustomEffects()) {
      NBTTagList effectList = new NBTTagList();
      tag.set(POTION_EFFECTS.NBT, effectList);

      for (PotionEffect effect : customEffects) {
        NBTTagCompound effectData = new NBTTagCompound();
        effectData.setByte(ID.NBT, (byte) effect.getType().getId());
        effectData.setByte(AMPLIFIER.NBT, (byte) effect.getAmplifier());
        effectData.setInt(DURATION.NBT, effect.getDuration());
        effectData.setBoolean(AMBIENT.NBT, effect.isAmbient());
        effectList.add(effectData);
      }
    }
  }
  protected NBTTagList e() {
    NBTTagList var1 = new NBTTagList();
    Collection var2 = this.c.e();
    Iterator var3 = var2.iterator();

    while (var3.hasNext()) {
      class_awl var4 = (class_awl) var3.next();
      if (var4.d() != null) {
        NBTTagCompound var5 = new NBTTagCompound();
        var5.put("Name", var4.e());
        var5.put("Objective", var4.d().b());
        var5.put("Score", var4.c());
        var5.put("Locked", var4.g());
        var1.add((NBTTag) var5);
      }
    }

    return var1;
  }
  protected NBTTagList b() {
    NBTTagList var1 = new NBTTagList();
    Collection var2 = this.c.c();
    Iterator var3 = var2.iterator();

    while (var3.hasNext()) {
      class_awj var4 = (class_awj) var3.next();
      if (var4.c() != null) {
        NBTTagCompound var5 = new NBTTagCompound();
        var5.put("Name", var4.b());
        var5.put("CriteriaName", var4.c().a());
        var5.put("DisplayName", var4.d());
        var5.put("RenderType", var4.e().a());
        var1.add((NBTTag) var5);
      }
    }

    return var1;
  }
Exemplo n.º 5
0
  @Override
  public boolean update(boolean force, boolean applyPhysics) {
    boolean result = (isPlaced()) ? super.update(force, applyPhysics) : true;

    if (result) {
      banner.color = base.getDyeData();

      NBTTagList newPatterns = new NBTTagList();

      for (Pattern p : patterns) {
        NBTTagCompound compound = new NBTTagCompound();
        compound.setInt("Color", p.getColor().getDyeData());
        compound.setString("Pattern", p.getPattern().getIdentifier());
        newPatterns.add(compound);
      }

      banner.patterns = newPatterns;

      banner.update();
    }

    return result;
  }