Compare commits

..

7 Commits

Author SHA1 Message Date
Auxilor
9a66e78dcd Merge remote-tracking branch 'origin/master' 2022-03-07 10:29:15 +00:00
Auxilor
0fcf229bfb Fixed missing javadoc jar 2022-03-07 10:28:59 +00:00
Will FP
d2ffc43b17 Update README.md 2022-03-07 10:25:50 +00:00
Auxilor
c50f69b372 Fixed javadoc 2022-03-07 10:16:52 +00:00
Will FP
f5eafafc4c Update README.md 2022-03-06 15:50:39 +00:00
Auxilor
39372c9b1a Updated to 6.27.2 2022-03-06 13:59:51 +00:00
Auxilor
4c64f03aa1 Fixed isCustomItem 2022-03-06 13:59:42 +00:00
6 changed files with 20 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ and many more.
# For developers # For developers
## Javadoc ## Javadoc
The 6.13.0 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.13.0/javadoc/) The 6.27.2 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.27.2/javadoc/)
## Plugin Information ## Plugin Information
@@ -68,7 +68,7 @@ dependencies {
} }
``` ```
Replace `Tag` with a release tag for eco, eg `6.13.0`. Replace `Tag` with a release tag for eco, eg `6.27.2`.
Maven: Maven:
@@ -88,7 +88,7 @@ Maven:
</dependency> </dependency>
``` ```
Replace `Tag` with a release tag for eco, eg `6.13.0`. Replace `Tag` with a release tag for eco, eg `6.27.2`.
## Build locally: ## Build locally:

View File

@@ -12,6 +12,10 @@ dependencies {
group 'com.willfp' group 'com.willfp'
version rootProject.version version rootProject.version
java {
withJavadocJar()
}
build.dependsOn publishToMavenLocal build.dependsOn publishToMavenLocal
publishing { publishing {

View File

@@ -40,9 +40,9 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/** /**
* Tick the goal. * Tick the goal.
* <p> * <p>
* Runs ever tick as long as {@link this#canUse()} returns true. * Runs ever tick as long as canUse returns true.
* <p> * <p>
* Runs after {@link this#start()}. * Runs after start().
*/ */
public void tick() { public void tick() {
// Override when needed. // Override when needed.
@@ -51,7 +51,7 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/** /**
* Start the goal. * Start the goal.
* <p> * <p>
* Runs once {@link this#canUse()} returns true. * Runs once canUse() returns true.
*/ */
public void start() { public void start() {
// Override when needed. // Override when needed.
@@ -60,7 +60,7 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/** /**
* Stop the goal. * Stop the goal.
* <p> * <p>
* Runs once {@link this#canUse()} returns false. * Runs once canUse() returns false.
*/ */
public void stop() { public void stop() {
// Override when needed. // Override when needed.

View File

@@ -298,7 +298,7 @@ public final class Items {
* @param itemStack The itemStack to check. * @param itemStack The itemStack to check.
* @return If is recipe. * @return If is recipe.
*/ */
public static boolean isCustomItem(@NotNull final ItemStack itemStack) { public static boolean isCustomItem(@Nullable final ItemStack itemStack) {
return getCustomItem(itemStack) != null; return getCustomItem(itemStack) != null;
} }
@@ -309,7 +309,11 @@ public final class Items {
* @return The custom item, or null if not exists. * @return The custom item, or null if not exists.
*/ */
@Nullable @Nullable
public static CustomItem getCustomItem(@NotNull final ItemStack itemStack) { public static CustomItem getCustomItem(@Nullable final ItemStack itemStack) {
if (itemStack == null) {
return null;
}
return CACHE.get(HashedItem.of(itemStack)).map(Items::getOrWrap).orElse(null); return CACHE.get(HashedItem.of(itemStack)).map(Items::getOrWrap).orElse(null);
} }

View File

@@ -16,7 +16,7 @@ public interface LookupHandler<T extends Testable<?>> {
* <p> * <p>
* You shouldn't override this method unless you're doing something * You shouldn't override this method unless you're doing something
* technically interesting or weird. This is the entry point for all * technically interesting or weird. This is the entry point for all
* lookup parsers, {@link this#parse(String[])} is to specify implementation-specific * lookup parsers, parse() is to specify implementation-specific
* parsing. * parsing.
* *
* @param key The key. * @param key The key.
@@ -56,7 +56,7 @@ public interface LookupHandler<T extends Testable<?>> {
/** /**
* Get the failsafe object. * Get the failsafe object.
* <p> * <p>
* A failsafe object should never pass {@link this#validate(Testable)}, as this will * A failsafe object should never pass validate(), as this will
* cause issues with segment parsers. See {@link com.willfp.eco.core.items.ItemsLookupHandler} and * cause issues with segment parsers. See {@link com.willfp.eco.core.items.ItemsLookupHandler} and
* {@link com.willfp.eco.core.recipe.parts.EmptyTestableItem} for examples. * {@link com.willfp.eco.core.recipe.parts.EmptyTestableItem} for examples.
* *

View File

@@ -1,3 +1,3 @@
version = 6.27.1 version = 6.27.2
plugin-name = eco plugin-name = eco
kotlin.code.style = official kotlin.code.style = official