diff --git a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index 76752e466..79a64e596 100644 --- a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.1 2023-11-06T13:28:26.6147954 Languages: en_us -d0f2718edf354febe4e6d2c785da187d855d4b82 assets/deeperdarker/lang/en_us.json +// 1.20.1 2023-11-07T21:37:03.1844117 Languages: en_us +2b01eee16b8bfdae935bede62bf088252e69002f assets/deeperdarker/lang/en_us.json diff --git a/src/generated/resources/assets/deeperdarker/lang/en_us.json b/src/generated/resources/assets/deeperdarker/lang/en_us.json index 0c2aa8534..8a7610751 100644 --- a/src/generated/resources/assets/deeperdarker/lang/en_us.json +++ b/src/generated/resources/assets/deeperdarker/lang/en_us.json @@ -146,6 +146,8 @@ "block.deeperdarker.stripped_echo_log": "Stripped Echo Log", "block.deeperdarker.stripped_echo_wood": "Stripped Echo Wood", "block.deeperdarker.unlinked": "Unlinked transmitter", + "death.attack.jaw": "%1$s was trapped by a jaw", + "death.attack.ring": "%1$s heard the ring of %2$s", "effect.deeperdarker.sculk_affinity": "Sculk Affinity", "enchantment.deeperdarker.catalysis": "Catalysis", "enchantment.deeperdarker.catalysis.desc": "Spreads sculk when mobs are killed.", diff --git a/src/main/java/com/kyanite/deeperdarker/content/blocks/SculkJawBlock.java b/src/main/java/com/kyanite/deeperdarker/content/blocks/SculkJawBlock.java index c3e8704c0..f19db85bb 100644 --- a/src/main/java/com/kyanite/deeperdarker/content/blocks/SculkJawBlock.java +++ b/src/main/java/com/kyanite/deeperdarker/content/blocks/SculkJawBlock.java @@ -34,7 +34,7 @@ public void stepOn(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntit if(pEntity instanceof Monster monster && monster.getMobType() == DDMobType.SCULK) return; if(pState.getValue(CAN_BITE) && pEntity instanceof LivingEntity entity) { pLevel.setBlock(pPos, pState.setValue(BITING, true), 3); - entity.hurt(DDDamageTypes.source(pLevel, DDDamageTypes.JAW), 3); + entity.hurt(DDDamageTypes.source(pLevel, DDDamageTypes.JAW, entity, null), 3); pLevel.scheduleTick(pPos, this, 35); } } @@ -48,7 +48,7 @@ public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSou @Override public void entityInside(BlockState pState, Level pLevel, BlockPos pPos, Entity pEntity) { - if(pEntity instanceof LivingEntity entity) entity.hurt(DDDamageTypes.source(pLevel, DDDamageTypes.JAW), 3); + if(pEntity instanceof LivingEntity entity) entity.hurt(DDDamageTypes.source(pLevel, DDDamageTypes.JAW, entity, null), 3); } @Override diff --git a/src/main/java/com/kyanite/deeperdarker/content/entities/Stalker.java b/src/main/java/com/kyanite/deeperdarker/content/entities/Stalker.java index d48589be0..b2bfd56b5 100644 --- a/src/main/java/com/kyanite/deeperdarker/content/entities/Stalker.java +++ b/src/main/java/com/kyanite/deeperdarker/content/entities/Stalker.java @@ -137,7 +137,7 @@ public void tick() { this.rangedCooldown = 440; } else if(this.rangedCooldown < 0 && !level().isClientSide()) { for(Player player : players) { - player.hurt(DDDamageTypes.source(this.level(), DDDamageTypes.RING), 2); + player.hurt(DDDamageTypes.source(this.level(), DDDamageTypes.RING, player, this), 2); } if(this.rangedCooldown % 40 == 0 && level() instanceof ServerLevel serverLevel) { int spawn = this.random.nextIntBetweenInclusive(1, 3); diff --git a/src/main/java/com/kyanite/deeperdarker/datagen/assets/ENLanguageProvider.java b/src/main/java/com/kyanite/deeperdarker/datagen/assets/ENLanguageProvider.java index 3d11461cc..2501dde9f 100644 --- a/src/main/java/com/kyanite/deeperdarker/datagen/assets/ENLanguageProvider.java +++ b/src/main/java/com/kyanite/deeperdarker/datagen/assets/ENLanguageProvider.java @@ -41,6 +41,8 @@ protected void addTranslations() { add("advancements." + DeeperDarker.MOD_ID + ".find_ancient_temple.description", "Explore the depths for a temple"); add("advancements." + DeeperDarker.MOD_ID + ".obtain_sculk_transmitter.title", "Remote Storage"); add("advancements." + DeeperDarker.MOD_ID + ".obtain_sculk_transmitter.description", "Acquire a Sculk Transmitter"); + add("advancements." + DeeperDarker.MOD_ID + ".obtain_warden_staff.title", "Noise Complaint"); + add("advancements." + DeeperDarker.MOD_ID + ".obtain_warden_staff.description", "Acquire a Sonorous Staff"); add("advancements." + DeeperDarker.MOD_ID + ".explore_otherside.title", "Echolocation"); add("advancements." + DeeperDarker.MOD_ID + ".explore_otherside.description", "Explore all Otherside biomes"); add("advancements." + DeeperDarker.MOD_ID + ".kill_all_sculk_mobs.title", "Sculk Slayer"); @@ -49,9 +51,6 @@ protected void addTranslations() { add("advancements." + DeeperDarker.MOD_ID + ".obtain_reinforced_echo_shard.description", "Reinforce an Echo Shard"); add("advancements." + DeeperDarker.MOD_ID + ".warden_armor.title", "Cover Me with Sculk"); add("advancements." + DeeperDarker.MOD_ID + ".warden_armor.description", "Protect yourself with a full set of Warden Armor"); - add("advancements." + DeeperDarker.MOD_ID + ".obtain_warden_staff.title", "Noise Complaint"); - add("advancements." + DeeperDarker.MOD_ID + ".obtain_warden_staff.description", "Acquire a Sonorous Staff"); - add("itemGroup." + DeeperDarker.MOD_ID, "Deeper and Darker"); add("block." + DeeperDarker.MOD_ID + ".linked", "Linked transmitter"); @@ -71,7 +70,8 @@ protected void addTranslations() { add("biome." + DeeperDarker.MOD_ID + "." + OthersideBiomes.ECHOING_FOREST.location().getPath(), convertToName(OthersideBiomes.ECHOING_FOREST.location().getPath())); add("biome." + DeeperDarker.MOD_ID + "." + OthersideBiomes.BLOOMING_CAVERNS.location().getPath(), convertToName(OthersideBiomes.BLOOMING_CAVERNS.location().getPath())); add("biome." + DeeperDarker.MOD_ID + "." + OthersideBiomes.OVERCAST_COLUMNS.location().getPath(), convertToName(OthersideBiomes.OVERCAST_COLUMNS.location().getPath())); - + add("death.attack.jaw", "%1$s was trapped by a jaw"); + add("death.attack.ring", "%1$s heard the ring of %2$s"); add("enchantment." + DeeperDarker.MOD_ID + "." + DDEnchantments.CATALYSIS.getId().getPath() + ".desc", "Spreads sculk when mobs are killed."); add("enchantment." + DeeperDarker.MOD_ID + "." + DDEnchantments.SCULK_SMITE.getId().getPath() + ".desc", "Increases damage against sculk mobs such as Shattered and the Warden."); diff --git a/src/main/java/com/kyanite/deeperdarker/util/DDDamageTypes.java b/src/main/java/com/kyanite/deeperdarker/util/DDDamageTypes.java index 6ea797b82..49f899cb0 100644 --- a/src/main/java/com/kyanite/deeperdarker/util/DDDamageTypes.java +++ b/src/main/java/com/kyanite/deeperdarker/util/DDDamageTypes.java @@ -8,6 +8,7 @@ import net.minecraft.world.damagesource.DamageScaling; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageType; +import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Level; public class DDDamageTypes { @@ -19,8 +20,8 @@ public static void bootstrap(BootstapContext context) { context.register(RING, new DamageType("ring", 0.1f)); } - public static DamageSource source(Level level, ResourceKey damageType) { - return new DamageSource(level.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(damageType)); + public static DamageSource source(Level level, ResourceKey damageType, Entity target, Entity attacker) { + return new DamageSource(level.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(damageType), target, attacker); } public static ResourceKey createKey(String name) {