LifeSteal

LifeSteal

49.3k Downloads

No Withdraw Command

TechPro424 opened this issue ยท 19 comments

commented

there is no /withdraw command to withdraw hearts

commented

You can use the /(alias) set command to both add and take away hearts as it should accept negative number

commented

How do I make it so that players can only withdraw their own hearts and not others' hearts? Because I see only 1 permission, lifesteal.modify to modify hearts.
Also, when the command is run, how do I get the heart to appear as an item in the inventory?

commented

Do you mean convert a players health into an item?

commented

Yes
1 item = 1 heart of health, the item can be right clicked to add the heart to the player

commented

You could always add a custom recipe to do this since there are requirements to cost hearts, plus this would give you alot of control over the withdrawal.

You can use the loosehealth result to take health from a player (in half hearts), if we apply this and set it to two then it will cost a heart to craft, and the Item can have the mark lifesteal to make it give a heart once consumed

Heres a demo one that costs 1 apple and gives the default craftable health item

{
  "id": "lifesteal:healthwithdraw",
  "recipe": {
    "type": "minecraft:shapeless_crafting",
    "group": "minecraft_apple",
    "icon": {
      "id": "minecraft:apple",
      "Count": 1,
      "tag": {
        "Marks": [
          "lifesteal"
        ],
        "display": {
          "Name": "{\"text\":\"Health\"}"
        }
      }
    },
    "requirements": {
    },
    "results": {
      "loosehealth": 2
    },
    "ingredients": [
      "minecraft:apple"
    ]
  }
}

If you are okay with this then you can close the issue, however if you want a different solution just follow up with how you want said solution to work <3

commented

So when the command is executed, it removes the player's hearts, automatically crafts that item, and gives the item to them?

If yes, how do I make it so that the item can be right clicked to apply the heart back?

commented

No, there is no command that gives a player a heart. However you can utilise the recipe above to allow users to 'infuse' life into an item. Remember that any item that contains the mark "lifesteal" (or what ever you configured it to be) will give hearts when consumed.

commented

So if I use this command, the item is infused with hearts, and can give back the hearts when consumed, right?

commented

The crafting recipe will do that yes

commented

The recipe I provided will have be be crafted in a crafting table to achieve the effect you stated prior

commented

The crafting recipe will do that yes

Do you mean we have to craft the item in a crafting table to achieve the effect?
Or will running the command be enough?

commented

Is there any way to have it done using a command, without the crafing table?

commented

Not without curating a mod

commented

Would it be possible for you to add this feature?
(Take your time)

commented

Can you please add a withdraw feature?

commented

And a crafting one?

commented

And a crafting one?

Crafting is already present
We do still need withdraw command tho

commented

how do you craft a heart than

commented

You could always add a custom recipe to do this since there are requirements to cost hearts, plus this would give you alot of control over the withdrawal.

You can use the loosehealth result to take health from a player (in half hearts), if we apply this and set it to two then it will cost a heart to craft, and the Item can have the mark lifesteal to make it give a heart once consumed

Heres a demo one that costs 1 apple and gives the default craftable health item

{
  "id": "lifesteal:healthwithdraw",
  "recipe": {
    "type": "minecraft:shapeless_crafting",
    "group": "minecraft_apple",
    "icon": {
      "id": "minecraft:apple",
      "Count": 1,
      "tag": {
        "Marks": [
          "lifesteal"
        ],
        "display": {
          "Name": "{\"text\":\"Health\"}"
        }
      }
    },
    "requirements": {
    },
    "results": {
      "loosehealth": 2
    },
    "ingredients": [
      "minecraft:apple"
    ]
  }
}

If you are okay with this then you can close the issue, however if you want a different solution just follow up with how you want said solution to work <3

how do I change the recipe? like, if I want multiple of one item in there, or if I want shaped crafting.