mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Added Config for new Rings
This commit is contained in:
parent
4476b3c7c2
commit
844a618bcb
4 changed files with 23 additions and 10 deletions
|
@ -73,7 +73,6 @@
|
|||
-Ring of Thorns: Hurts Attackers when they hit you with a Projectile
|
||||
-Ring of Water Walking
|
||||
-Ring of Aquadive: Fast underwater movement
|
||||
-Ring of Suction: Sucks up Items in the area
|
||||
-Ring of Water Absorption: Removes Water around
|
||||
-Ring of Unarmoring: Attacker lose parts of their Armor
|
||||
|
||||
|
|
|
@ -134,7 +134,15 @@ public enum ConfigIntValues{
|
|||
|
||||
TELE_STAFF_REACH("TeleStaff: Range", ConfigCategories.MACHINE_VALUES, 100, 5, 200, "How far the TeleStaff can teleport you"),
|
||||
TELE_STAFF_ENERGY_USE("TeleStaff: Energy Use per Block", ConfigCategories.MACHINE_VALUES, 200, 1, 5000, "How much energy the TeleStaff uses per Block you teleport"),
|
||||
TELE_STAFF_WAIT_TIME("TeleStaff: Wait Time", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The time the TeleStaff takes between Teleports");
|
||||
TELE_STAFF_WAIT_TIME("TeleStaff: Wait Time", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The time the TeleStaff takes between Teleports"),
|
||||
|
||||
GROWTH_RING_RANGE("Growth Ring: Range", ConfigCategories.MACHINE_VALUES, 5, 1, 30, "The Range the Growth Ring has"),
|
||||
GROWTH_RING_COOLDOWN("Growth Ring: Cooldown Time", ConfigCategories.MACHINE_VALUES, 30, 0, 1000, "The Time between Growth Bursts"),
|
||||
GROWTH_RING_ENERGY_USE("Growth Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 550, 10, 6000, "The Amount of Energy used per Tick"),
|
||||
GROWTH_RING_GROWTH_PER_CYCLE("Growth Ring: Growth Ticks per Cycle", ConfigCategories.MACHINE_VALUES, 45, 1, 200, "The Amount of plants that get ticked per cycle"),
|
||||
|
||||
MAGNET_RING_RANGE("Magnet Ring: Range", ConfigCategories.MACHINE_VALUES, 5, 3, 30, "The Range of the Magnet Ring"),
|
||||
MAGNET_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Magnet Ring uses per tick");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
|
@ -23,12 +24,12 @@ import java.util.Random;
|
|||
|
||||
public class ItemGrowthRing extends ItemEnergy implements INameableItem{
|
||||
|
||||
private static final int RANGE = 5;
|
||||
private static final int ENERGY_USED_PER_TICK = 500;
|
||||
private static final int RANGE = ConfigIntValues.GROWTH_RING_RANGE.getValue();
|
||||
private static final int ENERGY_USED_PER_TICK = ConfigIntValues.GROWTH_RING_ENERGY_USE.getValue();
|
||||
//The waiting time per growth cycle
|
||||
private static final int WAIT_TIME = 30;
|
||||
private static final int WAIT_TIME = ConfigIntValues.GROWTH_RING_COOLDOWN.getValue();
|
||||
//The amount of Growth Ticks given to random plants around
|
||||
private static final int GROWTH_TICKS_PER_CYCLE = 50;
|
||||
private static final int GROWTH_TICKS_PER_CYCLE = ConfigIntValues.GROWTH_RING_GROWTH_PER_CYCLE.getValue();
|
||||
|
||||
public ItemGrowthRing(){
|
||||
super(1000000, 5000, 2);
|
||||
|
@ -83,7 +84,9 @@ public class ItemGrowthRing extends ItemEnergy implements INameableItem{
|
|||
else stack.stackTagCompound.setInteger("WaitTime", waitTime+1);
|
||||
|
||||
//Use Energy every tick
|
||||
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -19,8 +20,8 @@ import java.util.ArrayList;
|
|||
|
||||
public class ItemMagnetRing extends ItemEnergy implements INameableItem{
|
||||
|
||||
private static final int RANGE = 8;
|
||||
private static final int ENERGY_USED_PER_TICK = 3;
|
||||
private static final int RANGE = ConfigIntValues.MAGNET_RING_RANGE.getValue();
|
||||
private static final int ENERGY_USED_PER_TICK = ConfigIntValues.MAGNET_RING_ENERGY_USE.getValue();
|
||||
|
||||
public ItemMagnetRing(){
|
||||
super(3000000, 5000, 1);
|
||||
|
@ -50,7 +51,9 @@ public class ItemMagnetRing extends ItemEnergy implements INameableItem{
|
|||
}
|
||||
|
||||
//Use Energy per tick
|
||||
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
|
||||
if(!((EntityPlayer)entity).capabilities.isCreativeMode){
|
||||
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue