Powered exoskeleton(机动外骨骼)

Add four Powered Exoskeletons!It can give players different effects

File Details

powered-exoskeleton-1.0.0_formal.jar

  • R
  • May 11, 2025
  • 60.90 KB
  • 93
  • 1.21.1
  • Fabric

File Name

powered-exoskeleton-1.0.0_formal.jar

Supported Versions

  • 1.21.1

Curse Maven Snippet

Fabric

modImplementation "curse.maven:powered-exoskeleton-1259305:6518756"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

reporter:To avoid potential discrepancies with the intended meaning, no English changelog is provided here. Please translate it yourself.
 
 
 
MOD名称:Powered Exoskeleton
MOD_ID:powered-exoskeleton
开发者:J_pc(中国大陆,PRC)
此版本相比1.0.0-pre2,将MOD运行时需要的模组加载器版本改为Fabric 0.16.10+;
相关代码(1.0.0_pre2):
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
 
# Fabric Properties
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.13
 
# Mod Properties
mod_version=1.0.0_formal
maven_group=com.example
archives_base_name=powered-exoskeleton
 
# Dependencies
fabric_version=0.115.4+1.21.1
 
--
 
{
"schemaVersion": 1,
"id": "powered-exoskeleton",
"version": "${version}",
"name": "Powered Exoskeleton",
"description": "Powered Exoskeleton!   ...fiu~~~",
"authors": [
"J_pc"
],
"contact": {
"homepage": "https://fabricmc.net/",
},
"license": "CC0-1.0",
"icon": "assets/powered-exoskeleton/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"com.example.PoweredExoskeleton"
],
"fabric-datagen": [
"com.example.PoweredExoskeletonDataGenerator"
]
},
"mixins": [
"powered-exoskeleton.mixins.json"
],
"depends": {
"fabricloader": ">=0.16.13",
"minecraft": "~1.21.1",
"java": ">=21",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"
}
}
 
 
相关代码(1.0.0_formal):
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
 
# Fabric Properties
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.10
 
# Mod Properties
mod_version=1.0.0_formal
maven_group=com.example
archives_base_name=powered-exoskeleton
 
# Dependencies
fabric_version=0.115.4+1.21.1
 
--
 
{
"schemaVersion": 1,
"id": "powered-exoskeleton",
"version": "${version}",
"name": "Powered Exoskeleton",
"description": "Powered Exoskeleton!   ...fiu~~~",
"authors": [
"J_pc"
],
"contact": {
"homepage": "https://fabricmc.net/",
},
"license": "CC0-1.0",
"icon": "assets/powered-exoskeleton/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"com.example.PoweredExoskeleton"
],
"fabric-datagen": [
"com.example.PoweredExoskeletonDataGenerator"
]
},
"mixins": [
"powered-exoskeleton.mixins.json"
],
"depends": {
"fabricloader": ">=0.16.10",
"minecraft": "~1.21.1",
"java": ">=21",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"
}
}
 
MOD内容:
新增物品:
powered-exoskeleton:head_exoskeleton
powered-exoskeleton:torso_exoskeleton
powered-exoskeleton:legs_exoskeleton
powered-exoskeleton:feet_exoskeleton
新增方块:NONE
新增生物实体:NONE
新增弹射物实体:NONE
新增命令:NONE
新增结构:NONE
新增地物:NONE
新增维度:NONE
新增生物群系:NONE
 
 
powered-exoskeleton:head_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于头盔位,使玩家获得夜视效果
护甲值:2
盔甲韧性:6
击退抗性:0
相关代码:
 
package com.example.item.custom;
 
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.world.World;
 
public class ModHEArmorItem extends ArmorItem {
    private static final StatusEffectInstance H_E_Effect =
            new StatusEffectInstance(StatusEffects.NIGHT_VISION, 210, 0, false, false);
 
