Skip to content

Conversation

@Blagish
Copy link

@Blagish Blagish commented Oct 21, 2025

Fixes #69
I saw that this issue was stale for a while, so I decided to tackle it.
Feel free to check out. I'd say it's mostly, if not fully, complete, with explosions, behaviour under the sun, and all that. I also added an explosion death message and a MOB_GRIEFING global, as it just seemed right.

However, I want to discuss a couple of questions to possibly improve this further.

  1. Right now, the creeper only damages the nearby players. Should it be expanded to all nearby mobs? Kinda scared about efficiency here. It's not like there's hordes of mobs loaded, I know, but still...
  2. Caboom timing. Right now, it's a couple of seconds, and only if the player is standing completely still - I haven't touched the movement code. So, it's pretty easy to avoid being exploded (given you noticed them in advance with their complete silence :D) Should it be altered for a more classic behaviour? Just wanna hear some feedback how it feels. Altered it to a more fair behaviour.
  3. Damage. Right now it's 5 hearts. Maybe pump it to like ~10? The fact that there's no sounds and no item drops would make an insta-kill or a near insta-kill quite unforgiving.

Full list of additions:

  • Creeper mob, with according drops and behaviour
  • MOB_GRIEFING global (defined by default)
  • placeCraterStructure function, which fills a sphere of given radius with air
  • "blew up" death message

@BriellaBugs
Copy link

BriellaBugs commented Oct 21, 2025

Definitely pump the damage up, 4 creepers for a kill sounds too lenient

Edit: Nevermind I read as 5 damage, not 5 hearts

@p2r3
Copy link
Owner

p2r3 commented Oct 24, 2025

Code looks good at a glance. I don't have the time to properly review this right now, I'm hoping I don't forget to come back to this.

@Blagish
Copy link
Author

Blagish commented Oct 24, 2025

Added reducing panic when the player runs out of its range, also refactored attack checking code a bit for a more flexible approach. Should run basically the same, but, of course, I welcome any critique. Moved the block destruction to a later point in code, and now it looks a lot smoother.

Also the animation of blowing up is here now. Haven't touched it before, as I thought for some reason that that would be non-viable, but it turned out kinda free. I used the pose attribute of EntityDataValue, as it is too an int (just renamed it for good cause).

...honestly, it's a shame that I found this project kinda late, when all the hype has died down... it's fun. I'd like to keep doing this and solving these little optimization puzzles.

@ccuser44 ccuser44 mentioned this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Idea: Creepers

3 participants