fix added damage types

This commit is contained in:
Talia-12 2023-07-30 16:30:12 +10:00
parent c391df8507
commit 97244cd461
3 changed files with 14 additions and 9 deletions

View file

@ -1,17 +1,12 @@
package at.petrak.hexcasting.common.lib; package at.petrak.hexcasting.common.lib;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.damagesource.DamageType; import net.minecraft.world.damagesource.DamageType;
public class HexDamageTypes { import static at.petrak.hexcasting.api.HexAPI.modLoc;
public static final ResourceKey<DamageType> OVERCAST = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation("overcast"));
public static final ResourceKey<DamageType> SHAME_ON_YOU = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation("overcast"));
public static void bootstrap(BootstapContext<DamageType> context) { public class HexDamageTypes {
context.register(OVERCAST, new DamageType("hexcasting.overcast", 0f)); public static final ResourceKey<DamageType> OVERCAST = ResourceKey.create(Registries.DAMAGE_TYPE, modLoc("overcast"));
context.register(SHAME_ON_YOU, new DamageType("hexcasting.shame", 0f)); public static final ResourceKey<DamageType> SHAME_ON_YOU = ResourceKey.create(Registries.DAMAGE_TYPE, modLoc("overcast"));
}
} }

View file

@ -0,0 +1,5 @@
{
"exhaustion": 0,
"message_id": "hexcasting.overcast",
"scaling": "when_caused_by_living_non_player"
}

View file

@ -0,0 +1,5 @@
{
"exhaustion": 0,
"message_id": "hexcasting.shame",
"scaling": "when_caused_by_living_non_player"
}