Add recipes for reader/writer, change security manager recipe, formatting

This commit is contained in:
raoulvdberge
2017-01-28 21:53:21 +01:00
parent 605e4f4ec6
commit b147bb5b11
4 changed files with 39 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ public class StorageItemCyclops extends StorageItemExternal {
InventoryTileEntityBase inv = cyclopsInv.get();
if (inv != null) {
int inventoryHash = inv.getInventoryHash();
if (inventoryHash != oldInventoryHash) {
super.detectChanges(network);
oldInventoryHash = inventoryHash;

View File

@@ -3,32 +3,40 @@ package com.raoulvdberge.refinedstorage.integration.cyclopscore;
import com.raoulvdberge.refinedstorage.api.util.IComparer;
import org.cyclops.commoncapabilities.api.capability.itemhandler.ItemMatch;
public class CyclopsComparer {
public final class CyclopsComparer {
public static int comparerFlagsToItemMatch(int flags) {
int itemMatch = 0;
if ((flags & IComparer.COMPARE_DAMAGE) == IComparer.COMPARE_DAMAGE) {
itemMatch |= ItemMatch.DAMAGE;
}
if ((flags & IComparer.COMPARE_NBT) == IComparer.COMPARE_NBT) {
itemMatch |= ItemMatch.NBT;
}
if ((flags & IComparer.COMPARE_QUANTITY) == IComparer.COMPARE_QUANTITY) {
itemMatch |= ItemMatch.STACKSIZE;
}
return itemMatch;
}
public static int itemMatchToComparerFlags(int itemMatch) {
int flags = 0;
if ((itemMatch & ItemMatch.DAMAGE) == ItemMatch.DAMAGE) {
flags |= IComparer.COMPARE_DAMAGE;
}
if ((itemMatch & ItemMatch.NBT) == ItemMatch.NBT) {
flags |= IComparer.COMPARE_NBT;
}
if ((itemMatch & ItemMatch.STACKSIZE) == ItemMatch.STACKSIZE) {
flags |= IComparer.COMPARE_QUANTITY;
}
return flags;
}
}

View File

@@ -19,6 +19,7 @@ public class ImportingBehaviorCyclops implements IImportingBehavior {
if (IFilterable.isEmpty(itemFilters)) {
if (ticks % upgrades.getSpeed() == 0) {
ItemStack result = SlotlessItemHandlerHelper.extractItem(entity, facing, upgrades.getItemInteractCount(), true);
if (result != null && !result.isEmpty() && network.insertItem(result, result.getCount(), true) == null) {
network.insertItem(result, result.getCount(), false);
SlotlessItemHandlerHelper.extractItem(entity, facing, result.copy(), upgrades.getItemInteractCount(), false);

View File

@@ -389,6 +389,30 @@ public class ProxyCommon {
'A', new ItemStack(RSItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED)
);
// Writer
GameRegistry.addShapedRecipe(new ItemStack(RSBlocks.WRITER),
"ECE",
"RMR",
"EIE",
'E', new ItemStack(RSItems.QUARTZ_ENRICHED_IRON),
'C', new ItemStack(RSItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
'R', new ItemStack(Items.REDSTONE),
'M', new ItemStack(RSBlocks.CABLE),
'I', new ItemStack(RSItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED)
);
// Reader
GameRegistry.addShapedRecipe(new ItemStack(RSBlocks.READER),
"EDE",
"RMR",
"EIE",
'E', new ItemStack(RSItems.QUARTZ_ENRICHED_IRON),
'D', new ItemStack(RSItems.CORE, 1, ItemCore.TYPE_DESTRUCTION),
'R', new ItemStack(Items.REDSTONE),
'M', new ItemStack(RSBlocks.CABLE),
'I', new ItemStack(RSItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED)
);
// Crafter
GameRegistry.addRecipe(new ItemStack(RSBlocks.CRAFTER),
"ECE",
@@ -754,12 +778,13 @@ public class ProxyCommon {
// Security Manager
GameRegistry.addShapedRecipe(new ItemStack(RSBlocks.SECURITY_MANAGER),
"ECE",
"CMC",
"ECE",
"SMS",
"ESE",
'E', new ItemStack(RSItems.QUARTZ_ENRICHED_IRON),
'P', new ItemStack(RSItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
'M', new ItemStack(RSBlocks.MACHINE_CASING),
'C', new ItemStack(RSItems.NETWORK_CARD)
'S', new ItemStack(RSItems.SECURITY_CARD),
'C', new ItemStack(Blocks.CHEST)
);
// Security Card