0

I am working on a project where I must make an ultimate skyblock map in Minecraft. I am using commands to generate mobs like cows and zombies. However, with the current despawn time in Minecraft, they fill up their islands and lag the game quite badly.

Here is an example of what I am doing now: /summon creeper ~ ~ ~ {Age:5900}.

This creeper should despawn after only 5 seconds, but it persists. Any suggestions are appreciated. Thank you in advance, and my version is 1.17.

3
  • Can you confirm if you are always using the value {Age:5900}? That seems like a very high value for 5 seconds. – user228576 Jun 12 at 13:25
  • Yes. It was supposed to DESPAWN after 5 seconds. Mobs despawn after 6000 ticks and 1 tick is 0.05 seconds. – Elliott T Jun 12 at 22:10
  • I also encountered the bizarre problem that this works for dropped items as well. – Elliott T Jun 12 at 22:18
0

For a 5 second lifetime, you need to use the command:

summon creeper ~ ~ ~ {Age:100}
0

You can always use scoreboards,

First type in chat: “/scoreboard objectives add Death air”

Add an always active repeating commandblock with “/scoreboard players add @e[tag=“Death”] Age 1”

Then add another always active repeating command block with “/kill @e[scores={Age=20}]”

(Note 20 ticks is one second, and since the repeating commandblock is basically reactivating every tick, each mob will be given their own 1 point every tick, and once they reach 20, that means they’ve been existing for one second.

You’re ofc free to change 20 to any amount of seconds such as if you want 6, you just multiply 6 • 20. Also note that you have to summon mobs with tags aswell as unlike despawning, the items drop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.