Skip to content

Commit

Permalink
missing death messages
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Sep 12, 2024
1 parent 284a4ea commit b9aefc4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/generated/resources/assets/oreganized/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
"block.oreganized.white_crystal_glass_pane": "White Crystal Glass Pane",
"block.oreganized.yellow_crystal_glass": "Yellow Crystal Glass",
"block.oreganized.yellow_crystal_glass_pane": "Yellow Crystal Glass Pane",
"death.attack.lead_bolt": "%1$s was shot %2$s",
"death.attack.lead_bolt.item": "%1$s was shot %2$s using %3$s",
"death.attack.molten_lead": "%1$s refused to let go of the soaring hot metal",
"effect.oreganized.stunning": "Brain Damage",
"effect.oreganized.stunning.description": "Paralyzes the victim periodically with random intervals",
"entity.oreganized.lead_bolt": "Lead Bolt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import galena.oreganized.Oreganized;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.effect.MobEffectInstance;
Expand Down Expand Up @@ -38,7 +39,9 @@ public void applyEffectTick(@NotNull LivingEntity entity, int amplifier) {

if (instance.update(new MobEffectInstance(this, instance.getDuration() + 1, amplifier + step, instance.isAmbient(), instance.isVisible(), instance.showIcon()))) {
addAttributeModifiers(entity, entity.getAttributes(), instance.getAmplifier());
entity.playSound(SoundEvents.SCULK_BLOCK_SPREAD, instance.getAmplifier() * 0.8F / MAX_AMPLIFIER + 0.2F, entity.getRandom().nextFloat() * 0.2F + 0.8F);
if (entity.level().isClientSide) {
entity.level().playSound(entity, entity.blockPosition(), SoundEvents.SCULK_BLOCK_SPREAD, SoundSource.PLAYERS, instance.getAmplifier() * 0.8F / MAX_AMPLIFIER + 0.2F, entity.getRandom().nextFloat() * 0.2F + 0.8F);
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/galena/oreganized/data/OLang.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ protected void addTranslations() {

add("item.oreganized.smithing_template.electrum_upgrade.additions_slot_description", "Add Electrum Ingot");

add("death.attack.lead_bolt", "%1$s was shot %2$s");
add("death.attack.lead_bolt.item", "%1$s was shot %2$s using %3$s");
add("death.attack.molten_lead", "%1$s refused to let go of the soaring hot metal");

/*
Automatically create translations for blocks and items based on their registry name.
Expand Down

0 comments on commit b9aefc4

Please sign in to comment.