Skip to content

Pacifist (Roots 3)

Description

Pacifist is a list of entities which killing will give the player the advancement 'Untrue Pacifist'.

Identifier

Refer to this via any of the following:

groovy
mods.roots.pacifist/* Used as page default */
mods.roots.Pacifist

Adding Entries

Recipe Builder

Just like other recipe types, the Pacifist also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.roots.pacifist.recipeBuilder()
  • ResourceLocation. Sets the Resource Location of the recipe.

    groovy
    name(String)
    name(ResourceLocation)
  • Class<? extends Entity>. Sets the target entity. Requires not null.

    groovy
    entity(EntityEntry)
  • First validates the builder, returning null and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returns null or epicsquid.roots.recipe.PacifistEntry).

    groovy
    register()
Example
groovy
mods.roots.pacifist.recipeBuilder()
    .name('wither_skeleton_pacifist')
    .entity(entity('minecraft:wither_skeleton'))
    .register()

Removing Entries

  • Removes the Pacifist entry with the given Entity class:

    groovy
    mods.roots.pacifist.removeByClass(Class<? extends Entity>)
  • Removes the Pacifist entry for the given Entity:

    groovy
    mods.roots.pacifist.removeByEntity(EntityEntry)
  • Removes the Pacifist entry with the given name:

    groovy
    mods.roots.pacifist.removeByName(ResourceLocation)
  • Removes all registered recipes:

    groovy
    mods.roots.pacifist.removeAll()
Example
groovy
mods.roots.pacifist.removeByEntity(entity('minecraft:cow'))
mods.roots.pacifist.removeByName(resource('minecraft:chicken'))
mods.roots.pacifist.removeAll()

Getting the value of entries

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.roots.pacifist.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.