Slime Tweaker

Quick rating

Slime Tweaker

No reviews yet

Small mod that adds a gamerule and config to change the size of spawned slimes.

QoL & Tweaks
Mod Loaders
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Server Only

Runs entirely on the server. Also works in singleplayer.

About

Project Details

Type
Mod
License
MIT License
Latest Version
slimetweaker-1.0.0.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

Discord

Slime Tweaker

Slime Tweaker adds a gamerule to change the size of natural spawning slimes and config to modify more specific values relating to the spawning of slimes. I made this mod to solve an extremely specific problem I was having.

maxSlimeSize Gamerule

Running gamerule maxSlimeSize (number) modifies the max size of slimes than can spawn, capped at 7. The default max slime size is 2 and this can be changed in the config (if you're confused on why these numbers are like this keep reading).

Config

Config can be found in config/slimetweaker-common.toml. The default slime size can be changed there.

Also, when a slime spawns there is a chance, modified by the level difficulty, for it to grow one size larger. This is normally just capped at medium sized slimes, but it can be raised in the config. Setting the value to 0 disables this.

Wait does this affect magma cubes?

The logic for working out magma cube sizes (or any other mob that would extend the Slime class) just copies the slime code so, yes.

Wait I thought it was impossible for slimes of size 2 to spawn?

Yes, the Minecraft Wiki states that slimes only spawn with NBT tag Size of 0, 1, and 3 (small, medium, and big). You might think they're just skipping size 2 but it's actually down to the logic of sizing slimes. There are really 3 different slime sizes is used the code.

First there's what I'm calling the "Base" size, which is what the maxSlimeSize gamerule uses. The normal slimes are "Base" size 0, 1, and 2. You can set the gamerule to be any integer but slimes will not spawn if they are negative and will be capped at 7 in practice.

Then there's what I'm calling the "Actual" size, which is what the Minecraft code is using. For "Actual" size the number is 1 bit shifted left by a "Base" size number of bits, which due to math is like putting 2 to the power of that number, thus turning (0, 1, 2) into (1, 2, 4). Slimes of "Base" sizes (3, 4, 5) would become (8, 16, 32) respectively. This is why the cap is at 7, as "Actual" slime sizes are capped at 127 (2^7 = 128). Slimes bigger than that make the game very laggy,"

Lastly there's the one most of you are familiar with, what I'm calling the "NBT" size, which is how the size is read and displayed with NBT. This is the size you see when you use /data or /summon. Essentially it is just the "Actual" size minus 1, so (1, 2, 4) becomes (0, 1, 3). So when you summon a slime of "NBT" size 2 you are summoning a slime that would be impossible to spawn naturally. When a slime of "Base" size 7 (or higher) is spawned it's "NBT" size is capped at 126.

Why is it like this?

Well I don't know really, I'm not Mojang, but I suspect it is because when you kill a slime it creates 2-4 slimes of half the size. This still works even with slimes of each "Base" size.

Does that mean only 8 different sizes of slimes can spawn without commands?

Yes, without using commands, setting the max size to 7 means only slimes of "NBT" size 0, 1, 3, 7, 15, 31, 63, and 126 spawn.

So what was that problem you were having?

So I'm working on making a survival modpack for a superflat world, and in my testing I found that players would simply die quickly to medium and big slimes. I wanted to fix this without removing slimes as slime balls are needed, so after failing to find a mod that modified slime sizes I decided to make it myself. Tiny slimes don't deal damage, so if every slime is tiny then no one dies! Well, at least before it turns night and they get shot by a skeleton.

Discord

Slime Tweaker

Slime Tweaker adds a gamerule to change the size of natural spawning slimes and config to modify more specific values relating to the spawning of slimes. I made this mod to solve an extremely specific problem I was having.

maxSlimeSize Gamerule

Running gamerule maxSlimeSize (number) modifies the max size of slimes than can spawn, capped at 7. The default max slime size is 2 and this can be changed in the config (if you're confused on why these numbers are like this keep reading).

Config

Config can be found in config/slimetweaker-common.toml. The default slime size can be changed there.

Also, when a slime spawns there is a chance, modified by the level difficulty, for it to grow one size larger. This is normally just capped at medium sized slimes, but it can be raised in the config. Setting the value to 0 disables this.

Wait does this affect magma cubes?

The logic for working out magma cube sizes (or any other mob that would extend the Slime class) just copies the slime code so, yes.

Wait I thought it was impossible for slimes of size 2 to spawn?

Yes, the Minecraft Wiki states that slimes only spawn with NBT tag Size of 0, 1, and 3 (small, medium, and big). You might think they're just skipping size 2 but it's actually down to the logic of sizing slimes. There are really 3 different slime sizes is used the code.

First there's what I'm calling the "Base" size, which is what the maxSlimeSize gamerule uses. The normal slimes are "Base" size 0, 1, and 2. You can set the gamerule to be any integer but slimes will not spawn if they are negative and will be capped at 7 in practice.

Then there's what I'm calling the "Actual" size, which is what the Minecraft code is using. For "Actual" size the number is 1 bit shifted left by a "Base" size number of bits, which due to math is like putting 2 to the power of that number, thus turning (0, 1, 2) into (1, 2, 4). Slimes of "Base" sizes (3, 4, 5) would become (8, 16, 32) respectively. This is why the cap is at 7, as "Actual" slime sizes are capped at 127 (2^7 = 128). Slimes bigger than that make the game very laggy,"

Lastly there's the one most of you are familiar with, what I'm calling the "NBT" size, which is how the size is read and displayed with NBT. This is the size you see when you use /data or /summon. Essentially it is just the "Actual" size minus 1, so (1, 2, 4) becomes (0, 1, 3). So when you summon a slime of "NBT" size 2 you are summoning a slime that would be impossible to spawn naturally. When a slime of "Base" size 7 (or higher) is spawned it's "NBT" size is capped at 126.

Why is it like this?

Well I don't know really, I'm not Mojang, but I suspect it is because when you kill a slime it creates 2-4 slimes of half the size. This still works even with slimes of each "Base" size.

Does that mean only 8 different sizes of slimes can spawn without commands?

Yes, without using /summon, setting the max size to 7 means only slimes of "NBT" size 0, 1, 3, 7, 15, 31, 63, and 126 spawn.

So what was that problem you were having?

So I'm working on making a survival modpack for a superflat world, and in my testing I found that players would simply die quickly to medium and big slimes. I wanted to fix this without removing slimes as slime balls are needed, so after failing to find a mod that modified slime sizes I decided to make it myself. Tiny slimes don't deal damage, so if every slime is tiny then no one dies! Well, at least before it turns night and they get shot by a skeleton.

Screenshots

Gallery

  • 2024-11-10_01.01.05.png
    2024-11-10_01.01.05.png really big slime
  • 2024-11-09_22.07.55.png
    2024-11-09_22.07.55.png you can set the config so that only tiny slimes spawn!
  • really big slime
    really big slime really big slime
  • tiny slimes
    tiny slimes you can set the config so that only tiny slimes spawn!

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works