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 fabric_version=0.116.8+1.21.1
# Mod Properties # Mod Properties
mod_version=1.2.0 mod_version=1.3.0
maven_group=com.acethewildfire.acesbs maven_group=com.acethewildfire.acesbs
archives_base_name=acesbs archives_base_name=acesbs
@@ -14,6 +14,8 @@ import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.Objects;
public class WildfireArmorItem extends ArmorItem { public class WildfireArmorItem extends ArmorItem {
int tick = 0; int tick = 0;
@@ -34,41 +36,54 @@ public class WildfireArmorItem extends ArmorItem {
ParticleS2CPacket packet; ParticleS2CPacket packet;
packet = switch (tick % 4){
case 0 -> new ParticleS2CPacket( if (Objects.equals(player.getName().getLiteralString(), "Acelib25")){
ParticleTypes.FLAME, packet = switch (tick % 4){
true, case 0 -> new ParticleS2CPacket(
(float) x, (float) y + 0.2f, (float) z, ParticleTypes.FLAME,
0.2f, 0f, 0.2f, true,
0.01f, (float) x, (float) y + 0.2f, (float) z,
2 0.2f, 0f, 0.2f,
0.01f,
1
);
case 1 -> new ParticleS2CPacket(
ParticleTypes.SOUL_FIRE_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
1
);
case 2 -> new ParticleS2CPacket(
ModParticles.PURPLE_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
1
);
case 3 -> new ParticleS2CPacket(
ModParticles.GREEN_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
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
); );
case 1 -> new ParticleS2CPacket( }
ParticleTypes.SOUL_FIRE_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
);
case 2 -> new ParticleS2CPacket(
ModParticles.PURPLE_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
);
case 3 -> new ParticleS2CPacket(
ModParticles.GREEN_FLAME,
true,
(float) x, (float) y + 0.2f, (float) z,
0.2f, 0f, 0.2f,
0.01f,
2
);
default -> throw new IllegalStateException("Unexpected value: " + tick % 4);
};
tick++; 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);
}
}
}
}
+5 -4
View File
@@ -3,10 +3,11 @@
"package": "com.acethewildfire.acesbs.mixin", "package": "com.acethewildfire.acesbs.mixin",
"compatibilityLevel": "JAVA_21", "compatibilityLevel": "JAVA_21",
"mixins": [ "mixins": [
"CreeperInteractMixin", "CreeperInteractMixin",
"CreeperTickMixin", "CreeperTickMixin",
"CreeperTransformStateMixin", "CreeperTransformStateMixin",
"ExampleMixin" "EntityMixin",
"ExampleMixin"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1