Skip to content

Commit 82cb8e3

Browse files
📝 Add docstrings to Blacksmith-an-stuff
Docstrings generation was requested by @The-Code-Monkey. The following files were modified: * `src/main/java/com/tcm/MineTale/block/workbenches/AlchemistsWorkbench.java` * `src/main/java/com/tcm/MineTale/block/workbenches/entity/AbstractWorkbenchEntity.java` * `src/main/java/com/tcm/MineTale/block/workbenches/entity/AlchemistsWorkbenchEntity.java`
1 parent dfdc081 commit 82cb8e3

3 files changed

Lines changed: 13 additions & 15 deletions

File tree

src/main/java/com/tcm/MineTale/block/workbenches/AlchemistsWorkbench.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class AlchemistsWorkbench extends AbstractWorkbench<AlchemistsWorkbenchEn
2626
public static final MapCodec<AlchemistsWorkbench> CODEC = simpleCodec(AlchemistsWorkbench::new);
2727

2828
/**
29-
* Create a new AlchemistsWorkbench that is configured to use the mod's Alchemists Workbench block entity type.
29+
* Constructs a new AlchemistsWorkbench configured to use the mod's Alchemists Workbench block-entity type.
3030
*
3131
* @param properties block properties for this workbench
3232
*/
@@ -36,20 +36,20 @@ public AlchemistsWorkbench(Properties properties) {
3636
}
3737

3838
/**
39-
* Create an AlchemistsWorkbench with the given block properties and a supplier for its block-entity type.
39+
* Constructs an AlchemistsWorkbench configured with the provided block properties and block-entity type supplier.
4040
*
41-
* @param properties block properties applied to this workbench
41+
* @param properties the block properties to apply to this workbench
4242
* @param supplier supplier that provides the BlockEntityType for the AlchemistsWorkbenchEntity
4343
*/
4444
public AlchemistsWorkbench(Properties properties, Supplier<BlockEntityType<? extends AlchemistsWorkbenchEntity>> supplier) {
4545
super(properties, supplier, IS_WIDE, IS_TALL, 1);
4646
}
4747

4848
/**
49-
* Provides a ticker for workbench block entities when the supplied block entity type matches this block's entity type.
49+
* Supplies the ticker used to update this workbench's block entity instances when appropriate.
5050
*
51-
* @param type the block entity type to match against this block's workbench entity type
52-
* @return a BlockEntityTicker that updates matching workbench block entities, or {@code null} if the types do not match
51+
* @param type the block entity type to check for compatibility with this workbench
52+
* @return the BlockEntityTicker that updates matching workbench block entities, or {@code null} if the provided type is not compatible
5353
*/
5454
@Nullable
5555
@Override
@@ -59,7 +59,7 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, Block
5959
}
6060

6161
/**
62-
* Provide the MapCodec used for serialisation and deserialisation of this workbench.
62+
* Provides the MapCodec used to serialise and deserialise this workbench.
6363
*
6464
* @return the MapCodec for this AlchemistsWorkbench
6565
*/

src/main/java/com/tcm/MineTale/block/workbenches/entity/AbstractWorkbenchEntity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ public void setItem(int slot, ItemStack stack) {
278278
}
279279

280280
/**
281-
* Indicates whether this workbench currently has fuel available to perform crafting.
282-
*
283-
* @return `true` if the workbench has fuel available, `false` otherwise.
284-
*/
281+
* Indicates whether this workbench currently has fuel available to perform crafting.
282+
*
283+
* @return {@code true} if the workbench has fuel available, {@code false} otherwise.
284+
*/
285285
protected abstract boolean hasFuel();
286286

287287
/**

src/main/java/com/tcm/MineTale/block/workbenches/entity/AlchemistsWorkbenchEntity.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,9 @@ public RecipeType<WorkbenchRecipe> getWorkbenchRecipeType() {
153153
}
154154

155155
/**
156-
* Determines whether the workbench currently has fuel available.
156+
* Report that the workbench has fuel available.
157157
*
158-
* Checks that the entity is in a loaded level and that the configured fuel slot contains an item.
159-
*
160-
* @return `true` if the entity is in a loaded level and the fuel slot contains an item, `false` otherwise.
158+
* @return `true` always.
161159
*/
162160
@Override
163161
protected boolean hasFuel() {

0 commit comments

Comments
 (0)