    public ModHEArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
        super(material, type, settings);
    }
 
    private void applyNightVisionEffect(PlayerEntity player) {
            player.addStatusEffect(new StatusEffectInstance(H_E_Effect));
 
    }
 
    private boolean isWearingExoskeletonHelmet(PlayerEntity player) {
        ItemStack headSlot = player.getInventory().getArmorStack(3);
        return !headSlot.isEmpty() &&
                headSlot.getItem() == this &&
                ((ArmorItem)headSlot.getItem()).getMaterial() == this.material;
    }
 
    @Override
    public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
        super.inventoryTick(stack, world, entity, slot, selected);
 
        if (!world.isClient &&
                entity instanceof PlayerEntity player &&
                slot == 3) {
            if (isWearingExoskeletonHelmet(player)) {
                applyNightVisionEffect(player);
            }
        }
    }
}
 
--
 
{
  "type": "minecraft:crafting_shaped",
  "category": "equipment",
  "key": {
    "#": {
      "item": "minecraft:iron_ingot"
    },
    "*": {
      "item": "minecraft:redstone"
    }
  },
  "pattern": [
    "   ",
    "###",
    "#*#"
  ],
  "result": {
    "count": 1,
    "id": "powered-exoskeleton:head_exoskeleton"
  }
}
 
powered-exoskeleton:torso_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于胸甲位,使玩家离时按"shift"键获得漂浮6效果
护甲值:4
盔甲韧性:6
击退抗性:0
相关代码:
 
package com.example.item.custom;
 
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.world.World;
 
public class ModTEArmorItem extends ArmorItem {
 
    private static final StatusEffectInstance T_E_EFFECT =
            new StatusEffectInstance(StatusEffects.LEVITATION, 1, 5, false, false);
 
    public ModTEArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
        super(material, type, settings);
    }
 
    private void applyLevitationEffect(PlayerEntity player) {
        if (!player.isOnGround() && Screen.hasShiftDown()) {
            player.addStatusEffect(new StatusEffectInstance(T_E_EFFECT));
        }
    }
 
    private boolean isWearingChestplate(PlayerEntity player) {
        ItemStack chestSlot = player.getInventory().getArmorStack(2);
        return !chestSlot.isEmpty() && chestSlot.getItem() == this;
    }
 
    @Override
    public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
        super.inventoryTick(stack, world, entity, slot, selected);
 
        if (!world.isClient() &&
                entity instanceof PlayerEntity player &&
                isWearingChestplate(player)) {
            applyLevitationEffect(player);
        }
    }
}
 
 
powered-exoskeleton:legs_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于护腿位,使玩家获得跳跃提升3效果
护甲值:3
盔甲韧性:6
击退抗性:0
相关代码:
 
package com.example.item.custom;
 
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.world.World;
 
public class ModLEArmorItem extends ArmorItem {
 
    private static final StatusEffectInstance L_E_EFFECT =
            new StatusEffectInstance(StatusEffects.JUMP_BOOST, 1, 2, false, false);
 
 
    public ModLEArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
        super(material, type, settings);
    }
    private void applyLevitationEffect(PlayerEntity player) {
        player.addStatusEffect(new StatusEffectInstance(L_E_EFFECT));
    }
 
    private boolean isWearingChestplate(PlayerEntity player) {
        ItemStack chestSlot = player.getInventory().getArmorStack(1);
        return !chestSlot.isEmpty() && chestSlot.getItem() == this;
    }
 
    @Override
    public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
        super.inventoryTick(stack, world, entity, slot, selected);
 
        if (!world.isClient() &&
                entity instanceof PlayerEntity player &&
                isWearingChestplate(player)) {
            applyLevitationEffect(player);
        }
    }
}
 
powered-exoskeleton:feet_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于靴子位,使玩家获得速度3效果
护甲值:2
盔甲韧性:6
击退抗性:0
相关代码:
 
package com.example.item.custom;
 
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.world.World;
 
public class ModFEArmorItem extends ArmorItem {
    private static final StatusEffectInstance F_E_Effect =
            new StatusEffectInstance(StatusEffects.SPEED, 10, 2, false, false);
 
