Mob health over 1024 in 1.18.2

Started by Puro on

Topic category: Help with modding (Java Edition)

Last seen on 17:48, 6. Jun 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob health over 1024 in 1.18.2

Making a mod for a map I'm making, and this is the main reason I'm doing it, I've tried to set the health to over 1024 in the Creator and just doesn't work, is there anyway to get around this? Or is this just a thing thats just kinda there forever.

*PS- Absorption effect and Armor sadly don't make the cut due to the number I am using, like end-game bosses with 50k HP.

Last seen on 03:09, 28. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create your entity, ste all…
Mon, 05/16/2022 - 23:13

Create your entity, ste all the desired values and procedures and save.Now go to your_awesome_model.java (in your mods entity folder), look for ...

builder = builder.add(Attributes.MAX_HEALTH, ####);  <== change that value for the desired number, save/lock code, and test 
Last seen on 03:09, 28. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Note ... If you unlock the…
Mon, 05/16/2022 - 23:14

Note ... If you unlock the code, that value will reset to default.

Last seen on 17:48, 6. Jun 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that doesnt seem to of…
Tue, 05/17/2022 - 18:18

that doesnt seem to of worked, the health is still 1024, check by using the /data command

Last seen on 13:56, 19. Dec 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I used the health boost…
Tue, 05/17/2022 - 20:00

I used the health boost effect to get my mob up to 6,000 hp.

Last seen on 11:59, 11. Aug 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You'd need to use…
Fri, 05/20/2022 - 19:42

You'd need to use AttributeFix to increase the cap, and then edit the value directly the code just as __SK__ said.

You can add AttributeFix as a dependency on Settings - External APIs

Last seen on 17:48, 6. Jun 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah, yh, that mid has now…
Sat, 05/21/2022 - 23:15

Ah, yh, that mid has now decided to work, though I don't see how to add it as a dependency in External APIs

Last seen on 11:59, 11. Aug 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just put the modid in the…
Sun, 05/22/2022 - 01:23

Just put the modid in the additional requiered mods part, I think it's "attributesfix" but you can check by going to your mods tab ingame

Last seen on 02:39, 28. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can just add absorption…
Sat, 05/28/2022 - 00:22

You can just add absorption effect when it spawns. Absorption is stored a bit differently to regular health, so if you do when entity spawns, give entity absorption 1000, you can go past 1024 hp easily. The max hp with absorption is in the billions.

Last seen on 02:50, 28. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add a false hp bar whenever…
Sat, 05/28/2022 - 01:09

add a false hp bar

whenever mob is with not max hp. the false hp depletes and heals the leftover hp to the mob

and in entity dies make it cancel if still have some of that false hp leftover (cancelling global trigger)

global hp = number nbt . set on spawn

Last seen on 02:50, 28. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or. you can either if is a…
Sat, 05/28/2022 - 01:10

or. you can either if is a boss add a little multiple phases style!

healing it whenever is with X amount of hp. and the total hp of what it heals is basically the true hp

Last seen on 02:39, 28. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Absorption effect can still…
Sun, 06/19/2022 - 07:55

Absorption effect can still get you to 50k hp, the limit is like in the billions. With Mcreator, you can go past absorption 255, which is the good thing. So for example, if you want 50k hp, then just add absorption 12500 for 999999 ticks when the boss spawns. The limit is in the billions, and if you wanna go even further, there's one last way: variables. It's ridiculously advanced script though, so I'll explain it in the next comment.

Last seen on 02:39, 28. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, so here's the extremely…
Sun, 06/19/2022 - 08:04

Ok, so here's the extremely advanced script:

So first, make a new variable called "HP of custom boss" or something like that. If the hp is somewhere less than 2 billion or so, then you can just set this variable to the total number of hp you want your custom boss to have. And then when your boss spawns, you have to set the hp variable to whatever. When the boss is hit, it'll do another procedure. In that procedure, make a new local variable and name it "damage dealt". This is another number variable. Set it to 0 to start with. Now, if the player has a wooden sword in his/her mainhand, change the variable by 4. If they have a stone sword, change it by 5... And so on. So just tons of "if" blocks, that change the damage dealt. Finally, depending on the player's strength effect, also change the local variable. Now, you should have the total damage that was dealt to the boss, and you decrease the hp of custom boss variable by your local damage dealt variable. If the custom boss hp variable is less than 0.01, then you kill the boss.

 

But, what if you wanted something much bigger? Like, clicker heroes level hp? I mean, we're talking googol, or 1.000e1000 and stuff. Well, simple. Make two variables: Custom boss hp, and custom boss hp digit count. The first variable defines the first few digits of the hp, and the second variable is the number of digits in the hp. For example, if you wanted a boss with googol hp, then the custom boss hp variable would be 1, and the custom boss hp digit count variable would be 100, or something like 1.000e100. When your custom boss spawns, it'll just reset all those variables. Next, is the annoying part. hen the boss is hit, it'll do another procedure. In that procedure, make a new local variable and name it "damage dealt". This is another number variable. Set it to 0 to start with. Now, if the player has a wooden sword in his/her mainhand, change the variable by 4. If they have a stone sword, change it by 5... And so on. So just tons of "if" blocks, that change the damage dealt. Finally, depending on the player's strength effect, also change the local variable. Now, you should have the total damage that was dealt to the boss. Finally, you just set the local variable to "Total damage dealt local variable" divided by "custom boss hp digit count". And you decrease the hp of custom boss variable by your local damage dealt variable. But, if, for example, the boss has googol hp and you have a weapon that can deal googol/10 damage, then you may as well just put into the code: Set "custom boss hp" to "custom boss hp - 0.1" or something like that, to make it run faster. If the custom boss hp variable is less than 0.01, then you kill the boss.

 

If the second part is confusing, just stick with the first part or absorption, those work fine anyway.