Added configuration for Handheld filler

This commit is contained in:
OneEyeMaker 2017-09-25 09:59:47 +03:00
parent 7b1f08048c
commit 2f31b855ae
2 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -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)){