    public ModFEArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
        super(material, type, settings);
    }
 
    private void applyNightVisionEffect(PlayerEntity player) {
            player.addStatusEffect(new StatusEffectInstance(F_E_Effect));
    }
 
    private boolean isWearingExoskeletonHelmet(PlayerEntity player) {
        ItemStack headSlot = player.getInventory().getArmorStack(0);
        return !headSlot.isEmpty() &&
                headSlot.getItem() == this &&
                ((ArmorItem)headSlot.getItem()).getMaterial() == this.material;
    }
 
    @Override
    public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {
        super.inventoryTick(stack, world, entity, slot, selected);
 
        if (!world.isClient &&
                entity instanceof PlayerEntity player &&
                slot == 0) {
            if (isWearingExoskeletonHelmet(player)) {
                applyNightVisionEffect(player);
            }
        }
    }
}
 
--
 
{
  "type": "minecraft:crafting_shaped",
  "category": "equipment",
  "key": {
    "#": {
      "item": "minecraft:iron_ingot"
    },
    "*": {
      "item": "minecraft:redstone"
    }
  },
  "pattern": [
    "   ",
    "#*#",
    "# #"
  ],
  "result": {
    "count": 1,
    "id": "powered-exoskeleton:feet_exoskeleton"
  }
}
 
powered-exoskeleton:torso_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于胸甲位
护甲值:4
盔甲韧性:6
击退抗性:0
相关代码:
 
{
  "type": "minecraft:crafting_shaped",
  "category": "equipment",
  "key": {
    "#": {
      "item": "minecraft:iron_ingot"
    },
    "*": {
      "item": "minecraft:redstone_block"
    }
  },
  "pattern": [
    "# #",
    "#*#",
    "###"
  ],
  "result": {
    "count": 1,
    "id": "powered-exoskeleton:torso_exoskeleton"
  }
}
 
powered-exoskeleton:legs_exoskeleton
最大堆叠数量:1
获取方式:合成
用途:装备于护腿位
护甲值:3
盔甲韧性:6
击退抗性:0
相关代码:
 
{
  "type": "minecraft:crafting_shaped",
  "category": "equipment",
  "key": {
    "#": {
      "item": "minecraft:iron_ingot"
    },
    "*": {
      "item": "minecraft:redstone"
    }
  },
  "pattern": [
    "###",
    "#*#",
    "# #"
  ],
  "result": {
    "count": 1,
    "id": "powered-exoskeleton:legs_exoskeleton"
  }
}
 
盔甲注册方法:
 
package com.example.item;
 
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ItemConvertible;
import net.minecraft.recipe.Ingredient;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;
import net.minecraft.util.Util;
 
import java.util.EnumMap;
import java.util.List;
import java.util.function.Supplier;
 
public class ModArmorMaterials {
    public static final RegistryEntry<ArmorMaterial> EXOSKELETON = register("exoskeleton", Util.make(new EnumMap(ArmorItem.Type.class), map -> {
        map.put(ArmorItem.Type.BOOTS, 2);
        map.put(ArmorItem.Type.LEGGINGS, 3);
        map.put(ArmorItem.Type.CHESTPLATE, 4);
        map.put(ArmorItem.Type.HELMET, 2);
        map.put(ArmorItem.Type.BODY, 11);
    }), 15, SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, 6.0F, 0, () -> Ingredient.ofItems((ItemConvertible) null));
 
    private static RegistryEntry<ArmorMaterial> register(
            String id,
            EnumMap<ArmorItem.Type, Integer> defense,
            int enchantability,
            RegistryEntry<SoundEvent> equipSound,
            float toughness,
            float knockbackResistance,
            Supplier<Ingredient> repairIngredient
    ) {
        List<ArmorMaterial.Layer> list = List.of(new ArmorMaterial.Layer(Identifier.ofVanilla(id)));
        return register(id, defense, enchantability, equipSound, toughness, knockbackResistance, repairIngredient, list);
    }
 
