What are you searching for?

puzzle-piece

Mannequin Swing

This mod adds support for swing animations on mannequins.

download 7 Downloads · favorite 0 Followers · Updated 2 days ago
Fabric Forge Mobs Neoforge 1.21.11

Versions

inventory_2
Mannequin Swing 1.0.0

1.0.0 · 2 days ago · 11.41 KB

Release download
Forge 1.21.11
inventory_2
Mannequin Swing 1.0.0

1.0.0 · 2 days ago · 11.61 KB

Release download
Neoforge 1.21.11
inventory_2
Mannequin Swing 1.0.0

1.0.0 · 2 days ago · 11.54 KB

Release download
Fabric 1.21.11

About

Mannequin Swing

This mod adds support for swing animations on mannequins. It does not add any new way to cause a swing animation, such as the /swing command from the 26.1 snapshots.

Technical details

LivingEntity has a method updateSwingTime that needs to be called both on the client and on the server to allow an entity to swing its arms. However, it is only used by Players and monsters. This mod adds a call in Mannequins' aiStep function, through the technique of submixins.

@Mixin(LivingEntity.class)
public class LivingEntityMixin {
	@Shadow
	protected void updateSwingTime() {};

	@WrapMethod(method = "aiStep")
	public void overrideAiStep(Operation<Void> original) {
		original.call();
	}
}

@Mixin(Mannequin.class)
public class MannequinSubMixin extends LivingEntityMixin {
	@Override
	public void overrideAiStep(Operation<Void> original) {
		super.overrideAiStep(original);
		updateSwingTime();
	}
}
open_in_new View on Modrinth
Categories
Compatibility
Client: Required Server: Required
gavel MIT

Conversation

What are your thoughts?

Related projects

Decoration Mobs Utility
[EMF] Entity Model Features
[EMF] Entity Model Features

by Traben

EMF is an, OptiFine format, Custom Entity Model replacement mod available for Fabric and Forge.

download 56.6M
favorite 8,233
Adventure Game mechanics Mobs
Cobblemon
Cobblemon

by CobbledStudios

A Pokémon mod for Fabric and NeoForge

download 20.8M
favorite 6,988
Adventure Equipment Game mechanics
Dungeons and Taverns
Dungeons and Taverns

by NovaWostra

A Structure Datapack adding dungeons, taverns and other structures to find while you explore the world.

download 13.5M
favorite 7,057
Decoration Equipment Food
BetterEnd
BetterEnd

by quiqueck

New Biomes, mysterious rituals and Mobs for your End

download 9.7M
favorite 3,122
lock Cookie consent

SkinMC uses cookies to provide functionality and features.