CodeMouse92 / no-monster-minecraft

A data pack for Minecrafters who like playing without monsters.
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Fixes, GitHub Actions, small potentially useful additions #7

Closed cafuneandchill closed 2 years ago

cafuneandchill commented 3 years ago
CodeMouse92 commented 3 years ago

Two potential problems with this fix:

  1. You'd need to verify that loot tables would be unaffected if a mob is allowed again.
  2. I don't want death sounds constantly. The prior approach was silent; this needs to be too.

If you can verify that neither of these things are a problem, then I can test on my end too.

cafuneandchill commented 3 years ago
  1. Loot tables are affected only for the mob entities themselves, not the whole mob type. The DeathLootTable contains a reference to one of the pre-defined loot tables for different mobs; setting it to empty doesn't affect neither the mob types nor the loot tables themselves.
  2. The only death sounds that are clearly audible on my setup are the ghast sounds. I'll see what I can do about that. For now, I still recommend you check it out, too. Maybe some other problems I'm not aware of will surface in the process.

EDIT: It's possible to silence mob entities with the following command:

execute as @e[type=MOB_TYPE] run data modify entity @s Silent set value true

I'll add those, so that they get executed for each mob, just to be safe.

embeddedt commented 3 years ago

Problem: on my machine the death animations are visible, as well as the death particles.

cafuneandchill commented 3 years ago

Problem: on my machine the death animations are visible, as well as the death particles.

Yeah, same on mine. I'm thinking on what can be done about that, but, the thing does its job, at least. I'll experiment some more with different entity NBT tags and, maybe, will come up with something.

embeddedt commented 3 years ago

I saw this on Reddit. It will set the death animation to be on its final frame. Unfortunately it doesn't appear that you can prevent it altogether. No idea if it helps or not. I'm also not sure whether it needs to be run before or after the kill command.

data merge entity @s {DeathTime:19}
CodeMouse92 commented 3 years ago

I think we can get around the death animation by teleporting first (in current dimension ofc), and THEN killing...although the silence and no-drop commands will probably not be needed anymore at that point. Teleporting in itself should not cause the lag. I think it was the number of creatures waiting to die of void poisoning that led to issues.

cafuneandchill commented 3 years ago

I think we can get around the death animation by teleporting first (in current dimension ofc), and THEN killing...although the silence and no-drop commands will probably not be needed anymore at that point. Teleporting in itself should not cause the lag. I think it was the number of creatures waiting to die of void poisoning that led to issues.

Hmm, I don't know about that... I did a similar thing by writing these commands for each function:

execute as @e[type=MOB_TYPE] in minecraft:DIMENSION run teleport @s ~ -100 ~
kill @e[type=MOB_TYPE]

However, that still didn't work exactly right -- the mobs were killed not only in the void, but also on the ground as well. This seems to be affecting mobs that are outside of the dimension set in the command (i.e. DIMENSION). Removing the in <dimension> subcommand causes some mobs to not teleport (such as the endermen in The End).

EDIT: I've included the test build: no-monster-minecraft__test.zip

cafuneandchill commented 3 years ago

I saw this on Reddit. It will set the death animation to be on its final frame. Unfortunately it doesn't appear that you can prevent it altogether. No idea if it helps or not. I'm also not sure whether it needs to be run before or after the kill command.

data merge entity @s {DeathTime:19}

I've tried that on my dev branch and, honestly, it doesn't look any different from just teleporting mobs to negative Y values and then killing them off.

cafuneandchill commented 3 years ago

Did some more stuff. Check PR #8 on my fork.

CodeMouse92 commented 3 years ago

Hm, all told, the particles aren't so bad. They're quite a bit less intrusive than the flickering mobs we currently get, and better than seeing the last frame of the death animation.

cafuneandchill commented 3 years ago

It's also possible to turn those particles off with OptiFine's Animations > Explosion Animated setting.

Well, I think that's about as much I can do about the mobs.

CodeMouse92 commented 3 years ago

Quite probably. I'll take a look at this PR hopefully this evening. I'm starting a new job on Monday, and trying to deploy the cloud services for an entire remote team before then. Eeeeek!

cafuneandchill commented 3 years ago

Good luck!

CodeMouse92 commented 2 years ago

Sorry for the delay. I have no free bandwidth this year, it seems. I'm leaving this "unread" in my notifications so I will in fact get around to it properly. Eeek.

cafuneandchill commented 2 years ago

It's alright, take all the time you need :)

пн, 6 дек. 2021 г., 21:50 Jason C. McDonald @.***>:

Sorry for the delay. I have no free bandwidth this year, it seems. I'm leaving this "unread" in my notifications so I will in fact get around to it properly. Eeek.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CodeMouse92/no-monster-minecraft/pull/7#issuecomment-987063808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMIUYTECFMCEKV5XOKILQLUPUAXXANCNFSM455DOC4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

CodeMouse92 commented 2 years ago

Thank you SO MUCH for this!

I've separated out and merged in the changes surrounding mob spawning. I'm still interested in your other additions, but would need each one in a dedicated PR. (I promise to review and merge them in WAY LESS than a year this time!)