{"id":2831,"date":"2025-12-24T10:00:06","date_gmt":"2025-12-24T15:00:06","guid":{"rendered":"https:\/\/www.mymiller.name\/wordpress\/?p=2831"},"modified":"2025-12-24T10:00:06","modified_gmt":"2025-12-24T15:00:06","slug":"minecraft-functions-meets-java","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/java\/minecraft-functions-meets-java\/","title":{"rendered":"Minecraft Functions meets Java"},"content":{"rendered":"\n<p>My son has gotten into Minecraft and Star Wars.  He wanted the two of us to build the Death Star in Minecraft.  That is not a small undertaking.  I got thinking about it, and came up with the idea to use Java to create function files that would create the sphere for us.  So I present here the code for doing so.<\/p>\n\n\n\n<p>First thing was to create some constants for the block names that I would be using.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public static final String CONCRETE = \"concrete\";\npublic static final String NETHER_BRICK_FENCE = \"nether_brick_fence\";\npublic static final String GLASS = \"glass\";\npublic static final String SEALANTERN = \"sealantern\";\npublic static final String BARRIER = \"barrier\";\npublic static final String AIR = \"air\";\npublic static final String MAGMA = \"magma\";\npublic static final String BLUE_CONCRETE = \"concrete 3\";\npublic static final String EMERALD = \"emerald_block\";<\/code><\/pre>\n\n\n\n<p>Next I needed to define a block placement.  So I created the Block class.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class Block {\n        int x;\n        int y;\n        int z;\n        String type;\n        String description;\n\n        public Block(Double x, Double y, Double z, String type, int px, int py, int pz, String description) {\n            this.x = x.intValue() + px;\n            this.y = y.intValue() + py;\n            this.z = z.intValue() + pz;\n            this.type = type;\n            this.description = description;\n        }\n\n        public Block(int x, int y, int z, String type, String description) {\n            this.x = x;\n            this.y = y;\n            this.z = z;\n            this.type = type;\n            this.description = description;\n        }\n\n        public int getX() {\n            return x;\n        }\n\n        public void setX(int x) {\n            this.x = x;\n        }\n\n        public int getY() {\n            return y;\n        }\n\n        public void setY(int y) {\n            this.y = y;\n        }\n\n        public int getZ() {\n            return z;\n        }\n\n        public void setZ(int z) {\n            this.z = z;\n        }\n\n        public String getType() {\n            return type;\n        }\n\n        public void setType(String type) {\n            this.type = type;\n        }\n\n        public String getDescription() {\n            return description;\n        }\n\n        public void setDescription(String description) {\n            this.description = description;\n        }\n\n        @Override\n        public boolean equals(Object o) {\n            if (this == o) return true;\n            if (o == null || getClass() != o.getClass()) return false;\n            Block that = (Block) o;\n            return x == that.x &amp;&amp;\n                    y == that.y &amp;&amp;\n                    z == that.z;\n        }\n\n        @Override\n        public int hashCode() {\n            return Objects.hash(x, y, z);\n        }\n\n        public String toCommand() {\n            return \"setblock \" + x + \" \" + z + \" \" + y + \" \" + type;\n        }\n\n        @Override\n        public String toString() {\n            return \"Block{\" +\n                    \"x=\" + x +\n                    \", y=\" + y +\n                    \", z=\" + z +\n                    \", type='\" + type + '\\'' +\n                    \", description='\" + description + '\\'' +\n                    '}';\n        }\n    }<\/code><\/pre>\n\n\n\n<p>The Block class has two constructors.  One that takes a relative set of coordinates and a second that takes a specific set of coordinates.  The toCommand() is used to output the command that is needed to set the block.  <\/p>\n\n\n\n<p>I implemented the equals() to check if a block exists in that location already, as I didn&#8217;t want to have redundant setblock calls.<\/p>\n\n\n\n<p>Now to maintain my list of Blocks that I have created, I use a synchronizedList, as I use streams and parrellel streams to speed things up.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>List&lt;Block&gt; blocks = Collections.synchronizedList(new ArrayList&lt;&gt;());<\/code><\/pre>\n\n\n\n<p>Now for reference on my variables I used these as my center point for building:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>double radius = 100.0D;\nint px = 500;\nint py = 500;\nint pz = 120;<\/code><\/pre>\n\n\n\n<p>Radius of 100 is pretty big, and I do mean pretty big.  Building on this scale is slow, but it pays off in the end.<\/p>\n\n\n\n<p>Now then to create the sphere is the call I made:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shell(radius, blocks,  px, py, pz, 0.1D);<\/code><\/pre>\n\n\n\n<p>Here is the implementation of the shell():<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void shell(double radius, List&lt;Block&gt; blocks, int ppx, int ppy, int ppz, double increment)  {\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for(double angle = 0; angle &lt; 360; angle = angle + increment) {\n            angles.add(angle);\n        }\n\n        final ArrayList&lt;Double&gt; angleX = angles;\n        final ArrayList&lt;Double&gt; angleY = angles;\n\n\n        angleX.parallelStream().forEach(px -&gt; {\n            angleY.stream().forEach(py -&gt; {\n                double x = radius * Math.sin(px)*Math.cos(py);\n                double y = radius * Math.sin(px) * Math.sin(py);\n                double z = radius * Math.cos(px);\n\n                Block block = new Block(x,y,z, CONCRETE, ppx, ppy, ppz,\"Shell\");\n                if(block.getX() % 10 == 0 || block.getY() % 10 == 0 || block.getZ() %10 == 0) {\n                    block.setType(BLUE_CONCRETE);\n                }\n\n                if(!blocks.contains(block)) {\n                    blocks.add(block);\n                }\n            });\n        });\n\n        System.out.print(\"\\n\");\n    }<\/code><\/pre>\n\n\n\n<p>Now you can see here I have special code in that would change from Concrete to Blue Concrete in a grid pattern.  This gave the sphere more depth, and feel free to change this as you wish.<\/p>\n\n\n\n<p>Now not being satisfied and knowing I had many more blocks to lay down I created a method to generate a hollow horizontal cylinder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>horizontal_cylinder(25,3, -3,  blocks, CONCRETE, px, py, pz, 0.1D,\"Core\");<\/code><\/pre>\n\n\n\n<p>Here is the implementation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void horizontal_cylinder(double radius, double top, double bottom, List&lt;Block&gt; blocks, String type, int px, int py, int pz, double increment, String description) {\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for(double angle = 0; angle &lt; 360; angle = angle + increment) {\n            angles.add(angle);\n        }\n\n        angles.parallelStream().forEach(angle -&gt; {\n            for(double z = top; z &gt;= bottom ; z = z - 1.0D) {\n                Block block = new Block(radius * Math.cos(angle),\n                        radius * Math.sin(angle),\n                        z,\n                        type, px, py, pz, description);\n\n                if (!blocks.contains(block)) {\n                    blocks.add(block);\n                }\n            }\n        });\n    }<\/code><\/pre>\n\n\n\n<p>Also for good measure I create a method to remove blocks in a cylindrical area:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void clear_cylinder(double radius, double top, double bottom,List&lt;Block&gt; blocks, int px, int py, int pz, double increment, String description) {\n\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for(double angle = 0; angle &lt; 360; angle = angle + increment) {\n            angles.add(angle);\n        }\n        angles.parallelStream().forEach(angle -&gt; {\n            for(double z = top; z &gt;= bottom ; z = z - 1.0D) {\n                for(int i = 1; i&lt;= radius; i++) {\n                    Block block = new Block(i * Math.cos(angle),\n                            i* Math.sin(angle),\n                            z,\n                            AIR, px, py, pz, description);\n\n                    if (blocks.contains(block)) {\n                        blocks.remove(block);\n                    }\n                }\n            }\n        });\n        System.out.print(\"\\n\");\n    }<\/code><\/pre>\n\n\n\n<p>Now to have a method to crate vertical cylinder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void vertical_cylinder(double radius, double top, double bottom, List&lt;Block&gt; blocks, String type, int px, int py, int pz, double increment, String description) throws IOException {\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for(double angle = 0; angle &lt; 360; angle = angle + increment) {\n            angles.add(angle);\n        }\n\n        angles.parallelStream().forEach(angle -&gt; {\n            for(double y = top; y &gt;= bottom ; y = y - 1.0D) {\n                Block block = new Block(radius * Math.cos(angle),\n                        y,\n                        radius * Math.sin(angle),\n                        type, px, py, pz, description);\n\n                if (!blocks.contains(block)) {\n                    blocks.add(block);\n                }\n            }\n        });\n    }<\/code><\/pre>\n\n\n\n<p>And again needed a method to clear a vertical cylindrical area:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void clear_vertical_cylinder(double radius, double top, double bottom,List&lt;Block&gt; blocks, int px, int py, int pz, double increment) throws IOException {\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for(double angle = 0; angle &lt; 360; angle = angle + increment) {\n            angles.add(angle);\n        }\n\n        angles.parallelStream().forEach(angle -&gt; {\n            for(double y = top; y &gt;= bottom ; y = y - 1.0D) {\n                for(int i = 1; i &lt; radius; i++) {\n                    Block block = new Block(i * Math.cos(angle),\n                            y,\n                            i * Math.sin(angle),\n                            AIR, px, py, pz, \"clear_laser\");\n                    if (blocks.contains(block)) {\n                        blocks.remove(block);\n                    }\n                }\n            }\n        });\n        System.out.print(\"\\n\");\n    }<\/code><\/pre>\n\n\n\n<p>Here is a method I used to create the decks for the station.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deck( 90.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 80.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 70.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 60.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 50.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 40.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 30.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( 20.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -4.0D, blocks, \"Concrete\", px, py, pz, 45D, 315D,stopWatch);\ndeck( -10.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -20.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -30.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -40.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -50.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -60.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -70.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);\ndeck( -80.0D, blocks, \"Concrete\", px, py, pz, 90D, 270D,stopWatch);<\/code><\/pre>\n\n\n\n<p>Here is the implementation.  Now I did set this method up to only create the &#8220;deck&#8221; over half of the sphere, instead of the entire sphere.  18 decks (17 decks, plus the bottom level) is extremely difficult to fill out!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void deck(double z,List&lt;Block&gt; blocks, String type, int px, int py, int pz, double startAngle, double endAngle, StopWatch stopWatch) {\n        Optional&lt;Block&gt; max = blocks.stream().filter(block -&gt; (block.getZ() - pz) == z).max(Comparator.comparing(Block::getY));\n        if(max.isPresent()) {\n\n            double radius = max.get().getY() - py;\n            System.out.println(\"Starting Deck \" + z + \": \" + stopWatch.toString() + \" Deck Radius: \" + radius + \" Point:\" + max.get().toString());\n            String description = \"Deck \" + z;\n\n            ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n            for (double angle = startAngle; angle &lt;= endAngle; angle = angle + 0.01D) {\n                angles.add(angle);\n            }\n\n            angles.parallelStream().forEach(angle -&gt; {\n                for (double r = 11; r &lt; radius; r++) {\n                    Block block = new Block(r * Math.cos(angle),\n                            r * Math.sin(angle),\n                            z,\n                            type, px, py, pz, description);\n\n                    if (!blocks.contains(block)) {\n                        blocks.add(block);\n\n                        if (block.getZ() % 10 == 0 &amp;&amp; block.getX() % 10 == 0 &amp;&amp; block.getY() % 10 == 0) {\n                            Block light = new Block(block.getX(), block.getY(), block.getZ() - 1, SEALANTERN, description);\n                            if (!blocks.contains(light)) {\n                                blocks.add(light);\n                            }\n                        }\n                    }\n                }\n            });\n\n            List&lt;Block&gt; removeList = blocks.parallelStream().filter(block -&gt; block.getDescription().equals(description)).filter(block -&gt; block.getY() &gt; 500).collect(Collectors.toList());\n            blocks.removeAll(removeList);\n        }\n    }<\/code><\/pre>\n\n\n\n<p>Now if you need to build a wall, here is your method.  This will build a circular wall at the location with give radius.  I used this to divide my station in half.  One side being the decks, and the other side the open area where I would build in the super laser and other pieces.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void wall(Double radius,List&lt;Block&gt; blocks, String type, int px, int py, int pz) {\n        ArrayList&lt;Double&gt; angles = new ArrayList&lt;&gt;();\n        for (double angle = 0.0D; angle &lt; 360.0D; angle = angle + 0.01D) {\n            angles.add(angle);\n        }\n\n        angles.parallelStream().forEach(angle -&gt; {\n            for (double r = 11; r &lt; radius; r++) {\n                Block block = new Block(r * Math.cos(angle),\n                        500D,\n                        r * Math.sin(angle),\n                        type, px, 0, pz, \"wall\");\n\n                if (!blocks.contains(block)) {\n                    blocks.add(block);\n                }\n            }\n        });\n    }<\/code><\/pre>\n\n\n\n<p>Now if you need to build a line of brick between two places here you :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private static void line(int sx, int sy, int sz, int ex, int ey, int ez, List&lt;Block&gt; blocks, String type, String description) {\n        int cx = sx;\n        int cy = sy;\n        int cz = sz;\n\n        boolean bx = (sx == ex);\n        boolean by = (sy == ey);\n        boolean bz = (sz == ez);\n\n        do {\n            Block block = new Block(cx,cy,cz,type,description);\n            if (!blocks.contains(block)) {\n                blocks.add(block);\n            }\n\n            if(!bx) {\n                cx++;\n            }\n            if(!by) {\n                cy++;\n            }\n            if(!bz) {\n                cz++;\n            }\n\n\n            bx = (cx == ex);\n            by = (cy == ey);\n            bz = (cz == ez);\n\n        } while(!bx || !by || !bz);\n\n    }<\/code><\/pre>\n\n\n\n<p>Now I wanted to know how many bricks had been put down and what type they were.  I created this simple method to generate that list for me.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> private static void printBlockReport(List&lt;Block&gt; blocks) {\n        System.out.println(\"Blocks: \" + blocks.size());\n        System.out.println(\"               concrete: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(CONCRETE)).count());\n        System.out.println(\"                  glass: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(GLASS)).count());\n        System.out.println(\"     nether_brick_fence: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(NETHER_BRICK_FENCE)).count());\n        System.out.println(\"             sealantern: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(SEALANTERN)).count());\n        System.out.println(\"                  magma: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(MAGMA)).count());\n        System.out.println(\"                barrier: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(BARRIER)).count());\n        System.out.println(\"                    air: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(AIR)).count());\n        System.out.println(\"          blue concrete: \" + blocks.stream().filter(block -&gt; block.getType().equalsIgnoreCase(BLUE_CONCRETE)).count());\n    }<\/code><\/pre>\n\n\n\n<p>Now the last piece of code I&#8217;m going to share is to take your list of blocks and output them into files for function calls:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> blocks.sort(Comparator.comparing(Block::getX).thenComparing(Block::getY).thenComparing(Block::getZ));\n\n        int pages = ListUtils.pages(blocks,9999);\n\n        for(int page = 1; page &lt;= pages; page++) {\n            FileWriter myWriter = new FileWriter(\"d:\\\\temp\\\\station\" + page + \".mcfunction\");\n            for (Block block : ListUtils.page(blocks, 9999, page)) {\n                myWriter.write(block.toCommand());\n                myWriter.write(\"\\n\");\n            }\n            myWriter.close();\n        }\n\n        FileWriter myWriter = new FileWriter(\"d:\\\\temp\\\\block-list.txt\");\n        for(Block block : blocks) {\n            myWriter.write(block.toCommand());\n            myWriter.write(\"\\n\");\n        }\n        myWriter.close();\n        stopWatch.finish();\n        System.out.println(\"Completed in: \" + stopWatch.toString());<\/code><\/pre>\n\n\n\n<p>You will need to modify this to your code, and file location. It does need to be limited to 9999 as that is the maximum number of commands in a function file.  <\/p>\n\n\n\n<p>I&#8217;m not going to give you my exact recipe I used for my station.  Take these and work with them to see what you can build.  If you make any extenstions to this I would love to hear about them.  I am thinking of making this into a library to use, if I see there is interest in it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My son has gotten into Minecraft and Star Wars. He wanted the two of us to build the Death Star in Minecraft. That is not a small undertaking. I got thinking about it, and came up with the idea to use Java to create function files that would create the sphere for us. So I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2833,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[280],"tags":[69],"series":[],"class_list":["post-2831","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-java-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2020\/07\/battle_station.png?fit=640%2C426&ssl=1","jetpack-related-posts":[{"id":3401,"url":"https:\/\/www.mymiller.name\/wordpress\/java\/ansi-colors\/","url_meta":{"origin":2831,"position":0},"title":"ANSI Colors","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Title: Using ANSI Colors in Java Code for String Styling Introduction: ANSI colors provide a powerful way to add visual enhancements and improve the readability of text in a terminal or console environment. In Java, you can leverage ANSI escape codes to apply various colors and formatting to your strings.\u2026","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3462,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/ansi-colors-simpler\/","url_meta":{"origin":2831,"position":1},"title":"ANSI Colors simpler","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"When it comes to enhancing the visual appeal of console applications, one powerful and straightforward technique is to use ANSI color codes. These codes allow you to apply various colors to your text and backgrounds, making your output more vibrant and readable. In Java, you can achieve this by utilizing\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2019\/04\/coding-924920_640.jpg?fit=640%2C426&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3060,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/string-cache\/","url_meta":{"origin":2831,"position":2},"title":"String Cache","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Sometimes an application will have a large number of Strings. Due to memory we certainly do not want to keep multiple instances of duplicate strings in memory. A string cache can greatly reduce the number of Strings in memory. I had a case where I had millions of strings, and\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/05\/geocache-398016_640.jpg?fit=640%2C480&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/05\/geocache-398016_640.jpg?fit=640%2C480&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/05\/geocache-398016_640.jpg?fit=640%2C480&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3145,"url":"https:\/\/www.mymiller.name\/wordpress\/java\/protecting-personal-information-when-needed\/","url_meta":{"origin":2831,"position":3},"title":"Protecting Personal Information when needed!","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"In today's times, the software is always handling personal information. As developers, we have to fight the battle between logging and seeing that information when we need to, and hiding that information when we need to. In my case on my local developer box or on the QA system the\u2026","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2022\/01\/id-gef10e7986_640.jpg?fit=640%2C412&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2022\/01\/id-gef10e7986_640.jpg?fit=640%2C412&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2022\/01\/id-gef10e7986_640.jpg?fit=640%2C412&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2062,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/advancedcalendar\/","url_meta":{"origin":2831,"position":4},"title":"AdvancedCalendar &#8211; java.util.Calendar java.util.Date java.text.SimpleDateFormat","author":"Jeffery Miller","date":"November 24, 2025","format":false,"excerpt":"Every get tired of converting from Dates to Calendars and then need to use SimpleDateFormat to output it as a String? \u00a0How about parsing a string and getting a Date object? \u00a0Personally after a single project that had several \u00a0date time stamps that required manipulation I grew very tired of\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2017\/02\/calendar-1255953_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2017\/02\/calendar-1255953_640.jpg?fit=640%2C426&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2017\/02\/calendar-1255953_640.jpg?fit=640%2C426&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3737,"url":"https:\/\/www.mymiller.name\/wordpress\/java_new_features\/java-23-is-here-exploring-the-full-release-and-incubator-features\/","url_meta":{"origin":2831,"position":5},"title":"Java 23 is Here: Exploring the Full Release and Incubator Features","author":"Jeffery Miller","date":"December 23, 2025","format":false,"excerpt":"Java 23 arrived in September 2023 with a range of new features and improvements. While it may not be a Long-Term Support (LTS) release, it offers some exciting additions worth exploring. In this blog post, we\u2019ll dive into the full release features of Java 23, providing clear explanations and practical\u2026","rel":"","context":"In &quot;Java New Features&quot;","block_context":{"text":"Java New Features","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_new_features\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/immune-defense-1359197_1280-jpg.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/immune-defense-1359197_1280-jpg.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/immune-defense-1359197_1280-jpg.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/immune-defense-1359197_1280-jpg.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/10\/immune-defense-1359197_1280-jpg.avif 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=2831"}],"version-history":[{"count":2,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2831\/revisions"}],"predecessor-version":[{"id":3430,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2831\/revisions\/3430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/2833"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=2831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=2831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=2831"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=2831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}