Jump to content

Recommended Posts

Posted

I was just curious as to if this would be possible first and for most, along with how it would effect certain aspects of the game and even mod compatibility (because I assume it might break a lot of things potentially). It's not something I am 100% wanting to implement, but I have just been toying around the idea and was wondering the feasibility behind it.

 

To explain a bit better, I was thinking about removing the health system in place in favor of my own, which would essentially increase the amount of health everyone house to "points" instead of hearts. For instance, 10 hearts would be equivalent to say 2000 points of health in my new system. To do so, I figured I would just use a formula to convert hearts to points. With that being said, damage would also have to be changed too.

 

All in all, if what I am envisioning is possible, how would that affect mod compatibility? Is there a way I could run through every entity registered and change the values of health/damage of their entities? And what about changes authors might do during a LivingHurtEvent for example that modifies damage? I'm just curious as to what I would be dealing with if I did decide to go for it.

Developer of Levels and Lost Eclipse

Posted

Overriding Minecrafts health system would be rather interesting and you would probably run into some hard, but fun bugs. I would start by creating the capability that stores the new health value. Then I would use the LivingHurtEvent and LivingHealEvent to calculate damage and healing and I would change the health of the entities vanilla only if a config setting is on, because you can end up with some rounding errors for the health conversion, and then I would only actually update it client side.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I know how I would go about doing it, I guess I was just looking for some answers on what would happen compatibility wise (but I guess since no one has really done it, no one really knows). If no one posts here with any issues that might arise, I'm definitely going to try and overwrite the health system for one of my mods. If it works out and is successful, I might actually make it a standalone mod for people interested in changing things up. But I'm not going to get too far of myself, I'm sure there will be a lot of work involved to get it running properly.

Developer of Levels and Lost Eclipse

Posted

I know how I would go about doing it, I guess I was just looking for some answers on what would happen compatibility wise (but I guess since no one has really done it, no one really knows). If no one posts here with any issues that might arise, I'm definitely going to try and overwrite the health system for one of my mods. If it works out and is successful, I might actually make it a standalone mod for people interested in changing things up. But I'm not going to get too far of myself, I'm sure there will be a lot of work involved to get it running properly.

I could see a not so much compatibility error with Tinkers Construct and other mods that effect the health, unless you rely slightly on the vanilla implementation of health.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I'm expecting a few incompatibilities here and there, but I'm going to at least attempt to do this now. I'll see how far I get, and try to make it as compatible as possible.

Developer of Levels and Lost Eclipse

Posted

Yes, but I think through events and capabilities you can re-work the health system. It would just rely on the specific events getting called last.

 

However, compatibility issues will likely arise with mods that change max health as well (and possibly those that alter the HUD Gui). I'm working on implementing it right now, and will test how everything works with other mods. Right now, I don't know of a way to fix any issues with other mods changing max health.

Developer of Levels and Lost Eclipse

Posted

Yes, but I think through events and capabilities you can re-work the health system. It would just rely on the specific events getting called last.

 

However, compatibility issues will likely arise with mods that change max health as well (and possibly those that alter the HUD Gui). I'm working on implementing it right now, and will test how everything works with other mods. Right now, I don't know of a way to fix any issues with other mods changing max health.

 

Capabilities are the wrong way to modify the health system. Vanilla has the attribute system, which allows modification of various attributes(Max health, movement speed, attack damage, etc) of any mob. Using events and attributes will work much better than using  capabilities and events. Using both attributes is more compatible as all the health related methods and most damage related methods use them, so they will work properly without any extra work. The few edge cases(Such as directly causing damage with

EntityLivingBase#attackEntityFrom()

) can be handled by events.

 

Posted

So you know how to do it? How? The player in Terraria has 100 starting health, it can be increased with Life Crystals (increases max by 20 HP) up to 400 HP. I want to use this type of health instead of the vanilla so that I can deal small amounts of damage, like 5 HP, and not take one-fourth of the player's health (one of the weakest mobs in Terraria, the Green Slime, deals 5 damage, but it would be OP in Minecraft)!

 

Health is a float, not an int. You can deal 0.0625 damage(1/16th of a heart) if you want, or any other amount that can be expressed by a float.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It is a rendering issue with embeddium/oculus
    • So, I have a minecraft world hosted with essential on forge 1.20.1, there's 149 mods, and the forge version is 47.3.0, and it's been like that for a good 2-3 weeks, and all of a sudden, it stopped loading, and I have 0 clue as to why, and this world means A LOT to me, so if anyone out there is able to help, I would GLADLY appreciate it. here's the link if ya wanna help:   [04Dec2024 22:42:24.552] [Worker-ResourceReload-3/ERROR][net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener/]: Couldn't parse data file slabsexpanded:snow_blockblocktoslab from slabsexpanded:recipes/snow_blockblocktoslab.json com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:526) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_263475_(GsonHelper.java:531) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_13776_(GsonHelper.java:581) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_278771_(SimpleJsonResourceReloadListener.java:41) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:29) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:17) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10786_(SimplePreparableReloadListener.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:514) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007) ~[gson-2.10.jar%23107!/:?] at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:524) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?]
    • Hello! I have been having a problem with Forgematica, Embeddium, Oculus, and create. I wanted to download litematica so I could see which blocks are in my creative mode build, so that I could collect them all in survival. However, litematica is a fabric mod. I found a port called forgematica, which I added (along with it's dependency) to my mods folder. I loaded into a new world, and built a structure. Then, I added a part from the create mod, and the game crashed instantly, with exit code -1. Thanks for any help! Crash Report and mods list: https://pastebin.com/rtzh6LAi
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.