diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
deleted file mode 100644
index a204c39c..00000000
--- a/.github/workflows/pages.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Simple workflow for deploying static content to GitHub Pages
-name: Deploy static content to Pages
-
-on:
- # Runs on pushes targeting the default branch
- push:
- branches: ["gh-pages"]
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions:
- contents: read
- pages: write
- id-token: write
-
-# Allow one concurrent deployment
-concurrency:
- group: "pages"
- cancel-in-progress: true
-
-jobs:
- # Single deploy job since we're just deploying
- deploy:
- environment:
- name: github-pages
- url: ${{ steps.deployment.outputs.page_url }}
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Setup Pages
- uses: actions/configure-pages@v2
- - name: Generate Index
- shell: bash
- run: |
- find . -name javadoc -type d -print > index.txt
- echo feature/doc >> index.txt
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v1
- with:
- # Upload entire repository
- path: '.'
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v1
diff --git a/.github/workflows/publish-javadoc.yaml b/.github/workflows/publish-javadoc.yaml
index 0196d82f..cd635557 100644
--- a/.github/workflows/publish-javadoc.yaml
+++ b/.github/workflows/publish-javadoc.yaml
@@ -20,13 +20,16 @@ jobs:
outputs:
result_hash: ${{ steps.deploy.outputs.hash }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- - uses: actions/setup-java@v2
+ - uses: actions/setup-java@v3
with:
- java-version: 8
+ java-version: |
+ 8
+ 11
+ 17
distribution: 'temurin'
cache: gradle
@@ -51,7 +54,7 @@ jobs:
echo Nothing to deploy
exit 0
fi
- find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' > index.txt
+ find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
git add index.txt
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
diff --git a/addon.gradle b/addon.gradle
index 35a01be0..32cd6394 100644
--- a/addon.gradle
+++ b/addon.gradle
@@ -1,4 +1,10 @@
javadoc {
+ javadocTool = javaToolchains.javadocToolFor {
+ // Last version with frames, but it also has search
+ languageVersion = JavaLanguageVersion.of(11)
+ vendor = JvmVendorSpec.ADOPTIUM
+ }
+
inputs.file "src/main/javadoc/overview.html"
include "com/gtnewhorizon/structurelib/alignment/**"
@@ -14,6 +20,7 @@ javadoc {
overview "src/main/javadoc/overview.html"
links 'https://docs.oracle.com/javase/8/docs/api/'
links 'https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/'
+ addBooleanOption("-frames", true)
}
}
diff --git a/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java b/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java
index 460a2849..f8392660 100644
--- a/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java
+++ b/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java
@@ -42,54 +42,54 @@ import cpw.mods.fml.common.registry.GameRegistry;
/**
* A brief index of everything contained
- *
Control blocks
A lot of these might seem to make more sense as a default function on
+ * Control blocks
A lot of these might seem to make more sense as a default function on
* {@link IStructureElement}. However, in that case javac generic will often fail to infer the type for you, so we have
* to define them as static methods
- * If block
Provide if block, allowing downstream call only if user specified conditions are meet (i.e.
+ * If block
Provide if block, allowing downstream call only if user specified conditions are meet (i.e.
* predicate returns true)
*
* - {@link #onlyIf(Predicate, IStructureElement)} and its overloads
*
- * Switch block
Provide switch block, allowing to select a downstream element by using a key or index computed
+ * Switch block
Provide switch block, allowing to select a downstream element by using a key or index computed
* from trigger item and/or context object.
*
* - {@link #partitionBy(Function, IStructureElement[])} and its overloads
*
- * Or Chain
Provide a short-circuiting OR chain.
+ * Or Chain
Provide a short-circuiting OR chain.
*
* - {@link #ofChain(IStructureElement[])} and its overloads
*
- * Side effect
Provide callbacks on various occasion
+ * Side effect
Provide callbacks on various occasion
*
* - {@link #onElementPass(Consumer, IStructureElement)}: Call an callback upon element check success
* - {@link #onElementFail(Consumer, IStructureElement)}: Call an callback upon element check failure
*
*
- * Other Primitives
- * Error statement
Unconditionally return false.
+ * Other Primitives
+ * Error statement
Unconditionally return false.
*
- * Context Object Change
Switch the context object.
+ * Context Object Change
Switch the context object.
*
* - {@link #withContext(IStructureElement)}: switch context to the extended context
*
- * Channel Change
Change the channel. See Channels section
+ * Channel Change
Change the channel. See Channels section
* on overview for more information.
*
* - {@link #withChannel(String, IStructureElement)}: switch channel using
* {@link ChannelDataAccessor#withChannel(ItemStack, String)} when a trigger item is present.
*
- * Spawn hint particle
Just spawn a hint. Do nothing otherwise. Useful when you want to override the hint
+ * Spawn hint particle
Just spawn a hint. Do nothing otherwise. Useful when you want to override the hint
* provided by another structure element, or as a fallback to a structure element that is check only.
*
* - {@link #ofHint(int)}, {@link #ofHintDeferred(Supplier)} and its overloads
*
*
- * Actual Element
These elements are elements that can actually do structure check, spawn hint and do auto
+ * Actual Element
These elements are elements that can actually do structure check, spawn hint and do auto
* place. Elements listed in above 2 sections are not going to be helpful without elements like these. They also serve
* as a reference implementation for your own custom {@link IStructureElement} implementations.
- * Simple Block Element
These accept one or more different block types in one location.
+ * Simple Block Element
These accept one or more different block types in one location.
*
* - {@link #ofBlock(Block, int, Block, int)}, {@link #ofBlocksFlat(Map, Block, int)},
* {@link #ofBlocksMap(Map, Block, int)} and their overloads: the most basic form
@@ -98,7 +98,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
* - {@link #isAir()}, {@link #notAir()}: They are supplied by default under the identifier {@code '-'} and
* {@code '+'} respectively, but are provided here regardless in case you want to use them as a fallback.
*
- * Complex Block Element
In case your logic on determining which block is accepted is complex, use these.
+ * Complex Block Element
In case your logic on determining which block is accepted is complex, use these.
*
* - {@link #ofBlockAdder(IBlockAdder, Block, int)}, {@link #ofBlockAdderHint(IBlockAdder, Block, int)} and their
* overloads: hands off actual adder logic to an {@link IBlockAdder} you supplied. Save you the boilerplate of querying
@@ -110,7 +110,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
* Similar to block adder, but for tile entities.
*
*
- * Helper Methods
These don't construct a {@link IStructureElement}, but is helpful to the instantiation or
+ * Helper Methods
These don't construct a {@link IStructureElement}, but is helpful to the instantiation or
* implementation of these.
*
* - {@link #survivalPlaceBlock(Block, int, World, int, int, int, IItemSource, EntityPlayer, Consumer)} and its
@@ -595,7 +595,7 @@ public class StructureUtility {
* Example:
*
* Assume you have 16 tier, each map to one block's 16 different meta. You will usually want something like this
- *
+ *
*
* public class Tile extends TileEntity {
* private static final Block B = getTargetBlock();
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index 941f0e84..96c47577 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -1,4 +1,4 @@
-
+
API Overview
@@ -219,7 +219,7 @@ whereas all these structure elements are designed without considering channels w
import com.gtnewhorizon.structurelib.structure.IStructureElement;
-public class MyHatchElement<T> implements IStructureElement<T> {
+public class MyHatchElement<T> implements IStructureElement<T> {
//...
{@literal @}Override
public PlaceResult survivalPlaceBlock(