Skip to content

Commit

Permalink
deprecate entity.custom_id
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 20, 2020
1 parent 37cee25 commit aca3a48
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -1416,15 +1416,8 @@ public static void registerTags() {
// IDENTIFICATION ATTRIBUTES
/////////////////

// <--[tag]
// @attribute <EntityTag.custom_id>
// @returns ScriptTag/Element
// @group data
// @description
// If the entity has a script ID, returns the ScriptTag of that ID.
// Otherwise, returns the name of the entity type.
// -->
registerSpawnedOnlyTag("custom_id", (attribute, object) -> {
Deprecations.entityCustomIdTag.warn(attribute.context);
if (CustomNBT.hasCustomNBT(object.getLivingEntity(), "denizen-script-id")) {
return new ScriptTag(CustomNBT.getCustomNBT(object.getLivingEntity(), "denizen-script-id"));
}
Expand Down

0 comments on commit aca3a48

Please sign in to comment.