KATA 4 OF 8 · XML LAYER
This is the most valuable trick in the XML layer: adding a custom enemy that reuses a vanilla model, so it works server-side with no client download and EAC stays on. It is exactly how the popular server-side zombie packs work, and it is why they re-port to new game versions faster than anything else.
A tougher zombie, zombieReinforcedBrute, that extends a vanilla zombie (inheriting its model and animations) but with more health and a custom name - then make it spawn in the wild. Two files: entityclasses.xml defines what it is; entitygroups.xml decides where it appears.
An entity is server-side as long as it does not introduce new assets (models, textures, sounds). Because this zombie extends a vanilla class, it borrows that class's existing model - so the client already has everything it needs to render it. The server just tells clients "spawn entity zombieReinforcedBrute," and they draw it with vanilla art. Result: players join without installing your mod, and EAC stays on. The moment you give it a custom model, that becomes a client asset (Kata 5) and the mod stops being server-only.
In Config/entityclasses.xml, append a new class that extends a vanilla template and overrides a couple of properties:
<configs>
<append xpath="/entity_classes">
<entity_class name="zombieReinforcedBrute" extends="zombieBoe">
<property name="HealthMax" value="600" />
<property name="ExperienceGain" value="900" />
</entity_class>
</append>
</configs>
extends copies every property of the named vanilla class (here zombieBoe, a standard zombie) as the starting point - including its model. You only declare what you want to change.extends target exists by opening the game's Data/Config/entityclasses.xml. Common bases include the per-zombie classes and the zombieTemplateMale template.A defined class never appears on its own; the spawning system pulls from entity groups. Add your zombie to an existing group in Config/entitygroups.xml:
<configs>
<append xpath="/entitygroups/entitygroup[@name='ZombiesAll']">
<entity name="zombieReinforcedBrute" prob="0.05" />
</append>
</configs>
prob is a relative weight within the group, not a percentage. 0.05 against entries weighted ~1.0 makes it a rare spawn - start low, you can always raise it.entitygroups.xml to pick the right group: biome groups, horde groups, and broad sets like ZombiesAll all exist, and which one you target decides where your zombie shows up.V3.0 note: V3.0 "Dead Hot Summer" moves entitygroups.xml back to proper XML elements (the <entity name prob> form above). The old text-based group format still loads "currently," but it is deprecated - author the element form. See V3.0 mod compatibility.
Loaded Mod and no red entity errors.spawnentity with your player id and the entity - or use the creative menu. If it appears with vanilla art and your new health, the class works.prob is low, raise it temporarily to 1.0 while testing, then set it back.extends. If the parent class name is wrong, the entity has no model and errors on spawn. Copy the exact name from vanilla.entitygroup[@name='Typo'] silently adds nothing. Confirm the group name in vanilla entitygroups.xml.prob is a weight - a high value relative to the group makes your zombie the majority of spawns. Tune low.Next: Kata 5 - Custom Assets: Icons, Models & Bundles. So far everything reused vanilla art. Next you bring your own - and cross the line where players must download the mod.