    private static RegistryEntry<ArmorMaterial> register(
            String id,
            EnumMap<ArmorItem.Type, Integer> defense,
            int enchantability,
            RegistryEntry<SoundEvent> equipSound,
            float toughness,
            float knockbackResistance,
            Supplier<Ingredient> repairIngredient,
            List<ArmorMaterial.Layer> layers
    ) {
        EnumMap<ArmorItem.Type, Integer> enumMap = new EnumMap(ArmorItem.Type.class);
 
        for (ArmorItem.Type type : ArmorItem.Type.values()) {
            enumMap.put(type, (Integer)defense.get(type));
        }
 
        return Registry.registerReference(
                Registries.ARMOR_MATERIAL,
                Identifier.ofVanilla(id),
                new ArmorMaterial(enumMap, enchantability, equipSound, repairIngredient, layers, toughness, knockbackResistance)
        );
    }
}
 
--
 
package com.example.item;
 
import com.example.PoweredExoskeleton;
import com.example.item.custom.ModFEArmorItem;
import com.example.item.custom.ModHEArmorItem;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
 
public class ModItems {
    public static final Item HEAD_EXOSKELETON = registerItems("head_exoskeleton", new ModHEArmorItem(ModArmorMaterials.EXOSKELETON,ArmorItem.Type.HELMET, new Item.Settings().maxCount(1)));
    public static final Item TORSO_EXOSKELETON = registerItems("torso_exoskeleton", new ArmorItem(ModArmorMaterials.EXOSKELETON,ArmorItem.Type.CHESTPLATE, new Item.Settings().maxCount(1)));
    public static final Item LEGS_EXOSKELETON = registerItems("legs_exoskeleton", new ArmorItem(ModArmorMaterials.EXOSKELETON,ArmorItem.Type.LEGGINGS, new Item.Settings().maxCount(1)));
    public static final Item FEET_EXOSKELETON = registerItems("feet_exoskeleton", new ModFEArmorItem(ModArmorMaterials.EXOSKELETON,ArmorItem.Type.BOOTS, new Item.Settings().maxCount(1)));
 
    public static Item registerItems(String id, Item item) {
        return Registry.register(Registries.ITEM, Identifier.of(PoweredExoskeleton.MOD_ID, id), item);
    }
 
    public static void addItemsToItemGroup_COMBAT(FabricItemGroupEntries fabricItemGroupEntries) {
        fabricItemGroupEntries.add(HEAD_EXOSKELETON);
        fabricItemGroupEntries.add(TORSO_EXOSKELETON);
        fabricItemGroupEntries.add(LEGS_EXOSKELETON);
        fabricItemGroupEntries.add(FEET_EXOSKELETON);
    }
 
    public static void registerModItems() {
        ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register(ModItems::addItemsToItemGroup_COMBAT);
    }
}
 
经测试,此版本目前未发现异常;
报告人:J_pc(中国大陆,PRC)
报告时间:2025/5/11/15:27(东八区)
MOD创建时期:2025/4/18/20:38(东八区)
MOD版本:1.0.0_formal
MOD编写时的联网状态:个人网
MOD适用的Minecraft版本:《Minecraft JAVA 1.21.1-Fabric 0.16.10-Fabric API 0.115.1 Edition》
MOD适用的模组加载器版本:Fabric 0.16.10+
MOD当前版本完成时期:2025/5/11/17:16(东八区)
MOD当前版本测试完成时期:2025/5/11/17:19(东八区)
MOD编写时使用的操作系统:Windows10.0.19042.746
MOD编写时使用的中央处理器:Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz 2.40 GHz
MOD编写时使用的显卡:集成显卡
MOD编写时使用的JAVA解释器:JDK 21.0.4
MOD编写时使用的映射:yarn映射
MOD测试时使用的启动器:PCL2
MOD测试时的联网状态:个人网
MOD测试时的登录方式:离线登录
MOD测试时使用的JAVA解释器:JDK 21.0.4
MOD测试时使用的Minecraft源:镜像源
MOD测试时的版本隔离:隔离所有版本
MOD测试时的JAVA虚拟机参数头:-XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Dfml.ignoreInvalidMinecraftCertificates=True -Dfml.ignorePatchDiscrepancies=True -Dlog4j2.formatMsgNoLookups=true
     JAVA虚拟机参数尾:
MOD测试时使用的Minecraft版本:《Minecraft JAVA 1.21.1-Fabric 0.16.10 Edition》
MOD测试时使用的前置MOD:Fabric API-0.115.4