-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
To check if it is your damage type you would probably use damageSource.is(resourceKey) where resourceKey is the ResourceKey to the damage type. It looks like you can now also use tags to group and check damage types.
-
The DamageSources are now made from DamageTypes that are part of datapacks See "DAMAGE TYPES" here: https://www.minecraft.net/en-us/article/minecraft-java-edition-1-19-4 That means they can only be created when you are loaded into the world. Because the game needs MinecraftServer.registryAccess() to lookup the DamageType from the data packs. This is not something I have done myself. But here's an example from BOP. With a its "bramble" DamageType https://github.com/Glitchfiend/BiomesOPlenty/blob/BOP-1.19.4-17.3.x/src/generated/resources/data/biomesoplenty/damage_type/bramble.json And here is where it applies the damage using the ResourceKey of that damage type: https://github.com/Glitchfiend/BiomesOPlenty/blob/551bff467ade42cb2a0b23609f439137ca7fa60f/src/main/java/biomesoplenty/common/block/BrambleBlock.java#L67
-
You have a mod trying to load client classes on the server. The error message does not say which mod. I can see oculus mentioned previously which is a client side mod not needed on the server. You probably have others?
-
Use a mod like https://www.curseforge.com/minecraft/mc-mods/spark to diagnose what is taking time on the server thread.
-
By UselessAccount · Posted
In my mod, I need to make a special kind of damage. I put the value of it into a custom DamageSource class that extends the original one, then I applied it on entities with LivingHurtEvent in an event handler. In 1.19.3, the constructor of the DamageSource was simple. All you needed was a simple String. It worked pretty well. But in 1.19.4, Mojang added something like tons of DamageTypes and Holders. I checked the source code of net.minecraft.world.damagesource.DamageSources, but I cannot understand it at all. So my question is: How can I create custom DamageSources in 1.19.4? (I'm not a native English speaker, and I'm new to forge modding and this forum. If there are any mistakes, please correct me!)
-
-
Topics
Recommended Posts
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.