mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Fixed crash with axolotl disguises
This commit is contained in:
parent
b4b567c647
commit
d75d48d13d
1 changed files with 4 additions and 1 deletions
|
@ -6,9 +6,12 @@ import net.minecraft.entity.passive.AxolotlEntity;
|
|||
import net.minecraft.util.math.Vec3f;
|
||||
|
||||
public class AxolotlBehaviour extends EntityBehaviour<AxolotlEntity> {
|
||||
private static final float toRad = 0.017453292F;
|
||||
@Override
|
||||
public void update(Caster<?> source, AxolotlEntity entity, DisguiseSpell spell) {
|
||||
float toRad = 0.017453292F;
|
||||
if (entity.getModelAngles().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Vec3f current = entity.getModelAngles().get("body");
|
||||
entity.getModelAngles().put("body", new Vec3f(
|
||||
source.getEntity().isSubmergedInWater() ? source.getEntity().getPitch() * toRad : 0,
|
||||
|
|
Loading…
Reference in a new issue