Skip to content

Commit

Permalink
Fix different firefly colors from merging
Browse files Browse the repository at this point in the history
  • Loading branch information
azurelmao committed Feb 25, 2024
1 parent c2507ff commit a475897
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bta_version=7.1-pre1a
loader_version=0.14.19-babric.3-bta

# Mod
mod_version=3.4.11
mod_version=3.4.12
mod_group=turniplabs
mod_name=halplibe

Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,26 @@ public void spawnInit() {
ordinal = 0
)
)
private EnumFireflyColor halplibe$modifyColorExpression(EntityFireflyCluster instance, Operation<EnumFireflyColor> original) {
private EnumFireflyColor halplibe$modifyColorExpression1(EntityFireflyCluster instance, Operation<EnumFireflyColor> original) {
if (((IFireflyColor) instance).halplibe$getColor().getId() == halplibe$getColor().getId()) {
return null;
} else {
return EnumFireflyColor.GREEN;
}
}

@WrapOperation(
method = "merge()V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/core/entity/animal/EntityFireflyCluster;getColor()Lnet/minecraft/core/enums/EnumFireflyColor;",
ordinal = 1
)
)
private EnumFireflyColor halplibe$modifyColorExpression2(EntityFireflyCluster instance, Operation<EnumFireflyColor> original) {
return null;
}

@Unique
public void halplibe$setColor(FireflyColor color) {
this.entityData.set(16, (byte) color.getId());
Expand Down

0 comments on commit a475897

Please sign in to comment.