Skip to content

Commit

Permalink
Add config for bow damage mult
Browse files Browse the repository at this point in the history
  • Loading branch information
democat3457 committed Jan 19, 2021
1 parent 61aa590 commit 96b21e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'

version = "1.4.2"
version = "1.4.3"
group = "de.ellpeck.nyx"
archivesBaseName = "Nyx"

Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions src/main/java/de/ellpeck/nyx/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public final class Config {
public static boolean eventNotifications;
public static int crystalDurability;
public static int hammerDamage;
public static double bowDamageMultiplier;

public static void init(File file) {
instance = new Configuration(file);
Expand Down Expand Up @@ -110,6 +111,7 @@ public static void load() {
meteorDisallowTime = instance.get("meteors", "meteorDisallowTime", 12000, "The amount of ticks that need to pass for each player until the chance of a meteor spawning in the area is halved (and then halved again, and so on)").getInt();
crystalDurability = instance.get("meteors", "crystalDurability", 1000, "The amount of uses that a gleaning crystal should have for bone-mealing").getInt();
hammerDamage = instance.get("meteors", "hammerDamage", 15, "The amount of damage that the meteor hammer deals if the maximum flight time was used").getInt();
bowDamageMultiplier = instance.get("meteors", "bowDamageMult", 1.75, "The multiplier for the amount of damage inflicted by the meteor bow's arrows").getDouble();

if (instance.hasChanged())
instance.save();
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/de/ellpeck/nyx/items/Bow.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package de.ellpeck.nyx.items;

import de.ellpeck.nyx.Config;

import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -96,7 +98,7 @@ public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBas
}

// edit: increase arrow damage
entityarrow.setDamage(entityarrow.getDamage() * 1.25F);
entityarrow.setDamage(entityarrow.getDamage() * Config.bowDamageMultiplier);

worldIn.spawnEntity(entityarrow);
}
Expand Down

0 comments on commit 96b21e7

Please sign in to comment.