Tabnine Logo
TagString.getStringData
Code IndexAdd Tabnine to your IDE (free)

How to use
getStringData
method
in
de.keyle.knbt.TagString

Best Java code snippets using de.keyle.knbt.TagString.getStringData (Showing top 3 results out of 315)

origin: xXKeyleXx/MyPet

@Override
public void load(TagCompound compound) {
  if (compound.getCompoundData().containsKey("Buff")) {
    Buff selectedBuff = Buff.getBuffByID(compound.getAs("Buff", TagInt.class).getIntData());
    if (selectedBuff != null) {
      this.selectedBuffs.add(selectedBuff);
    }
  }
  if (compound.getCompoundData().containsKey("Buffs")) {
    int[] selectedBuffs = compound.getAs("Buffs", TagIntArray.class).getIntArrayData();
    if (selectedBuffs.length != 0) {
      for (int selectedBuffId : selectedBuffs) {
        Buff selectedBuff = Buff.getBuffByID(selectedBuffId);
        if (selectedBuff != null) {
          this.selectedBuffs.add(selectedBuff);
        }
      }
    }
  }
  if (compound.getCompoundData().containsKey("Active")) {
    this.active = compound.getAs("Active", TagByte.class).getBooleanData();
  }
  if (compound.getCompoundData().containsKey("Reciever")) {
    this.receiver = BuffReceiver.valueOf(compound.getAs("Reciever", TagString.class).getStringData());
  }
}
origin: xXKeyleXx/MyPet

  public void convert(StoredMyPet pet) {
    Version fromVersion = Version.v1_7_R4;

    TagCompound info = pet.getInfo();
    if (info.containsKey("Version")) {
      if (info.containsKeyAs("Version", TagString.class)) {
        fromVersion = Version.valueOf(info.getAs("Version", TagString.class).getStringData());
      } else if (info.containsKeyAs("Version", TagInt.class)) {
        fromVersion = Version.values()[info.getAs("Version", TagInt.class).getIntData() + 1];
      } else {
        fromVersion = Version.values()[info.getAs("Version", TagShort.class).getShortData()];
      }
    }

    for (Version v : Version.values()) {
      if (v.ordinal() <= fromVersion.ordinal()) {
        continue;
      }
      if (v.ordinal() > toVersion.ordinal()) {
        break;
      }
      try {
        Method m = this.getClass().getDeclaredMethod(v.name(), StoredMyPet.class);
        m.invoke(this, pet);
      } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) {
      }
    }
  }
}
origin: xXKeyleXx/MyPet

  return new NBTTagShort(((TagShort) tag).getShortData());
case String:
  return new NBTTagString(((TagString) tag).getStringData());
case Byte:
  return new NBTTagByte(((TagByte) tag).getByteData());
de.keyle.knbtTagStringgetStringData

Popular methods of TagString

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Runner (org.openjdk.jmh.runner)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now