Breaking changes means version bump. Wildfire Item now only shows rainbow flames for Ace

This commit is contained in:
Vos
2026-03-10 18:36:40 -05:00
parent bb6f0c34cf
commit 87c7f52118
4 changed files with 79 additions and 39 deletions
+1 -1
View File
@@ -13,6 +13,6 @@ loom_version=1.15-SNAPSHOT
fabric_version=0.116.8+1.21.1
# Mod Properties
mod_version=1.2.0
mod_version=1.3.0
maven_group=com.acethewildfire.acesbs
archives_base_name=acesbs
@@ -14,6 +14,8 @@ import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import java.util.Objects;
public class WildfireArmorItem extends ArmorItem {
int tick = 0;
@@ -34,6 +36,8 @@ public class WildfireArmorItem extends ArmorItem {
ParticleS2CPacket packet;
if (Objects.equals(player.getName().getLiteralString(), "Acelib25")){
packet = switch (tick % 4){
case 0 -> new ParticleS2CPacket(
ParticleTypes.FLAME,
@@ -41,7 +45,7 @@ public class WildfireArmorItem extends ArmorItem {
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
1
);
case 1 -> new ParticleS2CPacket(
ParticleTypes.SOUL_FIRE_FLAME,
@@ -49,7 +53,7 @@ public class WildfireArmorItem extends ArmorItem {
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
1
);
case 2 -> new ParticleS2CPacket(
ModParticles.PURPLE_FLAME,
@@ -57,7 +61,7 @@ public class WildfireArmorItem extends ArmorItem {
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
1
);
case 3 -> new ParticleS2CPacket(
ModParticles.GREEN_FLAME,
@@ -65,10 +69,21 @@ public class WildfireArmorItem extends ArmorItem {
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
1
);
default -> throw new IllegalStateException("Unexpected value: " + tick % 4);
};
} else {
packet = new ParticleS2CPacket(
ParticleTypes.FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
1
);
}
tick++;
@@ -0,0 +1,24 @@
package com.acethewildfire.acesbs.mixin;
import com.acethewildfire.acesbs.item.ModItems;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ItemEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Entity.class)
public abstract class EntityMixin {
@Inject(method = "hasNoGravity", at = @At("HEAD"), cancellable = true)
private void reverseGravity(CallbackInfoReturnable<Boolean> cir) {
Entity entity = (Entity)(Object)this;
if (entity instanceof ItemEntity itemEntity) {
if (itemEntity.getStack().isOf(ModItems.MOTE_OF_ORDER)) {
cir.setReturnValue(true);
}
}
}
}
+1
View File
@@ -6,6 +6,7 @@
"CreeperInteractMixin",
"CreeperTickMixin",
"CreeperTransformStateMixin",
"EntityMixin",
"ExampleMixin"
],
"injectors": {