Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

No Withdraw Command #8

Open
TechPro424 opened this issue Mar 9, 2022 · 19 comments
Open

No Withdraw Command #8

TechPro424 opened this issue Mar 9, 2022 · 19 comments

Comments

@TechPro424
Copy link

there is no /withdraw command to withdraw hearts

@BradBot1
Copy link
Owner

BradBot1 commented Mar 9, 2022

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

@BradBot1 BradBot1 closed this as completed Mar 9, 2022
@TechPro424
Copy link
Author

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?

@BradBot1 BradBot1 reopened this Mar 10, 2022
@BradBot1
Copy link
Owner

Do you mean convert a players health into an item?

@TechPro424
Copy link
Author

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

@BradBot1
Copy link
Owner

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

@TechPro424
Copy link
Author

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?

@BradBot1
Copy link
Owner

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.

@TechPro424
Copy link
Author

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

@BradBot1
Copy link
Owner

The crafting recipe will do that yes

@TechPro424
Copy link
Author

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?

@BradBot1
Copy link
Owner

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

@TechPro424
Copy link
Author

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

@BradBot1
Copy link
Owner

Not without curating a mod

@TechPro424
Copy link
Author

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

@ggdude01
Copy link

ggdude01 commented Apr 7, 2022

Can you please add a withdraw feature?

@ggdude01
Copy link

ggdude01 commented Apr 7, 2022

And a crafting one?

@TechPro424
Copy link
Author

And a crafting one?

Crafting is already present
We do still need withdraw command tho

@MonkeMaps
Copy link

how do you craft a heart than

@MonkeMaps
Copy link

MonkeMaps commented Aug 10, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants