r/madeinpython • • Jan 07 '22

python program that causes your computer to bluescreen when you die in Minecraft

Made a simple python program that causes your computer to bluescreen when you die in Minecraft

It was a pretty simple program to make, and I thought I'd share it here in case anyone else would like to try it out and give me some feedback

It currently only works on Windows but I'm hoping to port it to macOS and Linux

source: https://github.com/EmeraldIngot/dontdie-minecraft/

28 Upvotes

6 comments sorted by

8

u/iamaperson3133 Jan 07 '22

You can probably cleanup the code by factoring all the death strings into a list, then just looping over that list each time in the main loop. You could even read the list in from a file instead of hard coding it, which might make it easier to update.

1

u/EmeraldIngot64 Jan 07 '22

Yeah that would be a better idea.

I tried something like that before though, and the problem was that if you died by say, getting pricked by a cactus, and falling from a high place was listed after a cactus, it would check if you died by cactus and set the variable index to be something other than -1, then it would check if you died by falling and set the index back to -1, and the program would never work.

I guess I have to have it run the detectdeath function after every entry in the death messages list and seeing if the index is not -1

8

u/[deleted] Jan 07 '22

[removed] — view removed comment

12

u/mustitisnt Jan 07 '22

Why would you not wont this?

1

u/KingsmanVince Jan 07 '22

If you play Hardcore