Skip to content

Commit 4a97588

Browse files
committed
Update to Enderscape 2.1.0
1 parent b829cbd commit 4a97588

22 files changed

+644
-304
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies {
7171
// Fabric API. This is technically optional, but you probably want it anyway.
7272
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
7373

74-
modImplementation("maven.modrinth:enderscape:xpAgFybl") {
74+
modImplementation("maven.modrinth:enderscape:3cYKvu3m") {
7575
exclude(group: "net.fabricmc")
7676
}
7777

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ loom_version=1.13-SNAPSHOT
1313
fabric_version=0.140.2+1.21.11
1414

1515
# Mod Properties
16-
mod_version=2.0.0.0+1.21.11
16+
mod_version=2.1.0.0+1.21.11
1717
maven_group=eu.pb4
1818
archives_base_name=enderscape-polymer-patch

src/main/java/eu/pb4/enderscapepatch/impl/block/CampfireFactoryBlock.java

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils;
99
import eu.pb4.polymer.blocks.api.PolymerTexturedBlock;
1010
import eu.pb4.polymer.virtualentity.api.ElementHolder;
11+
import net.minecraft.core.particles.ParticleOptions;
12+
import net.minecraft.core.particles.ParticleTypes;
13+
import net.minecraft.core.particles.SimpleParticleType;
14+
import net.minecraft.sounds.SoundEvent;
15+
import net.minecraft.sounds.SoundEvents;
16+
import net.minecraft.sounds.SoundSource;
17+
import net.minecraft.util.RandomSource;
1118
import org.jetbrains.annotations.Nullable;
1219
import xyz.nucleoid.packettweaker.PacketContext;
1320

@@ -22,7 +29,7 @@
2229
import net.minecraft.world.phys.BlockHitResult;
2330

2431
public record CampfireFactoryBlock(boolean tick, BiFunction<BlockState, BlockPos, BlockModel> modelFunction) implements FactoryBlock, PolymerTexturedBlock, BSMMParticleBlock {
25-
public static final CampfireFactoryBlock INSTANCE = new CampfireFactoryBlock(false, BlockStateModel::longRange);
32+
public static final CampfireFactoryBlock INSTANCE = new CampfireFactoryBlock(true, Model::new);
2633

2734
private static final BlockState REGULAR = PolymerBlockResourceUtils.requestEmpty(BlockModelType.CAMPFIRE);
2835
private static final BlockState REGULAR_WATERLOGGED = PolymerBlockResourceUtils.requestEmpty(BlockModelType.CAMPFIRE_WATERLOGGED);
@@ -54,4 +61,52 @@ public CampfireFactoryBlock withTick(boolean tick) {
5461
public boolean isIgnoringBlockInteractionPlaySoundExceptedEntity(BlockState state, ServerPlayer player, InteractionHand hand, ItemStack stack, ServerLevel world, BlockHitResult blockHitResult) {
5562
return true;
5663
}
64+
65+
public static class Model extends BlockStateModel {
66+
private final RandomSource randomSource = RandomSource.create();
67+
public Model(BlockState state, BlockPos pos) {
68+
super(state, pos, 100.0F);
69+
}
70+
71+
@Override
72+
protected void onTick() {
73+
var state = this.blockState();
74+
var blockPos = this.blockPos();
75+
76+
if (state.getValue(CampfireBlock.LIT)) {
77+
if (randomSource.nextFloat() < 0.11F) {
78+
var smoke = state.getValue(CampfireBlock.SIGNAL_FIRE) ? ParticleTypes.CAMPFIRE_SIGNAL_SMOKE : ParticleTypes.CAMPFIRE_COSY_SMOKE;
79+
80+
for(int i = 0; i < randomSource.nextInt(2) + 2; ++i) {
81+
addParticle(smoke, true, (double)blockPos.getX() + (double)0.5F + randomSource.nextDouble() / (double)3.0F * (double)(randomSource.nextBoolean() ? 1 : -1), (double)blockPos.getY() + randomSource.nextDouble() + randomSource.nextDouble(), (double)blockPos.getZ() + (double)0.5F + randomSource.nextDouble() / (double)3.0F * (double)(randomSource.nextBoolean() ? 1 : -1), (double)0.0F, 0.07, (double)0.0F);
82+
}
83+
}
84+
if (randomSource.nextInt(64) == 0) {
85+
if (randomSource.nextInt(10) == 0) {
86+
playLocalSound((double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY() + (double) 0.5F, (double) blockPos.getZ() + (double) 0.5F, SoundEvents.CAMPFIRE_CRACKLE, SoundSource.BLOCKS, 0.5F + randomSource.nextFloat(), randomSource.nextFloat() * 0.7F + 0.6F, false);
87+
}
88+
89+
if (randomSource.nextInt(5) == 0) {
90+
for (int i = 0; i < randomSource.nextInt(1) + 1; ++i) {
91+
addParticle(ParticleTypes.LAVA, false, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY() + (double) 0.5F, (double) blockPos.getZ() + (double) 0.5F, (double) (randomSource.nextFloat() / 2.0F), 5.0E-5, (double) (randomSource.nextFloat() / 2.0F));
92+
}
93+
}
94+
}
95+
}
96+
97+
super.onTick();
98+
}
99+
100+
private void addParticle(ParticleOptions type, boolean alwaysVisible, double x, double y, double z, double dx, double dy, double dz) {
101+
if (this.getAttachment() != null) {
102+
this.getAttachment().getWorld().sendParticles(type, false, alwaysVisible, x, y, z, 0, dx, dy, dz, 1);
103+
}
104+
}
105+
106+
private void playLocalSound(double x, double y, double z, SoundEvent soundEvent, SoundSource soundSource, float volume, float pitch, boolean force) {
107+
if (this.getAttachment() != null) {
108+
this.getAttachment().getWorld().playSound(null, x, y, z, soundEvent, soundSource, volume, pitch);
109+
}
110+
}
111+
}
57112
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package eu.pb4.enderscapepatch.impl.block;
2+
3+
import eu.pb4.enderscapepatch.mixin.TorchBlockAccessor;
4+
import eu.pb4.factorytools.api.block.model.generic.BlockStateModel;
5+
import net.minecraft.core.BlockPos;
6+
import net.minecraft.core.Direction;
7+
import net.minecraft.core.particles.DustParticleOptions;
8+
import net.minecraft.core.particles.ParticleOptions;
9+
import net.minecraft.core.particles.ParticleTypes;
10+
import net.minecraft.core.particles.SimpleParticleType;
11+
import net.minecraft.util.RandomSource;
12+
import net.minecraft.world.level.block.WallTorchBlock;
13+
import net.minecraft.world.level.block.state.BlockState;
14+
15+
public class TorchModel extends BlockStateModel {
16+
final RandomSource randomSource = RandomSource.create();
17+
final ParticleOptions particle;
18+
19+
public TorchModel(BlockState state, BlockPos pos) {
20+
super(state, pos, 100.0F);
21+
this.particle = new DustParticleOptions(0xf94aff, 2f);//((TorchBlockAccessor) state.getBlock()).getFlameParticle();
22+
}
23+
24+
@Override
25+
protected void onTick() {
26+
var blockPos = this.blockPos();
27+
28+
if (this.randomSource.nextInt(16) == 0) {
29+
double x = (double) blockPos.getX() + (double) 0.5F;
30+
double y = (double) blockPos.getY() + 0.7;
31+
double z = (double) blockPos.getZ() + (double) 0.5F;
32+
addParticle(ParticleTypes.SMOKE, false, x, y, z, 0.0F, 0.0F, 0.0F);
33+
addParticle(this.particle, false, x, y, z, 0.0F, 0.0F, 0.0F);
34+
}
35+
}
36+
37+
protected void addParticle(ParticleOptions type, boolean alwaysVisible, double x, double y, double z, double dx, double dy, double dz) {
38+
if (this.getAttachment() != null) {
39+
this.getAttachment().getWorld().sendParticles(type, false, alwaysVisible, x, y, z, 0, dx, dy, dz, 1);
40+
}
41+
}
42+
43+
public static class Wall extends TorchModel {
44+
public Wall(BlockState state, BlockPos pos) {
45+
super(state, pos);
46+
}
47+
48+
@Override
49+
protected void onTick() {
50+
var blockPos = this.blockPos();
51+
var blockState = this.blockState();
52+
53+
if (this.randomSource.nextInt(16) == 0) {
54+
Direction direction = blockState.getValue(WallTorchBlock.FACING);
55+
double x = (double) blockPos.getX() + 0.5F;
56+
double y = (double) blockPos.getY() + 0.7;
57+
double z = (double) blockPos.getZ() + 0.5F;
58+
Direction direction2 = direction.getOpposite();
59+
addParticle(ParticleTypes.SMOKE, false, x + 0.27 * (double) direction2.getStepX(), y + 0.22, z + 0.27 * (double) direction2.getStepZ(), 0.0F, 0.0F, 0.0F);
60+
addParticle(this.particle, false, x + 0.27 * (double) direction2.getStepX(), y + 0.22, z + 0.27 * (double) direction2.getStepZ(), 0.0F, 0.0F, 0.0F);
61+
}
62+
}
63+
}
64+
}

src/main/java/eu/pb4/enderscapepatch/impl/entity/BasePolymerEntity.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import eu.pb4.enderscapepatch.impl.PacketHandler;
44
import eu.pb4.enderscapepatch.impl.entity.model.EntityModels;
5-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.PolyModelInstance;
6-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.model.EntityModel;
7-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.poly.ScalingEntityModel;
8-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.poly.SimpleEntityModel;
5+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.PolyModelInstance;
6+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.model.EntityModel;
7+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.poly.ScalingEntityModel;
8+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.poly.SimpleEntityModel;
99
import eu.pb4.polymer.core.api.entity.PolymerEntity;
1010
import eu.pb4.polymer.virtualentity.api.VirtualEntityUtils;
1111
import eu.pb4.polymer.virtualentity.api.attachment.IdentifiedUniqueEntityAttachment;
@@ -35,9 +35,7 @@ public record BasePolymerEntity(LivingEntity entity) implements PolymerEntity {
3535
var model = (PolyModelInstance<EntityModel<LivingEntity>>) EntityModels.BY_TYPE.get(entity.getType());
3636
if (model != null) {
3737
//noinspection unchecked
38-
IdentifiedUniqueEntityAttachment.ofTicking(MODEL, entity instanceof Rustle
39-
? new ScalingEntityModel<>(entity, model)
40-
: new SimpleEntityModel<>(entity, model), entity);
38+
IdentifiedUniqueEntityAttachment.ofTicking(MODEL, new SimpleEntityModel<>(entity, model), entity);
4139
}
4240
}
4341

Lines changed: 88 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package eu.pb4.enderscapepatch.impl.entity.model;
22

3-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.EntityValueExtraction;
4-
import eu.pb4.factorytools.api.virtualentity.emuvanilla.model.*;
3+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.EntityValueExtraction;
4+
import eu.pb4.factorytools.api.virtualentity.emuvanilla2.model.*;
55
import net.bunten.enderscape.entity.drifter.Drifter;
66
import net.minecraft.util.Mth;
77

@@ -19,63 +19,97 @@ public class DrifterModel extends EntityModel<Drifter> {
1919

2020
public DrifterModel(ModelPart root) {
2121
super(root);
22-
this.head = root.getChild("head");
23-
this.leftLeg = this.head.getChild("leftLeg");
24-
this.rightLeg = this.head.getChild("rightLeg");
25-
this.stem = this.head.getChild("stem");
26-
this.bell = this.stem.getChild("bell");
27-
this.strandsN = this.bell.getChild("strandsN");
28-
this.strandsW = this.bell.getChild("strandsW");
29-
this.strandsS = this.bell.getChild("strandsS");
30-
this.strandsE = this.bell.getChild("strandsE");
22+
head = root.getChild("head");
23+
leftLeg = head.getChild("leftLeg");
24+
rightLeg = head.getChild("rightLeg");
25+
stem = head.getChild("stem");
26+
bell = stem.getChild("bell");
27+
strandsN = bell.getChild("strandsN");
28+
strandsW = bell.getChild("strandsW");
29+
strandsS = bell.getChild("strandsS");
30+
strandsE = bell.getChild("strandsE");
3131
}
3232

33-
public static TexturedModelData createLayer() {
34-
Dilation dilation = Dilation.NONE;
35-
ModelData data = new ModelData();
36-
ModelPartData rootData = data.getRoot();
37-
ModelPartData headData = rootData.addChild("head", ModelPartBuilder.create().uv(0, 0).cuboid(-4.0F, -8.0F, -4.0F, 8.0F, 16.0F, 8.0F, dilation), ModelTransform.origin(0.0F, 10.0F, 0.0F));
38-
headData.addChild("leftLeg", ModelPartBuilder.create().uv(96, 0).cuboid(-2.0F, 0.0F, -2.0F, 4.0F, 6.0F, 4.0F, dilation), ModelTransform.origin(2.0F, 8.0F, 0.0F));
39-
headData.addChild("rightLeg", ModelPartBuilder.create().uv(96, 10).cuboid(-2.0F, 0.0F, -2.0F, 4.0F, 6.0F, 4.0F, dilation), ModelTransform.origin(-2.0F, 8.0F, 0.0F));
40-
ModelPartData stemData = headData.addChild("stem", ModelPartBuilder.create().uv(96, 20).cuboid(-4.0F, -10.0F, 0.0F, 8.0F, 10.0F, 0.0F, dilation), ModelTransform.origin(0.0F, -8.0F, 0.0F));
41-
stemData.addChild("stem2", ModelPartBuilder.create().uv(96, 20).cuboid(-4.0F, -10.0F, 0.0F, 8.0F, 10.0F, 0.0F, dilation), ModelTransform.of(0.0F, 0.0F, 0.0F, 0.0F, -1.5708F, 0.0F));
42-
ModelPartData bellData = stemData.addChild("bell", ModelPartBuilder.create().uv(0, 0).cuboid(-16.0F, -16.0F, -16.0F, 32.0F, 16.0F, 32.0F, dilation), ModelTransform.origin(0.0F, -10.0F, 0.0F));
43-
ModelPartBuilder strandBuilder = ModelPartBuilder.create().uv(0, 48).cuboid(-16.0F, 0.0F, 0.0F, 32.0F, 32.0F, 0.0F, dilation);
44-
bellData.addChild("strandsN", strandBuilder, ModelTransform.of(0.0F, 0.0F, -15.0F, 0.0F, 0.0F, 0.0F));
45-
bellData.addChild("strandsW", strandBuilder, ModelTransform.of(15.0F, 0.0F, 0.0F, 0.0F, -1.5708F, 0.0F));
46-
bellData.addChild("strandsS", strandBuilder, ModelTransform.of(0.0F, 0.0F, 15.0F, 0.0F, 3.1416F, 0.0F));
47-
bellData.addChild("strandsE", strandBuilder, ModelTransform.of(-15.0F, 0.0F, 0.0F, 0.0F, 1.5708F, 0.0F));
48-
return TexturedModelData.of(data, 128, 80);
33+
public static LayerDefinition createDrifterLayer() {
34+
CubeDeformation dilation = CubeDeformation.NONE;
35+
36+
MeshDefinition data = new MeshDefinition();
37+
PartDefinition rootData = data.getRoot();
38+
39+
PartDefinition headData = rootData.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 0).addBox(-4, -8, -4, 8, 16, 8, dilation), PartPose.offset(0, 10, 0));
40+
41+
headData.addOrReplaceChild("leftLeg", CubeListBuilder.create().texOffs(96, 0).addBox(-2, 0, -2, 4, 6, 4, dilation), PartPose.offset(2, 8, 0));
42+
headData.addOrReplaceChild("rightLeg", CubeListBuilder.create().texOffs(96, 10).addBox(-2, 0, -2, 4, 6, 4, dilation), PartPose.offset(-2, 8, 0));
43+
44+
PartDefinition stemData = headData.addOrReplaceChild("stem", CubeListBuilder.create().texOffs(96, 20).addBox(-4, -10, 0, 8, 10, 0, dilation), PartPose.offset(0, -8, 0));
45+
stemData.addOrReplaceChild("stem2", CubeListBuilder.create().texOffs(96, 20).addBox(-4, -10, 0, 8, 10, 0, dilation), PartPose.offsetAndRotation(0, 0, 0, 0, -1.5708F, 0));
46+
47+
PartDefinition bellData = stemData.addOrReplaceChild("bell", CubeListBuilder.create().texOffs(0, 0).addBox(-16, -16, -16, 32, 16, 32, dilation), PartPose.offset(0, -10, 0));
48+
CubeListBuilder strandBuilder = CubeListBuilder.create().texOffs(0, 48).addBox(-16, 0, 0, 32, 32, 0, dilation);
49+
50+
bellData.addOrReplaceChild("strandsN", strandBuilder, PartPose.offsetAndRotation(0, 0, -15, 0, 0, 0));
51+
bellData.addOrReplaceChild("strandsW", strandBuilder, PartPose.offsetAndRotation(15, 0, 0, 0, -1.5708F, 0));
52+
bellData.addOrReplaceChild("strandsS", strandBuilder, PartPose.offsetAndRotation(0, 0, 15, 0, 3.1416F, 0));
53+
bellData.addOrReplaceChild("strandsE", strandBuilder, PartPose.offsetAndRotation(-15, 0, 0, 0, 1.5708F, 0));
54+
55+
return LayerDefinition.create(data, 128, 80);
4956
}
5057

51-
@Override
52-
public void setAngles(Drifter state) {
53-
super.setAngles(state);
58+
public static LayerDefinition createDriftletLayer() {
59+
CubeDeformation dilation = CubeDeformation.NONE;
60+
61+
MeshDefinition data = new MeshDefinition();
62+
PartDefinition rootData = data.getRoot();
63+
64+
PartDefinition headData = rootData.addOrReplaceChild("head", CubeListBuilder.create().texOffs(32, 24).addBox(-4, -7, -4, 8, 7, 8, dilation), PartPose.offset(0, 20, 0));
65+
66+
headData.addOrReplaceChild("leftLeg", CubeListBuilder.create().texOffs(48, 7).addBox(-1.5F, 0, -1.5F, 3, 4, 3, dilation), PartPose.offset(1.5F, 0, -0.5F));
67+
headData.addOrReplaceChild("rightLeg", CubeListBuilder.create().texOffs(48, 0).addBox(-1.5F, 0, -1.5F, 3, 4, 3, dilation), PartPose.offset(-1.5F, 0, -0.5F));
68+
69+
PartDefinition stemData = headData.addOrReplaceChild("stem", CubeListBuilder.create().texOffs(0, 0).addBox(-2, -6, -2, 4, 6, 4, dilation), PartPose.offset(0, -7, 0));
70+
PartDefinition bellData = stemData.addOrReplaceChild("bell", CubeListBuilder.create().texOffs(0, 0).addBox(-8, -8, -8, 16, 8, 16, dilation), PartPose.offset(0, -2, 0));
71+
CubeListBuilder strandBuilder = CubeListBuilder.create().texOffs(0, 24).addBox(-8, 0, 0, 16, 12, 0, dilation);
72+
73+
bellData.addOrReplaceChild("strandsN", strandBuilder, PartPose.offsetAndRotation(0, 0, -7, 0, 0, 0));
74+
bellData.addOrReplaceChild("strandsW", strandBuilder, PartPose.offsetAndRotation(7, 0, 0, 0, -1.5708F, 0));
75+
bellData.addOrReplaceChild("strandsS", strandBuilder, PartPose.offsetAndRotation(0, 0, 7, 0, 3.1416F, 0));
76+
bellData.addOrReplaceChild("strandsE", strandBuilder, PartPose.offsetAndRotation(-7, 0, 0, 0, 1.5708F, 0));
5477

78+
return LayerDefinition.create(data, 64, 48);
79+
}
80+
81+
@Override
82+
public void setupAnim(Drifter state) {
5583
float age = state.tickCount;
56-
float animPos = state.walkAnimation.position(1);
57-
float animSpeed = state.walkAnimation.speed(1);
58-
this.head.yaw = EntityValueExtraction.getRelativeHeadYaw(state) * 0.017453292F;
59-
this.head.pitch = state.getXRot() * 0.017453292F + Mth.sin(age * 0.2F) * 0.1F;
60-
this.head.roll = 0.1F * Mth.sin(animPos * 0.8F) * 2.0F * animSpeed * 0.25F;
61-
ModelPart var10000 = this.head;
62-
var10000.pitch += 0.1F * Mth.sin(animPos * 0.8F) * 4.0F * animSpeed * 0.25F;
63-
this.stem.pitch = -this.head.pitch;
64-
this.bell.pitch = Mth.sin(age * 0.2F + 1.5707964F) * 0.1F;
65-
this.bell.roll = 0.1F * -(Mth.sin(animPos * 0.8F) * 3.0F * animSpeed * 0.5F);
66-
this.strandsN.pitch = -(this.head.pitch * 0.1F) + Mth.sin(age * 0.1F + 1.5707964F) * 0.3F;
67-
var10000 = this.strandsN;
68-
var10000.pitch += 0.2F * Mth.sin(animPos * 0.8F) * animSpeed * 0.5F;
69-
this.strandsW.pitch = this.strandsN.pitch;
70-
this.strandsS.pitch = this.strandsN.pitch;
71-
this.strandsE.pitch = this.strandsN.pitch;
72-
this.leftLeg.pitch = this.head.pitch / 2.0F + Mth.cos(animPos * 0.6662F + 1.5707964F) * 0.6F * animSpeed;
73-
this.rightLeg.pitch = this.head.pitch / 2.0F + Mth.cos(animPos * 0.6662F) * 0.6F * animSpeed;
74-
var10000 = this.leftLeg;
75-
var10000.pitch += Mth.sin(age * 0.2F) * 0.4F;
76-
var10000 = this.rightLeg;
77-
var10000.pitch += Mth.sin(age * 0.2F + 1.5707964F) * 0.4F;
78-
this.leftLeg.roll = -this.head.roll + 0.1F * Mth.sin(animPos * 0.4F + 1.5707964F) * 4.0F * animSpeed * 0.5F;
79-
this.rightLeg.roll = -this.head.roll + 0.1F * Mth.sin(animPos * 0.4F) * 4.0F * animSpeed * 0.5F;
84+
float animPos = state.walkAnimation.position();
85+
float animSpeed = state.walkAnimation.speed();
86+
87+
if (state.isBaby()) animPos *= 0.5F;
88+
89+
head.yRot = (EntityValueExtraction.getRelativeHeadYaw(state) * 0.017453292F);
90+
head.xRot = (state.getXRot() * 0.017453292F) + (Mth.sin(age * 0.2F) * 0.1F);
91+
head.zRot = 0.1F * Mth.sin(animPos * 0.8F) * 2 * (animSpeed * 0.25F);
92+
head.xRot += 0.1F * Mth.sin(animPos * 0.8F) * 4 * (animSpeed * 0.25F);
93+
94+
stem.xRot = -head.xRot;
95+
bell.xRot = (Mth.sin(age * 0.2F + Mth.HALF_PI) * 0.1F);
96+
bell.zRot = 0.1F * -(Mth.sin(animPos * 0.8F) * 3 * (animSpeed * 0.5F));
97+
98+
strandsN.xRot = -(head.xRot * 0.1F) + (Mth.sin(age * 0.1F + Mth.HALF_PI) * 0.3F);
99+
100+
strandsN.xRot += 0.2F * Mth.sin(animPos * 0.8F) * (animSpeed * 0.5F);
101+
102+
strandsW.xRot = strandsN.xRot;
103+
strandsS.xRot = strandsN.xRot;
104+
strandsE.xRot = strandsN.xRot;
105+
106+
leftLeg.xRot = (head.xRot / 2) + Mth.cos(animPos * 0.6662F + (Mth.PI / 2)) * 0.6F * animSpeed;
107+
rightLeg.xRot = (head.xRot / 2) + Mth.cos(animPos * 0.6662F) * 0.6F * animSpeed;
108+
109+
leftLeg.xRot += Mth.sin(age * 0.2F) * 0.4F;
110+
rightLeg.xRot += Mth.sin(age * 0.2F + Mth.HALF_PI) * 0.4F;
111+
112+
leftLeg.zRot = -head.zRot + 0.1F * Mth.sin(animPos * 0.4F + (Mth.PI / 2)) * 4 * (animSpeed * 0.5F);
113+
rightLeg.zRot = -head.zRot + 0.1F * Mth.sin(animPos * 0.4F) * 4 * (animSpeed * 0.5F);
80114
}
81115
}

0 commit comments

Comments
 (0)