mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-23 07:38:34 +01:00
Added yet another configuration option for Shock Absorber
This commit is contained in:
parent
9ee66ecb2c
commit
55827f10b3
5 changed files with 7 additions and 7 deletions
|
@ -48,7 +48,8 @@ public class BlockShockSuppressor extends BlockContainerBase{
|
|||
List<BlockPos> affectedBlocks = event.getAffectedBlocks();
|
||||
List<Entity> affectedEntities = event.getAffectedEntities();
|
||||
|
||||
int rangeSq = TileEntityShockSuppressor.RANGE*TileEntityShockSuppressor.RANGE;
|
||||
int range = ConfigIntValues.SHOCK_ABSORBER_WORK_RANGE.getValue();
|
||||
int rangeSq = range*range;
|
||||
int energyUse = ConfigIntValues.SHOCK_ABSORBER_ENERGY_USE.getValue();
|
||||
|
||||
for(TileEntityShockSuppressor suppressor : TileEntityShockSuppressor.SUPPRESSORS){
|
||||
|
|
|
@ -231,9 +231,9 @@ public final class InitBooklet{
|
|||
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
||||
new BookletChapter("repairer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("<rf>", TileEntityItemRepairer.ENERGY_USE));
|
||||
new BookletChapter("longRangeBreaker", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockDirectionalBreaker), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityDirectionalBreaker.ENERGY_USE).addTextReplacement("<range>", TileEntityDirectionalBreaker.RANGE), new PageCrafting(2, BlockCrafting.recipeDirectionalBreaker).setWildcard());
|
||||
new BookletChapter("playerInterface", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockPlayerInterface), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.PLAYER_INTERFACE_DEFAULT_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePlayerInterface).setNoText()).setSpecial();
|
||||
new BookletChapter("playerInterface", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockPlayerInterface), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.PLAYER_INTERFACE_WORK_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePlayerInterface).setNoText()).setSpecial();
|
||||
new BookletChapter("displayStand", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockDisplayStand), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeDisplayStand).setNoText()).setSpecial();
|
||||
new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockShockSuppressor), new PageTextOnly(1).addTextReplacement("<range>", TileEntityShockSuppressor.RANGE).addTextReplacement("<rf>", ConfigIntValues.SHOCK_ABSORBER_ENERGY_USE.getValue()), new PageCrafting(2, BlockCrafting.recipeShockSuppressor));
|
||||
new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockShockSuppressor), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.SHOCK_ABSORBER_WORK_RANGE.getValue()).addTextReplacement("<rf>", ConfigIntValues.SHOCK_ABSORBER_ENERGY_USE.getValue()), new PageCrafting(2, BlockCrafting.recipeShockSuppressor));
|
||||
|
||||
//RF Generating Blocks
|
||||
new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
|
|
|
@ -95,9 +95,10 @@ public enum ConfigIntValues{
|
|||
SHOCK_ABSORBER_ENERGY_CAPACITY("Shock Absorber: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 300000, 1000, 1000000000, "Amount of energy Shock Absorber can store."),
|
||||
SHOCK_ABSORBER_ENERGY_RECEIVE("Shock Absorber: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 400, 1, 1000000000, "Amount of energy Shock Absorber can receive per tick."),
|
||||
SHOCK_ABSORBER_ENERGY_USE("Shock Absorber: Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, 300, 1, 1000000000, "Amount of energy Shock Absorber uses to protect block or entity."),
|
||||
SHOCK_ABSORBER_WORK_RANGE("Shock Absorber: Work Range", ConfigCategories.MACHINE_VALUES, 5, 1, 16, "Distance in block in which Shock Absorber protects blocks and entities."),
|
||||
PLAYER_INTERFACE_ENERGY_CAPACITY("Player Interface: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 30000, 1000, 1000000000, "Amount of energy Player Interface can store."),
|
||||
PLAYER_INTERFACE_ENERGY_RECEIVE("Player Interface: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 50, 1, 1000000000, "Amount of energy Player Interface can receive per tick.\nThis option defines rate of charging items in player's inventory."),
|
||||
PLAYER_INTERFACE_DEFAULT_RANGE("Player Interface: Default Range", ConfigCategories.MACHINE_VALUES, 32, 1, 64, "Distance in block in which Player Interface works.");
|
||||
PLAYER_INTERFACE_WORK_RANGE("Player Interface: Work Range", ConfigCategories.MACHINE_VALUES, 32, 1, 64, "Distance in block in which Player Interface works.");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -71,7 +71,7 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy
|
|||
if(!this.world.isRemote){
|
||||
boolean changed = false;
|
||||
|
||||
this.range = TileEntityPhantomface.upgradeRange(ConfigIntValues.PLAYER_INTERFACE_DEFAULT_RANGE.getValue(), this.world, this.pos);
|
||||
this.range = TileEntityPhantomface.upgradeRange(ConfigIntValues.PLAYER_INTERFACE_WORK_RANGE.getValue(), this.world, this.pos);
|
||||
|
||||
EntityPlayer player = this.getPlayer();
|
||||
if(player != null){
|
||||
|
|
|
@ -22,8 +22,6 @@ public class TileEntityShockSuppressor extends TileEntityBase implements IEnergy
|
|||
|
||||
public static final List<TileEntityShockSuppressor> SUPPRESSORS = new ArrayList<TileEntityShockSuppressor>();
|
||||
|
||||
public static final int RANGE = 5;
|
||||
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(ConfigIntValues.SHOCK_ABSORBER_ENERGY_CAPACITY.getValue(), ConfigIntValues.SHOCK_ABSORBER_ENERGY_RECEIVE.getValue(), 0);
|
||||
private int oldEnergy;
|
||||
|
||||
|
|
Loading…
Reference in a new issue