General Custom Data
ModGPL-3.0-or-later

General Custom Data

Interface injecting API providing data components like functionality for custom data tags.

419
Downloads
0
Followers
2 months ago
Updated
📦
2
Versions

📖About General Custom Data

General Custom Data

General Custom Data is a library providing data components like functionality for custom data tags.

Currently not fully featured.

Command

  • /custom effect list [<entity>] Print a list of custom effects on the entity.
  • /custom effect give <entity> <effect> [<duration|infinite>] [<amplifier>] Add custom effect to entity.
  • /custom effect clear [<entity>] [<effect>] Remove custom effect from entity.

Data Structure

Compound custom_data: Parent tag.
 |- String id: namespace:path.
 |- List modifiers
 |  \- Compound A modifier.
 |    |- String attribute: namespace:path.
 |    |- Double base: Any.
 |    |- String id: Any.
 |    |- String operation: add_value, add_multiplied_base, add_multiplied_total.
 |    \- String slot: mainhand, offhand, feet, legs, chest, head.
 |- String rarity: Any.
 \- List status_effects
  \- Compound A status effect.
    |- String id: namespace:path.
    \- List episodes: A playlist. Unordered.
     \- Compound An episode.
       |- Int amplifier: Any.
       \- Int duration: Any. In ticks.

Compound data: Parent tag.
 |- Byte explosion_radius: Any.
 |- Short fuse: Any.
 |- String id: namespace:path.
 |- String owner: UUID.
 \- List status_effects
  \- Compound A status effect.
    |- String id: namespace:path.
    \- List episodes: A playlist containing episodes which ticking simultaneously. Ordered by amplifier from highest.
     \- Compound An episode.
       |- Int amplifier: Any.
       \- Int duration: Any. In ticks.

Method

public final class ItemStack{
    public Identifier getCustomId() {}

    public void setCustomId(Identifier id) {}

    public Identifier getCustomIdOrId() {}

    public String getCustomRarity() {}

    public void setCustomRarity(String rarity) {}

    public String getCustomRarityOrRarity() {}

    public NbtList getCustomModifiers() {}

    public NbtList getCustomStatusEffects() {}
}
public abstract class Entity{
    public Identifier getCustomId() {}

    public void setCustomId(Identifier id) {}

    public Identifier getCustomIdOrId() {}

    public Entity getCustomOwner() {}

    public void setCustomOwner(Entity owner) {}

    public short getCustomFuse() {}

    public void setCustomFuse(short fuse) {}

    public byte getCustomExplosionRadius() {}

    public void setCustomExplosionRadius(byte radius) {}
}
public abstract class LivingEntity{
    public NbtCompound getCustomStatusEffects() {}

    public void setCustomStatusEffects(NbtCompound customStatusEffects) {}

    public CustomStatusEffectManager getCustomStatusEffectManager() {}

    public boolean hasCustomStatusEffect(CustomStatusEffectIdentifier id) {}

    public <T> T modifyCustomStatusEffectManager(Function<CustomStatusEffectManager, T> action) {}

    public void modifyCustomStatusEffectManager(Consumer<CustomStatusEffectManager> action) {}

    public boolean addCustomStatusEffect(CustomStatusEffect statusEffect) {}

    public boolean addCustomStatusEffect(CustomStatusEffectIdentifier id, int duration, int amplifier) {}

    public boolean setCustomStatusEffect(CustomStatusEffect statusEffect) {}

    public boolean setCustomStatusEffect(CustomStatusEffectIdentifier id, int duration, int amplifier) {}

    public CustomStatusEffectPlaylist removeCustomStatusEffect(CustomStatusEffectIdentifier id) {}

    public void clearCustomStatusEffect() {}

    public void tickCustomStatusEffect() {}

    public double getCustomModifiedValue(String attribute, double base) {}

    public NbtList getCustomModifiers(String attribute) {}

    public NbtList getCustomModifiers() {}
}