tterrag1098

Untitled

Jun 12th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.69 KB | None | 0 0
  1. Author:  
  2. Committer:  
  3. Parent: 9cda586ebd402df2e0543444329cfc1dd08172ea (Fix scala mods crashing with the json annotation cache.)
  4. Branch:
  5. Follows:
  6. Precedes:
  7.  
  8.     Local uncommitted changes, not checked in to index
  9.  
  10.  src/main/java/net/minecraftforge/common/capabilities/ICapabilityProvider.java
  11. index 2cc2d6bac..21ba77f9c 100644
  12. @@ -28,30 +28,34 @@ public interface ICapabilityProvider
  13.  {
  14.      /**
  15.       * Determines if this object has support for the capability in question on the specific side.
  16. -     * The return value of this MIGHT change during runtime if this object gains or looses support
  17. +     * The return value of this MIGHT change during runtime if this object gains or loses support
  18.       * for a capability.
  19.       *
  20.       * Example:
  21. -     *   A Pipe getting a cover placed on one side causing it loose the Inventory attachment function for that side.
  22. +     *   A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
  23.       *
  24.       * This is a light weight version of getCapability, intended for metadata uses.
  25.       *
  26.       * @param capability The capability to check
  27.       * @param facing The Side to check from:
  28.       *   CAN BE NULL. Null is defined to represent 'internal' or 'self'
  29. -     * @return True if this object supports the capability.
  30. +     * @return True if this object supports the capability. If true, then {@link #getCapability(Capability, EnumFacing)}
  31. +     * must not return null. As well, if this is false, it must return null.
  32.       */
  33.      boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing);
  34.  
  35.      /**
  36.       * Retrieves the handler for the capability requested on the specific side.
  37. -     * The return value CAN be null if the object does not support the capability.
  38. -     * The return value CAN be the same for multiple faces.
  39. +     * <ul>
  40. +     * <li>The return value MUST be null if the object does not support the capability (as per {@link #hasCapability(Capability, EnumFacing)}).</il>
  41. +     * <li>The return value CAN be the same for multiple faces.</li>
  42. +     * </ul>
  43.       *
  44.       * @param capability The capability to check
  45.       * @param facing The Side to check from:
  46.       *   CAN BE NULL. Null is defined to represent 'internal' or 'self'
  47. -     * @return The requested capability. Returns null when {@link #hasCapability(Capability, EnumFacing)} would return false.
  48. +     * @return The requested capability. Returns null <em>exactly</em> when {@link #hasCapability(Capability, EnumFacing)} would return
  49. +     * false, and never null otherwise.
  50.       */
  51.      @Nullable
  52.      <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing);
Advertisement
Add Comment
Please, Sign In to add comment