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.
This commit is contained in:
ruifung
2019-12-19 17:18:27 +08:00
committed by yueh
parent 4269a66a4b
commit 5efa6d6251
2 changed files with 5 additions and 2 deletions
@@ -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();
+4 -1
View File
@@ -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;
}
}
}