Wildfire boots

This commit is contained in:
Vos
2026-02-02 00:41:22 -06:00
parent bb57cc8657
commit 7f250c4261
33 changed files with 386 additions and 12 deletions
@@ -0,0 +1,68 @@
{
"parent": "minecraft:item/generated",
"overrides": [
{
"model": "acesbs:item/wildfire_boots_quartz_trim",
"predicate": {
"trim_type": 0.1
}
},
{
"model": "acesbs:item/wildfire_boots_iron_trim",
"predicate": {
"trim_type": 0.2
}
},
{
"model": "acesbs:item/wildfire_boots_netherite_trim",
"predicate": {
"trim_type": 0.3
}
},
{
"model": "acesbs:item/wildfire_boots_redstone_trim",
"predicate": {
"trim_type": 0.4
}
},
{
"model": "acesbs:item/wildfire_boots_copper_trim",
"predicate": {
"trim_type": 0.5
}
},
{
"model": "acesbs:item/wildfire_boots_gold_trim",
"predicate": {
"trim_type": 0.6
}
},
{
"model": "acesbs:item/wildfire_boots_emerald_trim",
"predicate": {
"trim_type": 0.7
}
},
{
"model": "acesbs:item/wildfire_boots_diamond_trim",
"predicate": {
"trim_type": 0.8
}
},
{
"model": "acesbs:item/wildfire_boots_lapis_trim",
"predicate": {
"trim_type": 0.9
}
},
{
"model": "acesbs:item/wildfire_boots_amethyst_trim",
"predicate": {
"trim_type": 1.0
}
}
],
"textures": {
"layer0": "acesbs:item/wildfire_boots"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_amethyst"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_copper"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_diamond"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_emerald"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_gold"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_iron"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_lapis"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_netherite"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_quartz"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:item/wildfire_boots",
"layer1": "minecraft:trims/items/boots_trim_redstone"
}
}
@@ -9,6 +9,7 @@ import com.acethewildfire.acesbs.entity.ModEntities;
import com.acethewildfire.acesbs.entity.custom.FrenEntity;
import com.acethewildfire.acesbs.item.ModItemGroups;
import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.particle.ModParticles;
import com.acethewildfire.acesbs.potion.ModPotions;
import com.acethewildfire.acesbs.recipe.ModRecipies;
import com.acethewildfire.acesbs.screen.ModScreenHandlers;
@@ -57,6 +58,7 @@ public class AcesBS implements ModInitializer {
ModBlockEntities.registerBlockEntities();
ModScreenHandlers.registerScreenHandlers();
ModRecipies.registerRecipes();
ModParticles.registerModParticles();
ModDataComponentTypes.registerDataComponentsTypes();
@@ -6,6 +6,9 @@ import com.acethewildfire.acesbs.entity.client.CombustibleLemonModel;
import com.acethewildfire.acesbs.entity.client.CombustibleLemonRenderer;
import com.acethewildfire.acesbs.entity.client.FrenModel;
import com.acethewildfire.acesbs.entity.client.FrenRenderer;
import com.acethewildfire.acesbs.particle.GreenFlame;
import com.acethewildfire.acesbs.particle.ModParticles;
import com.acethewildfire.acesbs.particle.PurpleFlame;
import com.acethewildfire.acesbs.screen.ModScreenHandlers;
import com.acethewildfire.acesbs.screen.custom.EntropicEntanglerScreen;
import com.acethewildfire.acesbs.screen.custom.EntropicEvisceratorScreen;
@@ -13,6 +16,7 @@ import com.acethewildfire.acesbs.screen.custom.EntropicStabilizerScreen;
import com.acethewildfire.acesbs.util.ModModelPredicates;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
@@ -40,5 +44,8 @@ public class AcesBSClient implements ClientModInitializer {
HandledScreens.register(ModScreenHandlers.ENTROPIC_STABILIZER_SCREEN_HANDLER, EntropicStabilizerScreen::new);
HandledScreens.register(ModScreenHandlers.ENTROPIC_EVISCERATOR_SCREEN_HANDLER, EntropicEvisceratorScreen::new);
HandledScreens.register(ModScreenHandlers.ENTROPIC_ENTANGLER_SCREEN_HANDLER, EntropicEntanglerScreen::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.PURPLE_FLAME, PurpleFlame.Factory::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.GREEN_FLAME, GreenFlame.Factory::new);
}
}
@@ -103,6 +103,7 @@ public class ModModelProvider extends FabricModelProvider {
itemModelGenerator.registerArmor((ArmorItem) PrismaSteelItems.PRISMA_STEEL_BOOTS);
itemModelGenerator.registerArmor((ArmorItem) ModItems.BERSERKERS_PAULDRON);
itemModelGenerator.registerArmor((ArmorItem) ModItems.WILDFIRE_BOOTS);
itemModelGenerator.register(ModItems.FREN_SPAWN_EGG,
new Model(Optional.of(Identifier.of("item/template_spawn_egg")), Optional.empty()));
@@ -28,6 +28,16 @@ public class ModArmorMaterials {
}), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, () -> Ingredient.ofItems(PrismaSteelItems.PRISMA_STEEL),
List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "prisma_steel"))), 0, 0));
public static final RegistryEntry<ArmorMaterial> WILDFIRE_ARMOR_MATERIAL = registerArmorMaterial("wildfire",
() -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
map.put(ArmorItem.Type.BOOTS, 3);
map.put(ArmorItem.Type.LEGGINGS, 6);
map.put(ArmorItem.Type.CHESTPLATE, 8);
map.put(ArmorItem.Type.HELMET, 3);
map.put(ArmorItem.Type.BODY, 11);
}), 20, SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, () -> Ingredient.ofItems(ModItems.INFERNAL_ASHES),
List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "wildfire"))), 0, 0));
public static final RegistryEntry<ArmorMaterial> BERSERKERS = registerArmorMaterial("berserkers",
() -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
map.put(ArmorItem.Type.BOOTS, 2);
@@ -102,6 +102,7 @@ public class ModItemGroups {
entries.add(ModItems.KAUPEN_BOW);
entries.add(ModItems.COMBUSTIBLE_LEMON);
entries.add(ModItems.BERSERKERS_PAULDRON);
entries.add(ModItems.WILDFIRE_BOOTS);
})
@@ -144,6 +144,24 @@ public class ModItems {
}
);
public static final Item WILDFIRE_BOOTS = registerItem("wildfire_boots",
new WildfireArmorItem(ModArmorMaterials.WILDFIRE_ARMOR_MATERIAL, ArmorItem.Type.BOOTS, new Item.Settings()
.maxDamage(ArmorItem.Type.BOOTS.getMaxDamage(15))){
@Override
public void appendTooltip(ItemStack stack, TooltipContext context, List<Text> tooltip, TooltipType type) {
if(!Screen.hasShiftDown()){
tooltip.add(Text.translatable("tooltip.acesbs.wildfire_boots_desc"));
tooltip.add(Text.translatable("tooltip.acesbs.generic.shift_more"));
}
else {
tooltip.add(Text.translatable("tooltip.acesbs.wildfire_boots_thanks"));
// tooltip.add(Text.translatable("tooltip.acesbs.thanks_sov"));
}
super.appendTooltip(stack, context, tooltip, type);
}
}
);
public static final Item TOBACCO_SEEDS = registerItem("tobacco_seeds", new AliasedBlockItem(ModBlocks.TOBACCO_CROP, new Item.Settings()));
public static final Item TOBACCO = registerItem("tobacco", new Item(new Item.Settings()));
@@ -0,0 +1,96 @@
package com.acethewildfire.acesbs.item.custom;
import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.particle.ModParticles;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class WildfireArmorItem extends ArmorItem {
int tick = 0;
public WildfireArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
super(material, type, settings);
}
@Override
public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
if(!world.isClient()) {
if(entity instanceof PlayerEntity player) {
ItemStack bootsStack = player.getInventory().getArmorStack(0);
if (!bootsStack.isEmpty() && bootsStack.getItem() == ModItems.WILDFIRE_BOOTS){
double x = player.getX();
double y = player.getY(); // feet level
double z = player.getZ();
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
);
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++;
if (tick >= 200){
tick = 0;
}
BlockPos pos = new BlockPos((int) x, (int) y, (int) z);
// Send to all players in the world near that position
for (PlayerEntity player_i : world.getPlayers()) {
if (player.getBlockPos().isWithinDistance(pos, 128)) {
if (player_i instanceof ServerPlayerEntity serverPlayer) {
serverPlayer.networkHandler.sendPacket(packet);
}
}
}
}
}
}
super.inventoryTick(stack, world, entity, slot, selected);
}
}
@@ -0,0 +1,34 @@
package com.acethewildfire.acesbs.particle;
import net.minecraft.client.particle.*;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.SimpleParticleType;
import org.jetbrains.annotations.Nullable;
public class GreenFlame extends AbstractSlowingParticle {
public GreenFlame(ClientWorld clientWorld, double x, double y, double z,
SpriteProvider spriteProvider, double xSpeed, double ySpeed, double zSpeed) {
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed);
this.setSpriteForAge(spriteProvider);
}
@Override
public ParticleTextureSheet getType() {
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
}
public static class Factory implements ParticleFactory<SimpleParticleType> {
private final SpriteProvider spriteProvider;
public Factory(SpriteProvider spriteProvider) {
this.spriteProvider = spriteProvider;
}
@Override
public @Nullable Particle createParticle(SimpleParticleType parameters, ClientWorld world,
double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
return new GreenFlame(world, x, y, z, this.spriteProvider, velocityX, velocityY, velocityZ);
}
}
}
@@ -0,0 +1,22 @@
package com.acethewildfire.acesbs.particle;
import com.acethewildfire.acesbs.AcesBS;
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
public class ModParticles {
public static final SimpleParticleType PURPLE_FLAME = registerParticles("purple_flame", FabricParticleTypes.simple(true));
public static final SimpleParticleType GREEN_FLAME = registerParticles("green_flame", FabricParticleTypes.simple(true));
private static SimpleParticleType registerParticles(String name, SimpleParticleType particleType){
return Registry.register(Registries.PARTICLE_TYPE, Identifier.of(AcesBS.MOD_ID, name), particleType);
}
public static void registerModParticles() {
AcesBS.LOGGER.info("Registering Mod Particles for " + AcesBS.MOD_ID);
}
}
@@ -0,0 +1,34 @@
package com.acethewildfire.acesbs.particle;
import net.minecraft.client.particle.*;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.SimpleParticleType;
import org.jetbrains.annotations.Nullable;
public class PurpleFlame extends AbstractSlowingParticle {
public PurpleFlame(ClientWorld clientWorld, double x, double y, double z,
SpriteProvider spriteProvider, double xSpeed, double ySpeed, double zSpeed) {
super(clientWorld, x, y, z, xSpeed, ySpeed, zSpeed);
this.setSpriteForAge(spriteProvider);
}
@Override
public ParticleTextureSheet getType() {
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
}
public static class Factory implements ParticleFactory<SimpleParticleType> {
private final SpriteProvider spriteProvider;
public Factory(SpriteProvider spriteProvider) {
this.spriteProvider = spriteProvider;
}
@Override
public @Nullable Particle createParticle(SimpleParticleType parameters, ClientWorld world,
double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
return new PurpleFlame(world, x, y, z, this.spriteProvider, velocityX, velocityY, velocityZ);
}
}
}
@@ -42,6 +42,7 @@
"item.acesbs.prisma_armor_trim_smithing_template": "Prisma Smithing Template",
"item.acesbs.berserkers_pauldron": "Berserker's Pauldron",
"item.acesbs.wildfire_boots": "Wildfire Boots",
"item.acesbs.kaupen_bow": "Kaupen Bow",
@@ -156,6 +157,10 @@
"tooltip.acesbs.berserkers_pauldron_desc": "§c§oI will not be moved.§r",
"tooltip.acesbs.berserkers_pauldron_thanks": "§7§oProgrammed with <3 for Tennocraft§r",
"tooltip.acesbs.wildfire_boots_desc": "§c§oThere are no walls.§r",
"tooltip.acesbs.wildfire_boots_thanks": "§7§oProgrammed with <3 by/for AceTheWildfire§r",
"tooltip.acesbs.thanks_sov": "§7§oTextures by Sovaeris§r",
"tooltip.acesbs.combustible_lemon1": "§7§oDo you know who I am?§r",
@@ -0,0 +1,5 @@
{
"textures": [
"acesbs:flame_green"
]
}
@@ -0,0 +1,5 @@
{
"textures": [
"acesbs:flame_purple"
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B