mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Fix some axolotl angles
This commit is contained in:
parent
caf0175155
commit
e080084830
2 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
package com.minelittlepony.unicopia.entity.behaviour;
|
||||
|
||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.DisguiseSpell;
|
||||
import net.minecraft.entity.passive.AxolotlEntity;
|
||||
import net.minecraft.util.math.Vec3f;
|
||||
|
||||
public class AxolotlBehaviour extends EntityBehaviour<AxolotlEntity> {
|
||||
@Override
|
||||
public void update(Caster<?> source, AxolotlEntity entity, DisguiseSpell spell) {
|
||||
float toRad = 0.017453292F;
|
||||
Vec3f current = entity.getModelAngles().get("body");
|
||||
entity.getModelAngles().put("body", new Vec3f(
|
||||
source.getEntity().isSubmergedInWater() ? source.getEntity().getPitch() * toRad : 0,
|
||||
0,
|
||||
current == null ? 0 : current.getZ()
|
||||
));
|
||||
}
|
||||
}
|
|
@ -274,6 +274,7 @@ public class EntityBehaviour<T extends Entity> {
|
|||
register(SheepBehaviour::new, EntityType.SHEEP);
|
||||
register(BeeBehaviour::new, EntityType.BEE);
|
||||
register(GhastBehaviour::new, EntityType.GHAST);
|
||||
register(AxolotlBehaviour::new, EntityType.AXOLOTL);
|
||||
register(EndermanBehaviour::new, EntityType.ENDERMAN);
|
||||
EntityBehaviour.<LlamaEntity>register(() -> new RangedAttackBehaviour<>(SoundEvents.ENTITY_LLAMA_SPIT, LlamaSpitEntity::new), EntityType.LLAMA, EntityType.TRADER_LLAMA);
|
||||
EntityBehaviour.<SnowGolemEntity>register(() -> new RangedAttackBehaviour<>(SoundEvents.ENTITY_SNOW_GOLEM_SHOOT, SnowballEntity::new), EntityType.SNOW_GOLEM);
|
||||
|
|
Loading…
Reference in a new issue