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
|
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,6 +36,8 @@ public class WildfireArmorItem extends ArmorItem {
|
|||||||
|
|
||||||
ParticleS2CPacket packet;
|
ParticleS2CPacket packet;
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.equals(player.getName().getLiteralString(), "Acelib25")){
|
||||||
packet = switch (tick % 4){
|
packet = switch (tick % 4){
|
||||||
case 0 -> new ParticleS2CPacket(
|
case 0 -> new ParticleS2CPacket(
|
||||||
ParticleTypes.FLAME,
|
ParticleTypes.FLAME,
|
||||||
@@ -41,7 +45,7 @@ public class WildfireArmorItem extends ArmorItem {
|
|||||||
(float) x, (float) y + 0.2f, (float) z,
|
(float) x, (float) y + 0.2f, (float) z,
|
||||||
0.2f, 0f, 0.2f,
|
0.2f, 0f, 0.2f,
|
||||||
0.01f,
|
0.01f,
|
||||||
2
|
1
|
||||||
);
|
);
|
||||||
case 1 -> new ParticleS2CPacket(
|
case 1 -> new ParticleS2CPacket(
|
||||||
ParticleTypes.SOUL_FIRE_FLAME,
|
ParticleTypes.SOUL_FIRE_FLAME,
|
||||||
@@ -49,7 +53,7 @@ public class WildfireArmorItem extends ArmorItem {
|
|||||||
(float) x, (float) y + 0.2f, (float) z,
|
(float) x, (float) y + 0.2f, (float) z,
|
||||||
0.2f, 0f, 0.2f,
|
0.2f, 0f, 0.2f,
|
||||||
0.01f,
|
0.01f,
|
||||||
2
|
1
|
||||||
);
|
);
|
||||||
case 2 -> new ParticleS2CPacket(
|
case 2 -> new ParticleS2CPacket(
|
||||||
ModParticles.PURPLE_FLAME,
|
ModParticles.PURPLE_FLAME,
|
||||||
@@ -57,7 +61,7 @@ public class WildfireArmorItem extends ArmorItem {
|
|||||||
(float) x, (float) y + 0.2f, (float) z,
|
(float) x, (float) y + 0.2f, (float) z,
|
||||||
0.2f, 0f, 0.2f,
|
0.2f, 0f, 0.2f,
|
||||||
0.01f,
|
0.01f,
|
||||||
2
|
1
|
||||||
);
|
);
|
||||||
case 3 -> new ParticleS2CPacket(
|
case 3 -> new ParticleS2CPacket(
|
||||||
ModParticles.GREEN_FLAME,
|
ModParticles.GREEN_FLAME,
|
||||||
@@ -65,10 +69,21 @@ public class WildfireArmorItem extends ArmorItem {
|
|||||||
(float) x, (float) y + 0.2f, (float) z,
|
(float) x, (float) y + 0.2f, (float) z,
|
||||||
0.2f, 0f, 0.2f,
|
0.2f, 0f, 0.2f,
|
||||||
0.01f,
|
0.01f,
|
||||||
2
|
1
|
||||||
);
|
);
|
||||||
default -> throw new IllegalStateException("Unexpected value: " + tick % 4);
|
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++;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
"CreeperInteractMixin",
|
"CreeperInteractMixin",
|
||||||
"CreeperTickMixin",
|
"CreeperTickMixin",
|
||||||
"CreeperTransformStateMixin",
|
"CreeperTransformStateMixin",
|
||||||
|
"EntityMixin",
|
||||||
"ExampleMixin"
|
"ExampleMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
|
|||||||
Reference in New Issue
Block a user