Skip to content

Commit

Permalink
Adjust scorpion weapons
Browse files Browse the repository at this point in the history
-Cleaned up descriptions
-Axes now inflict their effect for 10 seconds instead of 15
-Swords now inflict their effect for 8 seconds instead of 10
-Stings now inflict their effect for 15 seconds instead of 10
  • Loading branch information
IcarussOne committed Jan 3, 2024
1 parent 104584f commit 2369f35
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 49 deletions.
13 changes: 7 additions & 6 deletions src/main/java/drzhark/mocreatures/item/MoCItemAxe.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import drzhark.mocreatures.MoCConstants;
import drzhark.mocreatures.MoCreatures;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -46,7 +47,7 @@ public MoCItemAxe(String name, Item.ToolMaterial material, float damage, float s
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
if (MoCreatures.proxy.weaponEffects) {
int timer = 15; // In seconds
int timer = 10; // In seconds
switch (this.specialWeaponType) {
case 1: // Poison 2
target.addPotionEffect(new PotionEffect(MobEffects.POISON, timer * 20, 1));
Expand Down Expand Up @@ -78,19 +79,19 @@ public void addInformation(ItemStack stack, @Nullable World worldIn, List<String
if (MoCreatures.proxy.weaponEffects) {
switch (this.specialWeaponType) {
case 1: // Poison 2
tooltip.add(new TextComponentTranslation("info.mocreatures.stingaxe1").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_dirt", 10));
break;
case 2: // Slowness
tooltip.add(new TextComponentTranslation("info.mocreatures.stingaxe2").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_frost", 10));
break;
case 3: // Fire
tooltip.add(new TextComponentTranslation("info.mocreatures.stingaxe3").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_fire", 10));
break;
case 4: // Weakness (Nausea for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingaxe4").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_cave", 10));
break;
case 5: // Wither (Blindness for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingaxe5").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_undead", 10));
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public MoCItemLuckyArmor(String name, float luck, ItemArmor.ArmorMaterial materi
super(name, materialIn, renderIndex, equipmentSlotIn);
this.luck = luck;
}

@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/drzhark/mocreatures/item/MoCItemSword.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import drzhark.mocreatures.MoCConstants;
import drzhark.mocreatures.MoCreatures;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -46,7 +47,7 @@ public MoCItemSword(String name, Item.ToolMaterial material, int damageType) {
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
if (MoCreatures.proxy.weaponEffects) {
int timer = 10; // In seconds
int timer = 8; // In seconds
switch (this.specialWeaponType) {
case 1: // Poison 2
target.addPotionEffect(new PotionEffect(MobEffects.POISON, timer * 20, 1));
Expand Down Expand Up @@ -78,19 +79,19 @@ public void addInformation(ItemStack stack, @Nullable World worldIn, List<String
if (MoCreatures.proxy.weaponEffects) {
switch (this.specialWeaponType) {
case 1: // Poison 2
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault1").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_dirt", 8));
break;
case 2: // Slowness
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault2").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_frost", 8));
break;
case 3: // Fire
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault3").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_fire", 8));
break;
case 4: // Weakness (Nausea for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault4").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_cave", 8));
break;
case 5: // Wither (Blindness for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault5").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_undead", 8));
break;
default:
break;
Expand Down
15 changes: 9 additions & 6 deletions src/main/java/drzhark/mocreatures/item/MoCItemWeapon.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
package drzhark.mocreatures.item;

import com.google.common.collect.Multimap;

import drzhark.mocreatures.MoCConstants;
import drzhark.mocreatures.MoCreatures;
import net.minecraft.block.BlockWeb;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
Expand Down Expand Up @@ -69,7 +72,7 @@ public float getStrVsBlock(ItemStack stack, IBlockState state) {
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
if (MoCreatures.proxy.weaponEffects) {
int timer = 10; // In seconds
int timer = 15; // In seconds
switch (this.specialWeaponType) {
case 1: // Poison 2
target.addPotionEffect(new PotionEffect(MobEffects.POISON, timer * 20, 1));
Expand Down Expand Up @@ -175,19 +178,19 @@ public void addInformation(ItemStack stack, @Nullable World worldIn, List<String
if (MoCreatures.proxy.weaponEffects) {
switch (this.specialWeaponType) {
case 1: // Poison 2
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault1").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_dirt", 15));
break;
case 2: // Slowness
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault2").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_frost", 15));
break;
case 3: // Fire
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault3").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_fire", 15));
break;
case 4: // Weakness (Nausea for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault4").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_cave", 15));
break;
case 5: // Wither (Blindness for players)
tooltip.add(new TextComponentTranslation("info.mocreatures.stingdefault5").setStyle(new Style().setColor(TextFormatting.BLUE)).getFormattedText());
tooltip.add(TextFormatting.BLUE + I18n.format("info." + MoCConstants.MOD_ID + ".sting_weapon_undead", 15));
break;
default:
break;
Expand Down
15 changes: 5 additions & 10 deletions src/main/resources/assets/mocreatures/lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,8 @@ info.mocreatures.setbonusscorp2=Permanente Resistenz
info.mocreatures.setbonusscorp3=Permanenter Feuerschutz
info.mocreatures.setbonusscorp4=Permanente Nachtsicht
info.mocreatures.setbonusscorp5=Permanente Stärke
info.mocreatures.stingaxe1=Fügt dem Ziel 15 Sekunden lang Gift II zu
info.mocreatures.stingaxe2=Fügt dem Ziel 15 Sekunden lang Langsamkeit zu
info.mocreatures.stingaxe3=Verbrennt das Ziel für 15 Sekunden
info.mocreatures.stingaxe4=Fügt dem Ziel 15 Sekunden lang Schwäche (Übelkeit bei Spielern) zu
info.mocreatures.stingaxe5=Fügt dem Ziel 15 Sekunden lang Verdorrung (Blindheit bei Spielern) zu
info.mocreatures.stingdefault1=Fügt dem Ziel 10 Sekunden lang Gift II zu
info.mocreatures.stingdefault2=Fügt dem Ziel 10 Sekunden lang Langsamkeit zu
info.mocreatures.stingdefault3=Verbrennt das Ziel für 10 Sekunden
info.mocreatures.stingdefault4=Fügt dem Ziel 10 Sekunden lang Schwäche (Übelkeit bei Spielern) zu
info.mocreatures.stingdefault5=Fügt dem Ziel 10 Sekunden lang Verdorrung (Blindheit bei Spielern) zu
info.mocreatures.sting_weapon_cave=Fügt dem Ziel %d Sekunden lang Schwäche (Übelkeit bei Spielern) zu
info.mocreatures.sting_weapon_dirt=Fügt dem Ziel %d Sekunden lang Gift II zu
info.mocreatures.sting_weapon_fire=Verbrennt das Ziel für %d Sekunden
info.mocreatures.sting_weapon_frost=Fügt dem Ziel %d Sekunden lang Langsamkeit zu
info.mocreatures.sting_weapon_undead=Fügt dem Ziel %d Sekunden lang Verdorrung (Blindheit bei Spielern) zu
15 changes: 5 additions & 10 deletions src/main/resources/assets/mocreatures/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,8 @@ info.mocreatures.setbonusscorp2=Permanent Resistance
info.mocreatures.setbonusscorp3=Permanent Fire Resistance
info.mocreatures.setbonusscorp4=Permanent Night Vision
info.mocreatures.setbonusscorp5=Permanent Strength
info.mocreatures.stingaxe1=Inflicts Poison II on the target for 15 seconds
info.mocreatures.stingaxe2=Inflicts Slowness on the target for 15 seconds
info.mocreatures.stingaxe3=Burns the target for 15 seconds
info.mocreatures.stingaxe4=Inflicts Weakness on the target (Nausea on players) for 15 seconds
info.mocreatures.stingaxe5=Inflicts Wither on the target (Blindness on players) for 15 seconds
info.mocreatures.stingdefault1=Inflicts Poison II on the target for 10 seconds
info.mocreatures.stingdefault2=Inflicts Slowness on the target for 10 seconds
info.mocreatures.stingdefault3=Burns the target for 10 seconds
info.mocreatures.stingdefault4=Inflicts Weakness on the target (Nausea on players) for 10 seconds
info.mocreatures.stingdefault5=Inflicts Wither on the target (Blindness on players) for 10 seconds
info.mocreatures.sting_weapon_cave=Inflicts Weakness on the target (Nausea on players) for %d seconds
info.mocreatures.sting_weapon_dirt=Inflicts Poison II on the target for %d seconds
info.mocreatures.sting_weapon_fire=Burns the target for %d seconds
info.mocreatures.sting_weapon_frost=Inflicts Slowness on the target for %d seconds
info.mocreatures.sting_weapon_undead=Inflicts Wither on the target (Blindness on players) for %d seconds
15 changes: 5 additions & 10 deletions src/main/resources/assets/mocreatures/lang/fr_fr.lang
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,8 @@ info.mocreatures.setbonusscorp2=Résistance permanente
info.mocreatures.setbonusscorp3=Résistance au feu permanente
info.mocreatures.setbonusscorp4=Nyctalopie permanente
info.mocreatures.setbonusscorp5=Force permanente
info.mocreatures.stingaxe1=Inflige poison II aux ennemis pendant 15 secondes
info.mocreatures.stingaxe2=Inflige lenteur aux ennemis pendant 15 secondes
info.mocreatures.stingaxe3=Brûle l'ennemi pendant 15 secondes
info.mocreatures.stingaxe4=Inflige faiblesse aux ennemis (Nausée pour les joueurs) pendant 15 secondes
info.mocreatures.stingaxe5=Inflige Wither aux ennemis (Cécite pour les joueurs) pendant 15 secondes
info.mocreatures.stingdefault1=Inflige poison II aux ennemis pendant 10 secondes
info.mocreatures.stingdefault2=Inflige lenteur aux ennemis pendant 10 secondes
info.mocreatures.stingdefault3=Brûle l'ennemi pendant 10 secondes
info.mocreatures.stingdefault4=Inflige faiblesse aux ennemis (Nausée pour les joueurs) pendant 10 secondes
info.mocreatures.stingdefault5=Inflige Wither aux ennemis (Cécite pour les joueurs) pendant 10 secondes
info.mocreatures.sting_weapon_cave=Inflige faiblesse aux ennemis (Nausée pour les joueurs) pendant %d secondes
info.mocreatures.sting_weapon_dirt=Inflige poison II aux ennemis pendant %d secondes
info.mocreatures.sting_weapon_fire=Brûle l'ennemi pendant %d secondes
info.mocreatures.sting_weapon_frost=Inflige lenteur aux ennemis pendant %d secondes
info.mocreatures.sting_weapon_undead=Inflige Wither aux ennemis (Cécite pour les joueurs) pendant %d secondes

0 comments on commit 2369f35

Please sign in to comment.