Skip to content

Commit

Permalink
Change some java doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfieboy09 committed Nov 13, 2024
1 parent 51d58ae commit b1cea34
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
public class ExtendedEnergyStorage extends EnergyStorage {
private final BlockEntity be;
/**
* Creates a new ExtendedEnergyStorage instance with the specified capacity.
* Creates a new {@link ExtendedEnergyStorage} instance with the specified capacity.
*
* @param capacity the maximum amount of energy that can be stored
* @param be the block entity associated with this storage
*/
public ExtendedEnergyStorage(int capacity,BlockEntity be) {
public ExtendedEnergyStorage(int capacity, BlockEntity be) {
super(capacity);
this.be = be;
}

/**
* Creates a new ExtendedEnergyStorage instance with the specified capacity and maximum transfer amount.
* Creates a new {@link ExtendedEnergyStorage} instance with the specified capacity and maximum transfer amount.
*
* @param capacity the maximum amount of energy that can be stored
* @param maxTransfer the maximum amount of energy that can be transferred in a single operation
Expand All @@ -30,14 +30,22 @@ public ExtendedEnergyStorage(int capacity, int maxTransfer, BlockEntity be) {
super(capacity, maxTransfer);
this.be = be;
}


/**
* Creates a new {@link ExtendedEnergyStorage} instance with the specified capacity, maximum receive amount, and maximum extract amount.
*
* @param capacity The maximum amount of energy that can be stored
* @param maxReceive The maximum amount of energy that can be received in a single operation
* @param maxExtract The maximum amount of energy that can be extracted in a single operation
* @param be The block entity associated with this storage
*/
public ExtendedEnergyStorage(int capacity, int maxReceive, int maxExtract, BlockEntity be) {
super(capacity, maxReceive, maxExtract);
this.be = be;
}

/**
* Creates a new ExtendedEnergyStorage instance with the specified capacity, maximum receive amount, maximum extract amount, and initial energy amount.
* Creates a new {@link ExtendedEnergyStorage} instance with the specified capacity, maximum receive amount, maximum extract amount, and initial energy amount.
*
* @param capacity the maximum amount of energy that can be stored
* @param maxReceive the maximum amount of energy that can be received in a single operation
Expand All @@ -53,7 +61,7 @@ public ExtendedEnergyStorage(int capacity, int maxReceive, int maxExtract, int e
/**
* Sets the current energy amount to the specified value, clamping it to the range [0, capacity].
*
* @param energy the new energy amount
* @param energy The new energy amount
*/
public void setEnergy(int energy) {
if(energy < 0)
Expand Down Expand Up @@ -117,7 +125,7 @@ public int extractEnergy(int toExtract, boolean simulate) {
}
return toReturn;
}

public void onEnergyChanged() {
this.be.setChanged();
}
Expand Down

0 comments on commit b1cea34

Please sign in to comment.