From 5efa6d6251d14b154bfcdd57eb503e634a097671 Mon Sep 17 00:00:00 2001 From: ruifung Date: Thu, 19 Dec 2019 17:18:27 +0800 Subject: [PATCH] Update API JavaDocs for clarification (#4180) * Fix javadoc for IGridBlock.getMachineRepresentation() Javadoc should state proper semantics for that method, and telling people to return null there is a sure crash. #4178 * Update IPart interface javadoc. Update the javadoc to state that functional parts should not be allowed to be placed on dense cables. --- src/api/java/appeng/api/networking/IGridBlock.java | 2 +- src/api/java/appeng/api/parts/IPart.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/java/appeng/api/networking/IGridBlock.java b/src/api/java/appeng/api/networking/IGridBlock.java index 631601b67..1abbc4bf9 100644 --- a/src/api/java/appeng/api/networking/IGridBlock.java +++ b/src/api/java/appeng/api/networking/IGridBlock.java @@ -123,7 +123,7 @@ public interface IGridBlock /** * Determines what item stack is used to render this node in the GUI. * - * @return the render item stack to use to render this node, null is valid, and will not show this node. + * @return the render item stack to use to render this node. Returning an empty ItemStack will not show this node. */ @Nonnull ItemStack getMachineRepresentation(); diff --git a/src/api/java/appeng/api/parts/IPart.java b/src/api/java/appeng/api/parts/IPart.java index 530bb7073..d47fb3a64 100644 --- a/src/api/java/appeng/api/parts/IPart.java +++ b/src/api/java/appeng/api/parts/IPart.java @@ -291,6 +291,9 @@ public interface IPart extends IBoxProvider, ICustomCableConnection /** * Used to determine which parts can be placed on what cables. + * + * Dense cables are not allowed for functional (getGridNode returns a node) parts. + * Doing so will result in crashes. * * @param what placed part * @@ -365,4 +368,4 @@ public interface IPart extends IBoxProvider, ICustomCableConnection return null; } -} \ No newline at end of file +}