Added configuration for Ring of Liquid Banning

This commit is contained in:
OneEyeMaker 2017-09-22 08:45:55 +03:00
parent 4b91f41c4a
commit 91685b3bc3
2 changed files with 8 additions and 3 deletions

View file

@ -65,7 +65,11 @@ public enum ConfigIntValues{
TELEPORT_STAFF_ENERGY_CAPACITY("Teleport Staff: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 250000, 1000, 1000000000, "Amount of energy Teleport Staff can store"),
TELEPORT_STAFF_ENERGY_TRANSFER("Teleport Staff: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Teleport Staff can receive per tick"),
TELEPORT_STAFF_ENERGY_USE("Teleport Staff: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 200, 1, 1000000000, "Base amount of energy used by Teleport Staff to teleport player");
TELEPORT_STAFF_ENERGY_USE("Teleport Staff: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 200, 1, 1000000000, "Base amount of energy used by Teleport Staff to teleport player"),
LIQUID_BANNING_RING_ENERGY_CAPACITY("Ring of Liquid Banning: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 800000, 1000, 1000000000, "Amount of energy Ring of Liquid Banning can store"),
LIQUID_BANNING_RING_ENERGY_TRANSFER("Ring of Liquid Banning: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Ring of Liquid Banning can receive per tick"),
LIQUID_BANNING_RING_ENERGY_USE("Ring of Liquid Banning: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 150, 1, 1000000000, "Base amount of energy used by Ring of Liquid Banning to remove liquid block");
public final String name;
public final String category;

View file

@ -11,6 +11,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.StackUtil;
import net.minecraft.block.Block;
@ -26,7 +27,7 @@ import net.minecraft.world.World;
public class ItemWaterRemovalRing extends ItemEnergy{
public ItemWaterRemovalRing(String name){
super(800000, 1000, name);
super(ConfigIntValues.LIQUID_BANNING_RING_ENERGY_CAPACITY.getValue(), ConfigIntValues.LIQUID_BANNING_RING_ENERGY_TRANSFER.getValue(), name);
}
@Override
@ -38,7 +39,7 @@ public class ItemWaterRemovalRing extends ItemEnergy{
EntityPlayer player = (EntityPlayer)entity;
ItemStack equipped = player.getHeldItemMainhand();
int energyUse = 150;
int energyUse = ConfigIntValues.LIQUID_BANNING_RING_ENERGY_USE.getValue();
if(StackUtil.isValid(equipped) && equipped == stack && this.getEnergyStored(stack) >= energyUse){
//Setting everything to air