Granting Items On Spawn (SOLVED)

Started by ItzYaBoiMyth on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Granting Items On Spawn (SOLVED)
Fri, 02/19/2021 - 10:31 (edited)

How would one go about granting an item on world generation? Ive taken a look through procedures and nothing really pokes out that should work. Im more than likely missing something here but any help would be appreciated.

Edited by ItzYaBoiMyth on Fri, 02/19/2021 - 10:31
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a new procedure and set…
Tue, 02/16/2021 - 17:15

Make a new procedure and set the global trigger to "Player joins the world" then add the (set 1 item is slot of provided itemstack) procedure, so it will detect the player's inventory upon spawn and grant the item in the specified slot. Hope this helped :)

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ive done this, but it grants…
Fri, 02/19/2021 - 04:51

ive done this, but it grants the item every time the player logs on.

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can create a player…
Fri, 02/19/2021 - 06:31

you can create a player persistent logic variable in the variables tab of the workspace. make it so your give code is inside of an if block detecting whether or not the variable is false. if it is false, give the player the item and set the variable to true.

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Makes an global variable…
Fri, 02/19/2021 - 06:33

Makes an global variable with Type Logic and choose Player Persistent in the Variable Scope.

Here I take an Screenshot to show you how do you grant Items on player join the world once:

Grant Item once

It checks if the global variable with Type Logic and has Variable Scope Player Persistent is false it will add Items and set the variable to true to prevent Procedure to Grant Item again.

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
worked perfectly. thanks!
Fri, 02/19/2021 - 10:31

worked perfectly. thanks!

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And I give an extra tip: To…
Mon, 02/22/2021 - 06:51

And I give an extra tip: To make variables they change in GUI, make sure that the variable has Variable Scope Global Map, because Player Persistent will give every Player this Variable.