How do you make an item generator?

Started by swelkinn_n on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you make an item generator?

I want to make an item generator akin to that one mod out there, the one with things like a gold/iron/diamond/emerald generator that would spit out the respective material above them on a timer that you could upgrade with materials to make it faster or output more of that item

I ALMOST had it, but then it stopped working and was too fast and unchangable, and I've been at this for maybe 5 or 6 hours across several days and I'm done trying myself tbh

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have 2 ideas for this, one…
Wed, 09/15/2021 - 04:59

I have 2 ideas for this, one that includes GUi and other one that doesn't.

Non-GUI way: make 2 Global Variables (Faster) and (Duplicate)

on Block Tick Update, if block at X Y + 1 Z = Iron_Ore

//now the timer

   do Set Block NBT "Timer" to Get Block NBT "Timer" + 1

     if Get Block NBT "Timer" = 200 //2 seconds 

      do  If global:Duplicate

       do Spawn Gem iron_ingot at X + 1 Y Z  

            Spawn Gem iron_ingot at X + 1 Y Z 

       else Spawn Gem iron_ingot at X + 1 Y Z 

     else if Global:Timer = true AND Get Block NBT "Timer" = 100 //1 second 

       do 

  do  If global:Duplicate

       do Spawn Gem iron_ingot at X + 1 Y Z  

            Spawn Gem iron_ingot at X + 1 Y Z 

       else Spawn Gem iron_ingot at X + 1 Y Z 

I will my second idea in the morning

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
btw, if it doesn't work then…
Wed, 09/15/2021 - 05:01

btw, if it doesn't work then it is probably because I misunderstood what you were trying to do

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh and on Global:Timer,…
Wed, 09/15/2021 - 05:04

oh and on Global:Timer, replace Timer with Faster, sorry about that

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh and when you spawn the…
Wed, 09/15/2021 - 05:10

oh and when you spawn the gem, make sure to make Set Block NBT "Timer" = 0 

so the timer restarts