-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support slotless item handlers for item transfer
- Loading branch information
1 parent
68c11cb
commit 034c933
Showing
9 changed files
with
190 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
mod_version=1.0.3 | ||
minecraft_version=1.10.2 | ||
forge_version=12.18.1.2091 | ||
forge_version=12.18.2.2116 | ||
mcp_mappings_version=snapshot_20160701 | ||
cyclopscore_version=0.9.0-464 | ||
cyclopscore_version=0.9.0-470 | ||
integrateddynamics_version=0.6.6-396 | ||
release_type=release | ||
|
||
commoncapabilities_version=1.2.0-44 | ||
commoncapabilities_version=1.2.2-74 | ||
teslaapi_version=1.2.1.46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/main/java/org/cyclops/integratedtunnels/api/network/IItemNetwork.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package org.cyclops.integratedtunnels.api.network; | ||
|
||
import net.minecraftforge.items.IItemHandler; | ||
import org.cyclops.commoncapabilities.api.capability.itemhandler.ISlotlessItemHandler; | ||
import org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetwork; | ||
|
||
/** | ||
* A network capability that holds items. | ||
* @author rubensworks | ||
*/ | ||
public interface IItemNetwork extends IPositionedAddonsNetwork, IItemHandler { | ||
public interface IItemNetwork extends IPositionedAddonsNetwork, IItemHandler, ISlotlessItemHandler { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/org/cyclops/integratedtunnels/core/ItemStackPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.cyclops.integratedtunnels.core; | ||
|
||
import com.google.common.base.Predicate; | ||
import net.minecraft.item.ItemStack; | ||
|
||
/** | ||
* A predicate for matching ItemStacks. | ||
* @author rubensworks | ||
*/ | ||
public abstract class ItemStackPredicate implements Predicate<ItemStack> { | ||
|
||
private final ItemStack itemStack; | ||
private final int matchFlags; | ||
|
||
public ItemStackPredicate(ItemStack itemStack, int matchFlags) { | ||
this.itemStack = itemStack; | ||
this.matchFlags = matchFlags; | ||
} | ||
|
||
public ItemStackPredicate() { | ||
this(null, -1); | ||
} | ||
|
||
public ItemStack getItemStack() { | ||
return itemStack; | ||
} | ||
|
||
public int getMatchFlags() { | ||
return matchFlags; | ||
} | ||
|
||
public boolean hasMatchFlags() { | ||
return getMatchFlags() >= 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.