From 2f31b855ae639607bca949809067192dd23ebbc2 Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Mon, 25 Sep 2017 09:59:47 +0300 Subject: [PATCH] Added configuration for Handheld filler --- .../actuallyadditions/mod/config/values/ConfigIntValues.java | 5 ++++- .../ellpeck/actuallyadditions/mod/items/ItemFillingWand.java | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java index e2c8f7ee4..0f5cf347a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java @@ -33,7 +33,10 @@ public enum ConfigIntValues{ DRILL_ENERGY_CAPACITY("Drill: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 250000, 1000, 1000000000, "Amount of energy Drill can store."), DRILL_ENERGY_TRANSFER("Drill: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Drill can receive per tick."), - DRILL_ENERGY_USE("Drill: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 100, 1, 1000000000, "Amount of energy Drill uses to mine block."); + DRILL_ENERGY_USE("Drill: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 100, 1, 1000000000, "Amount of energy Drill uses to mine block."), + HANDHELD_FILLER_ENERGY_CAPACITY("Handheld Filler: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 500000, 1000, 1000000000, "Amount of energy Handheld Filler can store."), + HANDHELD_FILLER_ENERGY_TRANSFER("Handheld Filler: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Handheld Filler can receive per tick."), + HANDHELD_FILLER_ENERGY_USE("Handheld Filler: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 1500, 1, 1000000000, "Amount of energy Handheld Filler uses to place block."); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java index 5210271f2..16f5cddf6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.items; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; @@ -38,7 +39,7 @@ import java.util.List; public class ItemFillingWand extends ItemEnergy{ public ItemFillingWand(String name){ - super(500000, 1000, name); + super(ConfigIntValues.HANDHELD_FILLER_ENERGY_CAPACITY.getValue(), ConfigIntValues.HANDHELD_FILLER_ENERGY_TRANSFER.getValue(), name); } private static boolean removeFittingItem(IBlockState state, EntityPlayer player){ @@ -154,7 +155,7 @@ public class ItemFillingWand extends ItemEnergy{ BlockPos secondPos = new BlockPos(compound.getInteger("SecondX"), compound.getInteger("SecondY"), compound.getInteger("SecondZ")); if(!BlockPos.ORIGIN.equals(firstPos) && !BlockPos.ORIGIN.equals(secondPos)){ - int energyUse = 1500; + int energyUse = ConfigIntValues.HANDHELD_FILLER_ENERGY_USE.getValue(); IBlockState replaceState = loadBlock(stack); if(replaceState != null && (creative || this.getEnergyStored(stack) >= energyUse)){