Minecraft 1.12.2 自定义盾牌(Shield)
今天我们在1.18的版本中实现一个3D盾牌。
1.在新建一个我们的盾牌类ItemShield,继承原版的盾牌:
ItemShield.java
package com.joy187.re8joymod.items;
import java.util.UUID;
import javax.annotation.Nullable;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.joy187.re8joymod.Main;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraf

本文介绍了如何在Minecraft 1.12.2版本中创建一个自定义的盾牌类,扩展了原版盾牌的功能。通过编写ItemShield.java,设置盾牌的耐久值、修理材料,并赋予盾牌额外的属性,如增加护甲值和抗击退效果。同时,教程还涉及了3D模型的制作,指导玩家如何在Blockbench中设计盾牌模型并导入游戏中。最后,通过在游戏中添加相应的英文名称,完成盾牌的全部定制过程。
最低0.47元/天 解锁文章
2189





