Breaking changes means version bump. Wildfire Item now only shows rainbow flames for Ace
This commit is contained in:
+1
-1
@@ -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,41 +36,54 @@ public class WildfireArmorItem extends ArmorItem {
|
||||
|
||||
ParticleS2CPacket packet;
|
||||
|
||||
packet = switch (tick % 4){
|
||||
case 0 -> new ParticleS2CPacket(
|
||||
ParticleTypes.FLAME,
|
||||
true,
|
||||
(float) x, (float) y + 0.2f, (float) z,
|
||||
0.2f, 0f, 0.2f,
|
||||
0.01f,
|
||||
2
|
||||
|
||||
if (Objects.equals(player.getName().getLiteralString(), "Acelib25")){
|
||||
packet = switch (tick % 4){
|
||||
case 0 -> 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,
|
||||
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++;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,11 @@
|
||||
"package": "com.acethewildfire.acesbs.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
"CreeperInteractMixin",
|
||||
"CreeperTickMixin",
|
||||
"CreeperTransformStateMixin",
|
||||
"ExampleMixin"
|
||||
"CreeperInteractMixin",
|
||||
"CreeperTickMixin",
|
||||
"CreeperTransformStateMixin",
|
||||
"EntityMixin",
|
||||
"ExampleMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
Reference in New Issue
Block a user