Item that can only be crafted once

Started by vOlive on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item that can only be crafted once

I am making a large combat mod! I am adding a few really cool weapons to the game but I want to make it so the same weapon can only be crafted once. I would be happy to make it so users would have to interact with a structure or something like that. But anything that avoids the crafting table and makes it so the weapons are one-time crafts.

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is just really bugging…
Thu, 12/19/2024 - 00:52

This is just really bugging me and I don't know what to do

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're saying this is a…
Fri, 12/20/2024 - 17:27

You're saying this is a large combat mod, so I am going to assume that you want to create multiple one-time craft items. You could create a block that the player has to craft to get the ability to craft these items. You could make so the player has to craft a sort of base for each item using the correct materials in the crafting table, and then activate the base with the block so the item becomes usable (activating as in right clicking on the block with the item on hand). Then, depending on whether you want it to be craftable once per player or world, you'd either use a player attribute that increases when they craft it and the block checks it is below a certain value (this way you can also create a gamerule that lets the player change the amount of that item they can craft) or create a global variable that is either a boolean or an int and make sure it is the correct value before giving the player the activated item. Hope this helps :)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would this work server-wide?…
Mon, 12/23/2024 - 14:42

Would this work server-wide? Like for a server.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think the global variable…
Mon, 12/23/2024 - 15:03

I think the global variable method would work server-wide, so long as you use the default scope of 'map'

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would this work server-wide?…
Mon, 12/23/2024 - 15:41

Would this work server-wide? So the item would be crafted and no player on the whole server could ever craft it again.