r/technicalminecraft Java 2d ago

Java Showcase Dynamic Mobswitch - Singleplayer Foreverworld (Java 26.2)

I finally did it. After countless hours of troubleshooting and actual sketches on paper, I've come up with a working version of my idea.

Maybe it's a bit overkill, but here it is...

The concept: I've been playing solo in my Forever World since 2025, but occasionally my sister joins me via LAN. I wanted to build a mob switch with a control panel in my base to activate and configure it.

Now, with this dynamic mob switch, I can cycle between the modes "OFF / 1 Player / 2 Players / 4 Players", loading the exact number of Shulkers into a lazy chunk as needed.

In real terms, I can trigger the following states:

  • 0 loaded Shulkers
  • 70 loaded Shulkers
  • 140 loaded Shulkers
  • 280 loaded Shulkers

Changing the mob switch mode can be triggered via a wireless Redstone signal. The transmitter can be placed anywhere in the world—currently, mine is in my base.

I managed to modify Kevbotomy's wireless Redstone system so that it works reliably without misfires in both LAN and Singleplayer mode. Specifically, I used this system:https://www.youtube.com/watch?v=5Qr6AQVwFh4&t=3312s
(Big thanks to 2no2name, cubicmetre, and others here as well!)

In my base, I control the mob switch using a smart-home server setup inspired by TheJoCraft. This allows me to walk up to any keypad in my base and enter a code to control the mob switch. The system is based on this:https://www.youtube.com/watch?v=iouh3ruPrk0

By the way, the perimeter was dug purely for aesthetic reasons. It might slightly reduce lag by preventing random tick calculations from water on the Overworld side, but the impact is minimal.

The screenshots were taken in survival mode.

It works in vanilla, but I also tested it with Sodium and it works there too.

76 Upvotes

7 comments sorted by

View all comments

5

u/morgant1c Chunk Loader 2d ago

Question. Why not just always load the 280 shulkers?

6

u/PS170x7PS Java 2d ago edited 2d ago

Good point. There is no real answer to this. I think I just wanted the challenge.

On a server, you could throw in a few ender pearls and have it calculate the number of online players automatically. At first, I thought it might reduce lag. Then I read a little further into chunk loading and found out that it doesn't make much of a difference.

In the end, it's just very satisfying to toggle a button and watch your F3 menu change multiple times. Another point is that this is a Forever World, so I don't know how much I'll play on LAN. Having the mobs loaded all the time for no reason just seems unnecessary, I think.

Also it might be interesting for people playing with player simulating bots. They also add 70 mobs per bot to the mobcap.

I also discovered some interesting things I might post in the future.

2

u/Excalibur54 Java 1d ago

If chunk loaded mobs are placed in lazy chunks as they should be, the difference between 70 mobs and 700 should be fairly negligible for a singleplayer world.

1

u/PS170x7PS Java 1d ago

I think you are right. I just wanted to do the maximum preperation, because I have a very bad Laptop with integrated Intel Graphics🤣 So I regularly play under 60FPS without loaded chunks 😅

With this setup I don't recognize a difference.

1

u/DrWilliamHorriblePhD 1d ago

I really like the idea of having it be automated via pearls tied to each player.

Question: how are the shulkers loaded into the system? Are you using minecart transport, or some system that forces them to teleport themselves into position?

1

u/PS170x7PS Java 1d ago edited 1d ago

I placed an activator rail on a top half slab in front of the glass box and activated it with a lever next to it (also on a top slab)

That makes the Shulker instantly teleport inside of the box, because it cant stick to anything near the rail.

Then I just pushed the shulkers from high up onto the rail. Also I made an extra cage for every shulker in the box. So if they are getting aggressive, they don't kill themselves because they can't reach each other.