实现Perk和Perk注册
This commit is contained in:
parent
f613e7dd4f
commit
ccba17fa1f
2 changed files with 26 additions and 4 deletions
|
@ -20,7 +20,15 @@ public class ModPerks {
|
|||
|
||||
public static final DeferredRegister<Perk> PERKS = DeferredRegister.create(new ResourceLocation(ModUtils.MODID, "perk"), ModUtils.MODID);
|
||||
|
||||
// TODO 完成各种Perk的注册
|
||||
public static final RegistryObject<Perk> KILL_CLIP = PERKS.register("kill_clip", Perk::new);
|
||||
|
||||
public static final RegistryObject<Perk> FOURTH_TIMES_CHARM = PERKS.register("fourth_times_charm", () -> new Perk(Perk.Type.FUNCTIONAL));
|
||||
public static final RegistryObject<Perk> GUTSHOT_STRAIGHT = PERKS.register("gutshot_straight", () -> new Perk(Perk.Type.DAMAGE));
|
||||
public static final RegistryObject<Perk> HEAL_CLIP = PERKS.register("heal_clip", () -> new Perk(Perk.Type.FUNCTIONAL));
|
||||
public static final RegistryObject<Perk> KILL_CLIP = PERKS.register("kill_clip", () -> new Perk(Perk.Type.DAMAGE));
|
||||
public static final RegistryObject<Perk> KILLING_TALLY = PERKS.register("killing_tally", () -> new Perk(Perk.Type.DAMAGE));
|
||||
public static final RegistryObject<Perk> LONGER_WIRE = PERKS.register("longer_wire", () -> new Perk(Perk.Type.DAMAGE));
|
||||
public static final RegistryObject<Perk> MONSTER_HUNTER = PERKS.register("monster_hunter", () -> new Perk(Perk.Type.FUNCTIONAL));
|
||||
public static final RegistryObject<Perk> SUPER_RECHARGE = PERKS.register("super_recharge", () -> new Perk(Perk.Type.DAMAGE));
|
||||
public static final RegistryObject<Perk> VOLT_OVERLOAD = PERKS.register("volt_overload", () -> new Perk(Perk.Type.DAMAGE));
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
package net.mcreator.superbwarfare.perk;
|
||||
|
||||
public class Perk {
|
||||
// TODO 完成Perk和PerkItem
|
||||
public record Perk(net.mcreator.superbwarfare.perk.Perk.Type type) {
|
||||
|
||||
public enum Type {
|
||||
AMMO(0),
|
||||
FUNCTIONAL(1),
|
||||
DAMAGE(2);
|
||||
private final int slot;
|
||||
|
||||
Type(int slot) {
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public int getSlot() {
|
||||
return slot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue