making a mob spawn when i sleep

Started by woofliss on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
making a mob spawn when i sleep

I have a mob that has a 50% chance to spawn when a player attempts to sleep, this works fine but I want it so that this chance only rolls the first time you attempt to sleep so you can't get in and out of the bed to farm the drop. This is the procedure I tried to use to do this, but it doesn't seem to work. https://imgur.com/a/zeXjJls Any suggestions? (I have a seperate procedure for when the player wakes up to set hasslept back to false) image