Improve docs

This commit is contained in:
Raoul Van den Berge
2016-08-08 21:32:23 +02:00
parent 374fcab012
commit 0f65462495
2 changed files with 8 additions and 8 deletions

View File

@@ -12,11 +12,11 @@ public interface IGridHandler {
/**
* Called when a player tries to extract an item from the grid.
*
* @param id The ID of the item we're trying to extract
* @param hash The hash of the item we're trying to extract, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)}
* @param flags How we are extracting, see {@link GridExtractFlags}
* @param player The player that is attempting the extraction
*/
void onExtract(int id, int flags, EntityPlayerMP player);
void onExtract(int hash, int flags, EntityPlayerMP player);
/**
* Called when a player tries to insert an item to the grid.
@@ -38,10 +38,10 @@ public interface IGridHandler {
/**
* Called when a player requested crafting for an item.
*
* @param id The ID of the item we're requesting crafting for
* @param hash The hash of the item we're requesting crafting for, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)}
* @param quantity The amount of that item that has to be crafted
*/
void onCraftingRequested(int id, int quantity);
void onCraftingRequested(int hash, int quantity);
/**
* Called when a player wants to cancel a crafting task.

View File

@@ -21,8 +21,8 @@ public class GridHandler implements IGridHandler {
}
@Override
public void onExtract(int id, int flags, EntityPlayerMP player) {
ItemStack item = network.getStorage().get(id);
public void onExtract(int hash, int flags, EntityPlayerMP player) {
ItemStack item = network.getStorage().get(hash);
if (item == null) {
return;
@@ -113,12 +113,12 @@ public class GridHandler implements IGridHandler {
}
@Override
public void onCraftingRequested(int id, int quantity) {
public void onCraftingRequested(int hash, int quantity) {
if (quantity <= 0 || quantity > MAX_CRAFTING_PER_REQUEST) {
return;
}
ItemStack stack = network.getStorage().get(id);
ItemStack stack = network.getStorage().get(hash);
if (stack == null) {
return;