Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Aug 24, 2024
1 parent 26b054a commit 762d8a3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Put the changelog BELOW the dashes. ANYTHING ABOVE IS IGNORED
- Rain particles have recently been updated to only rotate in one specific direction in a recent update. Alongside new compatability fixes, Rain particle rendering has been reworked to match that of Wilder Wild's Wind particles, rendering at the angle the particle is moving.
- Updated Falling Leaves compatability.
- Added compat for Palm Fronds and Cypress Leaves through a mixin.
- Updated `rendertype_translucent.fsh` to match the current file.
- Altered the Nematocyst model to not cause as many issues with water.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(Allay.class)
Expand All @@ -42,16 +43,36 @@ public class AllayMixin implements WilderAllay {
return this.wilderWild$dancingAnimationState;
}

@Inject(method = "tick", at = @At(value = "TAIL"))
private void wilderWild$tickDancing(CallbackInfo info) {
Allay allay = Allay.class.cast(this);
if (allay.level().isClientSide) {
if (allay.isDancing()) {
this.wilderWild$getDancingAnimationState().startIfStopped((int) this.dancingAnimationTicks);
} else {
this.wilderWild$getDancingAnimationState().stop();
}
}
@Inject(
method = "tick",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/entity/animal/allay/Allay;isSpinning()Z",
shift = At.Shift.BEFORE
)
)
private void wilderWild$animateDance(CallbackInfo info) {
this.wilderWild$getDancingAnimationState().startIfStopped((int) this.dancingAnimationTicks);
this.wilderWild$getDancingAnimationState().stop();
}

@Inject(
method = "tick",
at = @At(
value = "CONSTANT",
args = "floatValue=0",
ordinal = 0
),
slice = @Slice(
from = @At(
value = "FIELD",
target = "Lnet/minecraft/world/entity/animal/allay/Allay;dancingAnimationTicks:F",
ordinal = 2
)
)
)
private void wilderWild$stopDance(CallbackInfo info) {
this.wilderWild$getDancingAnimationState().stop();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
"elements": [
{
"name": "large",
"from": [8, 0, 0],
"to": [8, 16, 12],
"from": [8, 2, 0],
"to": [8, 14, 12],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 0]},
"faces": {
"east": {"uv": [0, 4, 16, 16], "rotation": 270, "texture": "#large"},
"west": {"uv": [0, 4, 16, 16], "rotation": 90, "texture": "#large"}
"east": {"uv": [2, 4, 14, 16], "rotation": 270, "texture": "#large"},
"west": {"uv": [2, 4, 14, 16], "rotation": 90, "texture": "#large"}
}
},
{
"name": "small_2",
"from": [9, 0, 0],
"to": [9, 16, 12],
"from": [9, 2, 0],
"to": [9, 14, 10],
"rotation": {"angle": 22.5, "axis": "y", "origin": [9, 7, 0], "rescale": true},
"faces": {
"east": {"uv": [16, 4, 0, 16], "rotation": 270, "texture": "#small"},
"west": {"uv": [0, 4, 16, 16], "rotation": 90, "texture": "#small"}
"east": {"uv": [14, 6, 2, 16], "rotation": 270, "texture": "#small"},
"west": {"uv": [2, 6, 14, 16], "rotation": 90, "texture": "#small"}
}
},
{
"name": "small_1",
"from": [7, 0, 0],
"to": [7, 16, 12],
"from": [7, 2, 0],
"to": [7, 14, 10],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 9, 0], "rescale": true},
"faces": {
"east": {"uv": [16, 4, 0, 16], "rotation": 270, "texture": "#small"},
"west": {"uv": [0, 4, 16, 16], "rotation": 90, "texture": "#small"}
"east": {"uv": [14, 6, 2, 16], "rotation": 270, "texture": "#small"},
"west": {"uv": [2, 6, 14, 16], "rotation": 90, "texture": "#small"}
}
}
],
Expand Down

0 comments on commit 762d8a3

Please sign in to comment.