Skip to content

Configuration

Ivan Geevo edited this page Sep 11, 2026 · 3 revisions

Custom Creeper Integration

Any creeper-like EntityType can be made shearable by adding it to the neuterable_creepers entity type tag.

Create the following JSON file:

data/creeper_shearing/tags/entity_type/neuterable_creepers.json

{
  "replace": false,
  "values": [
    "minecraft:creeper",
    "mymod:my_custom_creeper"
  ]
}

Any entity type listed in this tag becomes shearable.

If your custom creeper entity is not included in this tag, it cannot be sheared, even if you have registered a neutered texture or drop for it.

Neutered Textures

When a creeper is neutered, its renderer looks up a replacement texture for that entity type through NeuteredCreeperTextures.

Textures can be registered either through the API or through a datapack.

API Registration

Use NeuteredCreeperTextures.register(...) to associate a texture resource with an entity type:

NeuteredCreeperTextures.register(
        BuiltInRegistries.ENTITY_TYPE.getKey(MyEntities.MY_CUSTOM_CREEPER.get()),
        ResourceLocation.fromNamespaceAndPath(
                "mymod",
                "textures/entity/my_neutered_creeper.png"
        )
);

API-registered textures always take priority over textures registered through datapacks.

Datapack Registration

Texture overrides can also be supplied through a datapack:

{
  "entity": "mymod:my_custom_creeper",
  "texture": "mymod:textures/entity/my_neutered_creeper.png"
}

If no neutered texture is registered for an entity type, its normal entity texture remains unchanged when it is neutered.

Neutered Drops

By default, custom creepers that are sheared and subsequently die do not drop anything.

To give a creeper variant a custom drop, register it with NeuteredDropsRegistry:

NeuteredDropsRegistry.registerDrop(
        EntityType.CREEPER,
        new ItemStack(Items.GUNPOWDER, 2)
);

Removing a Drop

A previously registered drop can be removed using unregisterDrop(...).

This can be useful if your mod needs to override another mod's registration during setup:

NeuteredDropsRegistry.unregisterDrop(EntityType.CREEPER);

Full Example

The following example shows how to add full Creeper Shearing support for a custom creeper entity called mymod:my_custom_creeper.

1. Make the Entity Neuterable

Add the entity to the neuterable_creepers entity type tag:

data/creeper_shearing/tags/entity_type/neuterable_creepers.json

{
  "values": [
    "mymod:my_custom_creeper"
  ]
}

2. Register a Neutered Texture

Register the texture for the custom creeper:

NeuteredCreeperTextures.register(
        ResourceLocation.fromNamespaceAndPath(
                "mymod",
                "my_custom_creeper"
        ),
        ResourceLocation.fromNamespaceAndPath(
                "mymod",
                "textures/entity/my_neutered_creeper.png"
        )
);

3. Register a Neutered Drop

Register the item that should be dropped by the neutered creeper:

NeuteredDropsRegistry.registerDrop(
        MyEntities.MY_CUSTOM_CREEPER.get(),
        new ItemStack(MyItems.INERT_CHARGE.get())
);