添加otto攻击动作,修改数值
This commit is contained in:
parent
69a7f614b7
commit
ec2aa1a209
2 changed files with 40 additions and 3 deletions
|
@ -26,8 +26,8 @@ import java.util.Optional;
|
|||
|
||||
public class ElectricBaton extends SwordItem implements EnergyStorageItem {
|
||||
|
||||
public static final int MAX_ENERGY = 6000;
|
||||
public static final int ENERGY_COST = 1000;
|
||||
public static final int MAX_ENERGY = 30000;
|
||||
public static final int ENERGY_COST = 1500;
|
||||
public static final String TAG_OPEN = "Open";
|
||||
|
||||
public ElectricBaton() {
|
||||
|
@ -57,7 +57,7 @@ public class ElectricBaton extends SwordItem implements EnergyStorageItem {
|
|||
public @NotNull InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand usedHand) {
|
||||
ItemStack stack = player.getItemInHand(usedHand);
|
||||
|
||||
if (player.isCrouching()) {
|
||||
if (player.isShiftKeyDown()) {
|
||||
var tag = NBTTool.getTag(stack);
|
||||
tag.putBoolean(TAG_OPEN, !tag.getBoolean(TAG_OPEN));
|
||||
NBTTool.saveTag(stack, tag);
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"attributes": {
|
||||
"attack_range": 3.0,
|
||||
"attacks": [
|
||||
{
|
||||
"hitbox": "VERTICAL_PLANE",
|
||||
"damage_multiplier": 1.0,
|
||||
"angle": 110,
|
||||
"upswing": 0.5,
|
||||
"animation": "bettercombat:one_handed_slam",
|
||||
"swing_sound": {
|
||||
"id": "bettercombat:hammer_slam"
|
||||
}
|
||||
},
|
||||
{
|
||||
"hitbox": "VERTICAL_PLANE",
|
||||
"damage_multiplier": 1.0,
|
||||
"angle": 110,
|
||||
"upswing": 0.5,
|
||||
"animation": "bettercombat:one_handed_slam",
|
||||
"swing_sound": {
|
||||
"id": "bettercombat:hammer_slam"
|
||||
}
|
||||
},
|
||||
{
|
||||
"hitbox": "FORWARD_BOX",
|
||||
"damage_multiplier": 1.5,
|
||||
"angle": 30,
|
||||
"upswing": 0.5,
|
||||
"animation": "bettercombat:one_handed_stab",
|
||||
"swing_sound": {
|
||||
"id": "bettercombat:rapier_stab"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue