Tag: books

  • Hacking Minecraft Java Edition with chastehex

    The save files on my Linux machine are here:

    /home/chastity/.minecraft/saves/

    I decided to see if my chastehex program would be any use at editing save files of Minecraft.

    The first step is to use chastecmp (another program I wrote) to compare two files of slight differences.

    The first target was the level.dat file. I had created a new world, collected 3 oak logs from a tree, and saved.

    Debian Linux detected that the level.dat file was actually a gzip archive. Therefore, to get the true data, these commands are required. The first copies it so that it has a “.gz” extension. The second decompresses it.

    cp level.dat file0.gz
    gzip -d file0.gz
    

    Now there is a file named file0 which has the raw data uncompressed. The next step is to load up the game, make a small change and then resave the file. I threw away one oak log so that I had 2 instead of 3. Then I saved the game and ran these commands to get the uncompressed data for the second file.

    cp level.dat file1.gz
    gzip -d file1.gz
    

    I compared the two files with chastecmp:

    chastecmp file0 file1

    And the result was:

    file0 Opened OK
    file1 Opened OK
    00000052 48 CF 
    000003E9 48 CF 
    000007FE 48 CF 
    000009F0 03 02 
    000011D2 69 68 
    000011D3 0E 87 
    000011E5 FB 74 
    0000124B 72 81 
    0000124C EE C7 
    0000124D 99 BA 
    file0 has reached EOF
    

    It appears that address 9F0 contains the amount of oak logs in the first item slot in the game.

    I ran this command to change that byte to 20 hex/32 decimal

    chastehex file0 9F0 20

    The next step is to recompress the data into a level.dat file that the game expects to load.

    gzip -k file0
    cp file0.gz level.dat
    

    Amazingly, when I loaded the game, I did in fact have 32 oak logs. Obviously this process requires multiple steps and is painfully slow, however it proves that my command line tools can hack Minecraft because there is compression but no encryption in the files.

    The level.dat file seems to contain the player’s inventory and other important data. I remember this from experiments with it years ago.

    Warning

    The addresses and what they mean can change wildly as new data is added to the file. For example, I found a village and there were 5 iron ingots in a chest. I repeated the steps above to create two uncompressed files.

    The difference between the files in this case were that I threw 3 of the ingots on the ground and so the number had changed from 5 to 2 in the chastecmp file0 file1 output

    00000F5F 05 02

    So then I ran the command to change the count to 64 (40 hex)

    chastehex file0 F5F 40

    Upon recompressing the file and putting it back in the game folder, I did have 64 ingots. I had previously tried numbers higher than 64 but unfortunately the results were not good. I ended up with only one ingot instead. Therefore, it is good to stick within the limits of what the game expects for the cheating to be successful.

    But because the addresses change as new data gets added to the game, cheating by hex editing is painfully slow on Minecraft. This is best done on a brand new world, both because the data is small and also so that you don’t corrupt worlds you have been playing on longer.

    But I did it as a proof of concept just to see if the programs I wrote can be used to hack Minecraft. The answer is yes, with a little help from gzip for decompression and recompression.

    But what if I told you there was an easier way to cheat at Minecraft Java Edition? You see, the secret still lies with the level.dat file. You don’t actually need to use chastehex, chastecmp, or compression. This is because the file contains the player inventory but not the items they have stored in chests in the world! This allows for item duplication.

    So place the items you want to duplicate in your inventory. Then save the game and backup the file.

    cp level.dat backup.dat

    Then place those items in a chest then save again. Restore the file you backed up earlier.

    cp backup.dat level.dat

    When you reload the game, the files will still be in the chest but your player will also be holding them. This means you can infinitely duplicate any item you can obtain in the game normally by just copying save files repeatedly.

    Why then, did I go through the process of showing how to cheat with chastehex? Because the point is not so much about hacking the game, or what the game is, but it is about testing the programs I wrote. I care more about my C and Assembly programming skills than I do the outcome of a game.

    The point is not whether you win or lose the game. The point is that the game was made by humans and can be broken by humans. Sometimes, as in Castle of the Winds or Cave Story, hacking with a hex editor is the most reliable method. In a game like Minecraft, sometimes cheating is easier because of player and world data being in completely separate files.

  • Professional vs Open Source

    I totally spent 5 hours writing a program in Assembly Language. I realized that what I am doing is something that cannot be done for money in any way. The best that I can do is to learn the technical skills and then continue working on my books and API references I plan to write.

    But as far as my programs themselves, they don’t fit the model of how the world works. In a job, you are constantly pressured to do as much work in as short of a time as possible. Therefore, you are paid, hired, or fired based on how fast the program can be written for the client, regardless of whether it works correctly or has bugs or security flaws.

    But when I write computer software for myself, I am the only one to decide whether it meets my standards. I have said many times over the past 20 years that I would not want a job as a programmer. This is because I am only interested in the things I want to do. I find that I am at peace when the things I do are not attached to the love of money.

    I believe that money and the corporate world actually ruins top quality work. There are also things that the Open-Source Software movement has made possible that could never be done under a company with a proprietary system. Strangers who don’t even know each other offer improvements on programming forums to people out of the goodness of their heart with no financial incentive.

    I see something similar in the world of Chess. People who are playing for fun can enjoy the game at a higher level than those who are stressed out competing in tournaments to win money. I sometimes feel myself pulled in a direction I didn’t know existed. I will work to explore this feeling I get where I achieve inner peace for a moment when I am having pure fun and losing track of the time.

    I used to feel this way when playing video games as a kid. Now I get it from writing books, blog posts, and computer programs. I still enjoy games though. I plan to eventually getting back into my games but I have had a busy life lately.

  • Life and Career Update

    A lot of cool things have been happening in my life lately. Most of it is good news. I have not been posting on my blog much because I have not had the time. I started a new department at Walmart and so far I enjoy it better than stocking. I work in Maintenance which really means I am helping clean the store. Sometimes emptying trash, sometimes sweeping or scrubbing the floor, and sometimes cleaning the bathrooms, which is difficult only because there are a lot of little things to remember such as filling the supplies and also mopping the floor in the correct way.

    But I think what I love most about my new job as a Maintenance Mop Monkey is how my brain is free to think of other things while I am working because it takes a lot less concentration than stocking does. What am I thinking of during this time? The image below is a fine example of my thoughts!

    I have been programming in Assembly Language for DOS lately. I find Computer Programming to be suspiciously relaxing because the world of math and computers is one where humans can’t hurt me.

    The only risk I face while on my computer is when I get on social media and see hateful things directed at Transgender people, immigrants, or people in other countries. There are plenty of things I could say about what is going on in the world. However, I am not going to do any of that because I have realized that to become a better writer, programmer, and Chess player, I must maintain my supreme autistic focus because that is my gift from God.

    Anyway, when computer programming, there are only numbers. The arithmetic operations of addition, subtraction, multiplication, and division never change and I can count on them more than I can people. My time is better spent improving my code and working on my current book project for teaching DOS Assembly Language. I have even created a simple cover for it.

    The theme is black background with white text because this is the way the DOS (Disk Operating System) looks.

    The goal of this book is a little bit different than most of my books. In fact the target audience for this book is very niche. People don’t write programs for DOS unless it it for fun. There is no money in being able to write programs for DOS because the rest of the world has moved to Windows, MacOS, and Linux which support 32 and 64 bit systems with more capability and 16 bit DOS.

    Instead, this book will be my first computer programming book for the purpose of both teaching Assembly Language to the nerds of the world and as an exercise of my Technical Writing skills. This will be the third technical writing book.

    The first book was Chastity’s Chess Chapters for teaching Chess to people of every kind.

    The second was Minimal Markdown for Authors for teaching other writers how to format and publish their books using similar methods to what I have used.

    This next book, Assembly Arithmetic Algorithms, will be my entry into publishing books about computer programming. This special interest of mine has gone largely ignored because people who write computer programs are *not normal people at all! Computer programming takes concentration, lack of a social life, and the ability to read a lot! I read programming tutorials and books when I have free time. Some of them are free online and others I have bought from various sources in paperback and digital form.

    I can’t claim to be a great programmer, but what I can do is squeeze the information I have learned into a form that allows other people to learn the same things faster. Aside from teaching Chess, I also volunteer to teach computer programming to friends who are interested in learning. I can easily throw together lessons based on questions they have. Where I will find the time for this? I don’t have a clue.

    But the goal of writing books and recording video tutorials is so that eventually I can have a career that does not depend on working at Walmart forever. Although Walmart is going fairly well, I know that the wrong people in management can take away my job if they feel like it. What they cannot take away is my writing, math, and computer skills which I hope will make a difference for people even after I am long dead.

    Also, my Creative Writing diploma finally came!

    I found my time with Full Sail University to be quite positive. I was inspired as I learn the potential there is for someone with the patience to write. My experience with Open Source Software will also be an asset to me because I can use tools that no college or tech company even will know about.

    As I think about possible careers, I think how much potential I have in terms of experience at previous jobs but also skills of writing and technical details that most people simply haven’t learned because it takes someone with the willingness to learn for the fun of it even when there is no promise of financial gain. If I do make money in a future career using my skills, that is great, but it is not the primary motive.

    I remember the words of Carol Keepes who used to be my Assistant Manager back in 2012 when I was a courtesy clerk at Hy-Vee. She said “90% of what people do, they wouldn’t be doing if it wasn’t about money.” I think about this often and it is the reason I have made decisions in life that look foolish to most of the world. I want to make sure that I did things because I really loved the process rather than viewing them as a means to an end.

    See my post The Prayer of Saint Chastity for clarification on my priorities.

  • Book Preview: Minimal Markdown for Authors

    Minimal Markdown for Authors

    How to Write and Publish a Book Using Open Source Software

    Chastity White Rose

    Preface

    Hello, I am Chastity White Rose, an author of several books. My best quality work is Chastity’s Chess Chapters.

    When I wrote that book, I was looking for a convenient way to place pictures in the book to demonstrate how to play Chess. I tried using LibreOffice because it had worked so well for all of the previous books I published. However, once images were added, I became frustrated with the menus and various settings that I knew nothing about. Writing a bunch of text and saving it was easy enough, but the images were not fitting, and the words were being displaced as I did it. It was the worst formatting experience of my life.

    However, my solution was found when I discovered the Markdown Guide. I first discovered this amazing new language called Markdown because I am a hobbyist computer programmer, and I have a lot of code on Github. Github projects use a “readme.md” to display information about the project on almost every repository. I knew that these files displayed images as well as text on GitHub, so I tried to figure out what a “.md” file even was.

    As it turns out, Markdown is a markup language that is similar to HTML (Hyper Text Markup Language). The difference is that Markdown is easier to write than HTML. Markdown is easy to convert to other formats, and that is what makes it the perfect tool to use when you are an author and are writing a new book.

    Therefore, I have used it for all of my books since I discovered how useful it is. Because Markdown is only a language, it needs to be interpreted or translated by computer software into its final form. Because of my experience using Markdown and reading books about it by other authors, I have learned about extremely useful software to assist me as a writer who often publishes a book or blog posts on WordPress. In this book, I will be covering some of the tools that I use the most.

    Introduction

    You may wonder what Markdown is and why I would suggest using it. I have 3 main reasons.

    • Markdown is easy to write in because it only requires a text editor on any PC. Even plain Windows Notepad can work, but I will be introducing even more advanced tools that let you preview the final result while you are writing.
    • By using Markdown, you can save money by avoiding the need to use Microsoft Word and remembering what menu options to click to make text bold, italics, or include images or links in your book. You don’t need a word processor at all unless you need advanced control over formatting. Even then, I will teach you how Libre Office Writer can be used, which is entirely Free and open source. For the non-technical reader, Open Source means it can run on Windows, Mac OS, and Linux (I use Debian Linux personally).
    • Markdown is a way to preserve your writing so that no matter what software or computer you have in the future, you will not lose access to your work. If you were to rely on Microsoft Word, then you would find yourself paying a subscription fee for the rest of your life or being unable to open your .docx files. Even then, there is no guarantee that the file won’t become corrupted or stop working whenever a new version of Microsoft Word is installed. Markdown is just plain text with a few formatting marks, and you will always be able to open it using any text editor you have for any device.

    Writing in Markdown is so easy that I can explain how to use it with an example:


    # Book Title
    
    ## Chapter 1
    
    This is the first paragraph of chapter 1.
    
    This is the second paragraph of chapter 1.
    
    This is the third paragraph of chapter 1.
    
    ## Chapter 2
    
    This is the first paragraph of chapter 2.
    
    This is the second paragraph of chapter 2.
    
    This is the third paragraph of chapter 2.
    

    If you have that text in a program capable of displaying the converted output, it will look something like this:

    basic-book-example.png

    Do you notice how the Book Title is larger than the chapter titles? This automatic sizing works because the single # at the beginning of a line means a level 1 heading. Two of them at the beginning is a level 2 heading. There are 6 levels of headings, from big to small. Defining something as a heading may not seem like much, but it serves two purposes. First, a human reader can know when there is a new chapter or section of a book. Second, if your book is published as an e-book, the software that humans use to read it will automatically know where the headings are and can build an automatic table of contents even if you did not create one. This automatic linking ability means they can click and instantly be taken to the chapter they want to read.

    All you had to do was insert a few # signs at the beginning of a line followed by a space. The rest of the text on that line will look different from the smaller body text. Which exact font families and sizes are used depends on the software you are using, but this means that you can customize it! I will explain more about that later!

    But Markdown is not limited to defining your chapter headings. It can do a lot more!

    For example, images can be displayed. For example, the following line links to an image of a horse on my blog.

    ![square-horse.png](https://chastitywhiterose.com/wp-content/uploads/2020/11/square-horse.png)

    square-horse.png

    Because this image is hosted somewhere, this horse can be included and displayed in a book, just as can be done on a website with HTML. However, it only works if you are connected to the internet at the time (unless the images are embedded into a book file, as can be done with Pandoc)

    It is also possible to make a clickable link within a book. Note that this only applies to e-books because, in a paperback, everything is paper and ink, not an electronic device.

    For example, the following is a link:

    https://chastitychesschallenge.com/

    But the following is also a link:

    chastitywhiterose.com

    The Markdown code to include the links above is:

    <https://chastitychesschallenge.com/>
    
    [chastitywhiterose.com](https://chastitywhiterose.com/)
    

    Notice that the first one, which is already in URL form, is simply enclosed in greater and less than signs. The second has the URL in parenthesis, but the text that will be displayed is in square brackets. Both of these things work fine, but the second form allows the link text to be whatever you want it to be.

    You can also make text look:

    • italic
    • bold
    • both italic and bold at the same time!

    The Markdown code to do this looks like this:

    You can also make text look:
    
    - *italic*
    - **bold**
    - ***both italic and bold at the same time!***
    

    It all depends on whether you include 1, 2, or 3 * characters surrounding the text you want to modify.

    So far, we have seen that you can define which text is your headings, make clickable links, display images, and even set bold or italics however you want.

    But that is just the beginning of what you can do. I will be sharing with you the tools that I use when writing and converting my Markdown text into different formats for publishing books to Amazon and Draft2Digital.

    My job is to teach you the methods you can use to get your book properly formatted on your computer so that you can either sell it, give it away, or turn it into a website if that is what you wish! I have been writing and publishing books since 2013, and over time, I have become better as a writer but also better as a computer user in general.

    If you are a person who wants to write a book, it is still your job to write it in a way your readers understand and make it worth their time to read. However, if you follow my instructions, your book will look correct, and they will see where chapters begin, your regular, italic, or bold text, and your pictures if you choose to include any.

    This book will contain pictures because I am providing instructions on how to use software to achieve goals for publishing.

    Chapter 1: Writing tools

    There are literally hundreds of tools for writing Markdown than you can imagine! For this book, I will be limiting it to my top 3 favorites!

    All 3 of those apps are useful for their ability to preview the output of what the source Markdown code will look like. For a PC with Windows, Mac, or Linux, Ghostwriter is especially helpful because it works directly with plain text files on your system, just like Notepad does. It also allows a preview, just like Joplin and Simplenote do. For Mobile devices, Joplin and Simplenote are the best.

    Ghostwriter

    I started using Ghostwriter because it works on Linux. However, it works the same on Windows or Mac operating systems. If you are writing a book for publishing, this is the number one that I recommend and is the tool I used to write this whole book. Let me show you why I love it so much by showing you some pictures!

    Dark Mode

    Screenshot-ghostwriter-dark.png

    Light Mode

    Screenshot-ghostwriter-light.png

    Besides the dark and light modes, the program does allow you to define customized themes. I have not personally explored this option because I am quite satisfied with the default dark mode.

    In both of the images above, you see three panels. The middle is the text you are writing. The right is the preview of what it might look like on a website or a book (subject to formatting, which I will cover in a later chapter). The left is a navigation panel that allows you to jump to the specific heading you want. If you are writing a long book, you might want to jump to chapter 9, for example, where you were writing last time, for example.

    Ghostwriter is pretty good. It is not the only program of its type, but it certainly has gotten the job done for several of the books that I have published and republished.

    If you only use Windows and don’t care about Open Source, you might also like Markdown Monster, which is very similar to Ghostwriter.

    Joplin

    The next tool that I recommend is Joplin. If you look at the screenshot below, you will see that it is similar to Ghostwriter. However, Joplin’s file system is separate from the rest of your PC. This system allows you to organize your notes into folders called “notebooks”. They can also be searched to find what you are looking for.

    Screenshot-Joplin-PC.png

    From the perspective of PC, Joplin is about the same in terms of quality as Ghostwriter or Markdown Monster. However, the main reason I recommend it is because it also functions as a mobile app.

    Screenshot-Joplin-iPhone.png

    It is even possible to set up a system for automatically syncing between your PC and phone by using an online server. I actually use a private Nextcloud server to sync my PC, iPhone, and Android phone so that no matter what device I use to take notes on, it will show up on the other devices. However, this ability to customize is more advanced, and you will want to read the Joplin documentation, which is included in the app and on the official Joplin website.

    Another feature that is unique among Markdown editors is that it has the option to attach images from either the PC or Mobile app and then have them displayed in Joplin. When you do this, then that file becomes part of the data that Joplin stores. The attachment feature of Joplin could be especially useful if someone was taking a lot of pictures with their iPhone camera and wanted to write about each of them and make a small book of a portfolio or photo album.

    If you are always on the go, Joplin might be for you. Also, it does not require creating an account unless you need syncing capability. Therefore, if you want a way to organize your notes into folders and don’t have a reliable internet connection on your phone, then Joplin is pretty good as far as mobile apps go.

    If you use a PC and don’t use your phone as a writing tool, you can probably just stick with Ghostwriter, as mentioned in the previous section.

    Simplenote

    Simplenote is another Markdown editor that has desktop and mobile apps. However, it works a little bit differently in that you create an account with your email address, and then you can get a login code sent to your email to sign in.

    If syncing between devices is a primary concern for you, I have to recommend Simplenote because accessing your data on any device where you are signed in is trivial. Simplenote really is simple. It does not have all the fancy features of the other two programs I have recommended above, but because it doesn’t contain much, it is also easy to use without getting lost in the interface.

    Of course, the primary purpose of Simplenote is to write down your notes quickly on the go. Later, when you want to collect them into a book, you will still want to copy and paste the text into Ghostwriter or Joplin on a PC, so you can make use of the exporting features of these to archive and send them to publishers or your friends.

    I use Simplenote all the time whenever I have an idea that I need to write down on my phone and then later finish it on my PC before I post it to my blog or email it to someone. The most recent notes you have written are always at the top, so you can go through them and then do what you need to before deleting them after you no longer need those notes.

    I haven’t included a picture of it because it really isn’t that fancy. It also does not show you the Markdown preview while writing. You have to click a button to see it, but it does have Markdown support. However, to be able to include images in your notes, they have to be stored somewhere on the internet. Therefore, I would recommend storing images on a website where you can link to them. Fun fact: all of the pictures in my Chess book, Chastity’s Chess Chapters, were stored on my WordPress blog about my Chess teaching business.

    Other Editors

    It is not that important that you use one of the 3 programs I have recommended in this chapter. A plain old text editor will do just fine, but you will not have the ability to preview the result.

    You can also use an online Markdown editor.

    The reason I mention WordPress as an online Markdown editor (even though it does a whole lot more) is because it has full support for Markdown via its Markdown block type, which allows you to paste your text into it and preview the result even before you post. In fact, all of my blog posts have been written in Markdown since the beginning of 2025. When making a new post, you can type / and then select the Markdown block from the dropdown menu.

  • Chapter 6: Can someone be Gay and a Christian?

    Many people are told by their Christian friends, family, and church members that being a Christian and being gay are incompatible. This controversy has led many LGBTQIA+ people away from Christianity to seek out other religions or become atheists because they believe they have no choice.

    I know this because I was once in a similar situation. Although being an Asexual Transgender person has allowed me to effortlessly live a life of celibacy, as many religious people say is the only way for an LGBTQIA person to live, it does not allow me to be accepted by most Christians.

    And let’s be honest about one thing. Most non-LGBT people don’t even know the difference between being Transgender and Gay. Who can blame them? After all, we are all suspiciously fabulous.

    And although I am Asexual, many people believe it is just my denial of my homosexuality. But I don’t deny that I have gay moments 1 percent of the time like that one time I bought a loaf of sourdough bread at the Hy-Vee bakery just because the guy who worked there was cute.

    But the main point is I know I will never be accepted by most who call themselves Christians. However, I have come to my understanding with God over time and have learned to conveniently ignore the opinions of people who pretend they know about my “sinful lifestyle” when they don’t know anything about me because they haven’t spent time with me.

    I am not the most qualified to write about all the controversies between an LGBTQIA identity and what the Bible or church tradition says. However, I know some authors that have been a great help to me. I want to recommend 3 different books written by 3 different authors.

    Walking the Bridgeless Canyon: Repairing the Breach Between the Church and the LGBT Community by Kathy Baldock

    Torn: Rescuing the Gospel from the Gays-vs.-Christians Debate by Justin Lee

    God and the Gay Christian: The Biblical Case in Support of Same-Sex Relationships by Matthew Vines

    All of these books contain historical context and differences in translation between different Bible versions. Justin Lee and Matthew Vines are both gay men who can speak from personal experience in reconciling their Christian beliefs with their gay reality. Kathy Baldock is not LGBT at all, but she started researching this topic because of her experiences with her gay friends.

    These books have been helpful to me, but before I found books like this to offer me a new perspective, I had a different way of handling the situation. Instead of seeing my identity as a sin and rebellion against God’s design, I think of the example of a butterfly. The following is a post I wrote about it.

    The Meaning of the Butterfly Hairclip

    Chastity stood before the mirror. She was fully ready for work. She had just put her hair in a ponytail using the butterfly hair clip she bought at Walmart, where she worked.

    She took a good look and realized how much she loved the way she looked. The sight of her always inspired people to ask her whether she was a boy or a girl. The truth that Honesty the Unicorn had given her was that it was complicated.

    And it is. Chastity did believe that there were two genders, but she knew that she was both of them. Just as the chessboard is half black and half white, so was she more than one thing. Her brother-in-law joked about how she was the best of both worlds. She was both and yet unmistakably felt that a female identity suited her better.

    After all, Chastity is known as a girl’s name. Of course, it was assumed that if someone vowed celibacy, it had to be a female. So, she knew she was a female Vegan Virgin.

    But if a man can also take the same vow. He would be Mister Chastity. It was true that Chandler and his experience would always be a part of Chastity.

    But of course, Chandler had transformed into Chastity just like a caterpillar turns into a butterfly. The symbolism of the transformation of the caterpillar is what her hair clip truly meant.

    People say that a picture is worth a thousand words. Chastity now knew this to be the truth. She had thousands of words to say. But humans say a lot of things that make no sense. Some say that God does not make mistakes. To those people, Chastity often joked that they would think differently if they ever looked in the mirror.

    But now, Chastity was standing in front of the mirror. She did not see a mistake at all. She was a hybrid of a man and a woman. Her mother was a writer and poet. Her father was a chess player and kept huge amounts of data on computers about his genealogy.

    Chastity stored gigabytes of data of a very different type. Chastity stored words and pictures on her computer and cell phone. Sometimes, she even used artificial intelligence to turn her words into songs. She wasn’t a musician like her mother was, but she definitely could sing.

    Chastity was the hybrid of her parents, but she was more than that. She had both the body and soul of a genderfuck, although she does not fuck anyone of any gender. Because she is Chastity White Rose, the Vegan Virgin, in this, God did not make a mistake.

    Some said that Chastity was sinning by transitioning to a new name and female identity because God had intended for Chastity to remain a man. But no one would tell a butterfly that it was wrong to transform because that was exactly how God planned it. Who are these humans who claim to know what God had intended for Chastity? She was like a butterfly, and when she wore her hair clip, only those who knew this secret meaning could understand how beautiful it was. Chastity finally had her wings.

    butterfly.png