Some crafting ingredients and first recipes

This commit is contained in:
DBotThePony 2021-09-01 20:31:50 +07:00
parent 167490382c
commit b3330a2f1f
Signed by: DBot
GPG Key ID: DCC23B5715498507
27 changed files with 510 additions and 5 deletions

12
.gitignore vendored
View File

@ -114,3 +114,15 @@ forge*changelog.txt
/src/main/resources/assets/overdrive_that_matters/models/item/tritanium_block.json
/src/main/resources/assets/overdrive_that_matters/models/item/tritanium_striped_block.json
/src/main/resources/assets/overdrive_that_matters/blockstates/drive_viewer.json
/src/main/resources/assets/overdrive_that_matters/models/item/advanced_control_circuit.json
/src/main/resources/assets/overdrive_that_matters/models/item/basic_control_circuit.json
/src/main/resources/assets/overdrive_that_matters/models/item/circuit_plating.json
/src/main/resources/assets/overdrive_that_matters/models/item/copper_wiring.json
/src/main/resources/assets/overdrive_that_matters/models/item/electric_parts.json
/src/main/resources/assets/overdrive_that_matters/models/item/energy_bus.json
/src/main/resources/assets/overdrive_that_matters/models/item/gold_wiring.json
/src/main/resources/assets/overdrive_that_matters/models/item/iron_plate.json
/src/main/resources/assets/overdrive_that_matters/models/item/matter_io_port.json
/src/main/resources/assets/overdrive_that_matters/models/item/matter_transform_matrix.json
/src/main/resources/assets/overdrive_that_matters/models/item/tritanium_ingot.json
/src/main/resources/assets/overdrive_that_matters/models/item/tritanium_plate.json

View File

@ -253,6 +253,38 @@ const facings = [
fs.writeFileSync(_root + 'blockstates/pattern_storage.json', JSON.stringify(blockstate, null, '\t'))
}
// Компоненты для крафта (как предмет)
{
const components = [
'tritanium_ingot',
'matter_io_port',
'matter_transform_matrix',
'energy_bus',
'electric_parts',
// 'machine_frame',
'tritanium_plate',
'iron_plate',
'copper_wiring',
'gold_wiring',
// 'portable_condensation_drive_casing',
// 'portable_dense_condensation_drive_casing',
'circuit_plating',
'basic_control_circuit',
'advanced_control_circuit',
]
for (const item of components) {
fs.writeFileSync(_root + 'models/item/' + item + '.json', JSON.stringify(
{
"parent": "item/generated",
"textures": {
"layer0": "overdrive_that_matters:item/component/" + item
}
}
, null, '\t'))
}
}
// Drive Viewer
{
const states = ['idle', 'working']

View File

@ -145,6 +145,28 @@ public class Registry {
public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_condensation_drive");
public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_dense_condensation_drive");
// items: crafting components
public static final ResourceLocation TRITANIUM_INGOT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_ingot");
public static final ResourceLocation MATTER_IO_PORT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_io_port");
public static final ResourceLocation MATTER_TRANSFORM_MATRIX = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_transform_matrix");
public static final ResourceLocation ENERGY_BUS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_bus");
public static final ResourceLocation ELECTRIC_PARTS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "electric_parts");
public static final ResourceLocation MACHINE_FRAME = new ResourceLocation(OverdriveThatMatters.MOD_ID, "machine_frame");
public static final ResourceLocation TRITANIUM_PLATE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_plate");
public static final ResourceLocation IRON_PLATE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "iron_plate");
public static final ResourceLocation COPPER_WIRING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "copper_wiring");
public static final ResourceLocation GOLD_WIRING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "gold_wiring");
public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE_CASING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_condensation_drive_casing");
public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE_CASING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_dense_condensation_drive_casing");
public static final ResourceLocation CIRCUIT_PLATING = new ResourceLocation(OverdriveThatMatters.MOD_ID, "circuit_plating");
public static final ResourceLocation BASIC_CONTROL_CIRCUIT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "basic_control_circuit");
public static final ResourceLocation ADVANCED_CONTROL_CIRCUIT = new ResourceLocation(OverdriveThatMatters.MOD_ID, "advanced_control_circuit");
// android features and research
public static final ResourceLocation AIR_BAGS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "air_bags");
@ -304,6 +326,22 @@ public class Registry {
public static final Item MATTER_BOTTLER = new BlockItem(Blocks.MATTER_BOTTLER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item DRIVE_VIEWER = new BlockItem(Blocks.DRIVE_VIEWER, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item TRITANIUM_INGOT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item MATTER_IO_PORT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item MATTER_TRANSFORM_MATRIX = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item ENERGY_BUS = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item ELECTRIC_PARTS = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item MACHINE_FRAME = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item TRITANIUM_PLATE = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item IRON_PLATE = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item COPPER_WIRING = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item GOLD_WIRING = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item PORTABLE_CONDENSATION_DRIVE_CASING = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item PORTABLE_DENSE_CONDENSATION_DRIVE_CASING = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item CIRCUIT_PLATING = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item BASIC_CONTROL_CIRCUIT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item ADVANCED_CONTROL_CIRCUIT = new Item(new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item BLACK_HOLE = new BlockItem(Blocks.BLACK_HOLE, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final ItemPill PILL_ANDROID = new ItemPill(ItemPill.PillType.BECOME_ANDROID);
@ -352,6 +390,22 @@ public class Registry {
DRIVE_VIEWER.setRegistryName(Names.DRIVE_VIEWER);
BLACK_HOLE.setRegistryName(Names.BLACK_HOLE);
TRITANIUM_INGOT.setRegistryName(Names.TRITANIUM_INGOT);
MATTER_IO_PORT.setRegistryName(Names.MATTER_IO_PORT);
MATTER_TRANSFORM_MATRIX.setRegistryName(Names.MATTER_TRANSFORM_MATRIX);
ENERGY_BUS.setRegistryName(Names.ENERGY_BUS);
ELECTRIC_PARTS.setRegistryName(Names.ELECTRIC_PARTS);
MACHINE_FRAME.setRegistryName(Names.MACHINE_FRAME);
TRITANIUM_PLATE.setRegistryName(Names.TRITANIUM_PLATE);
IRON_PLATE.setRegistryName(Names.IRON_PLATE);
COPPER_WIRING.setRegistryName(Names.COPPER_WIRING);
GOLD_WIRING.setRegistryName(Names.GOLD_WIRING);
PORTABLE_CONDENSATION_DRIVE_CASING.setRegistryName(Names.PORTABLE_CONDENSATION_DRIVE_CASING);
PORTABLE_DENSE_CONDENSATION_DRIVE_CASING.setRegistryName(Names.PORTABLE_DENSE_CONDENSATION_DRIVE_CASING);
CIRCUIT_PLATING.setRegistryName(Names.CIRCUIT_PLATING);
BASIC_CONTROL_CIRCUIT.setRegistryName(Names.BASIC_CONTROL_CIRCUIT);
ADVANCED_CONTROL_CIRCUIT.setRegistryName(Names.ADVANCED_CONTROL_CIRCUIT);
PILL_ANDROID.setRegistryName(Names.PILL_ANDROID);
PILL_HUMANE.setRegistryName(Names.PILL_HUMANE);
BATTERY_CRUDE.setRegistryName(Names.BATTERY_CRUDE);
@ -391,6 +445,22 @@ public class Registry {
event.getRegistry().register(DRIVE_VIEWER);
event.getRegistry().register(BLACK_HOLE);
event.getRegistry().register(TRITANIUM_INGOT);
event.getRegistry().register(MATTER_IO_PORT);
event.getRegistry().register(MATTER_TRANSFORM_MATRIX);
event.getRegistry().register(ENERGY_BUS);
event.getRegistry().register(ELECTRIC_PARTS);
event.getRegistry().register(MACHINE_FRAME);
event.getRegistry().register(TRITANIUM_PLATE);
event.getRegistry().register(IRON_PLATE);
event.getRegistry().register(COPPER_WIRING);
event.getRegistry().register(GOLD_WIRING);
event.getRegistry().register(PORTABLE_CONDENSATION_DRIVE_CASING);
event.getRegistry().register(PORTABLE_DENSE_CONDENSATION_DRIVE_CASING);
event.getRegistry().register(CIRCUIT_PLATING);
event.getRegistry().register(BASIC_CONTROL_CIRCUIT);
event.getRegistry().register(ADVANCED_CONTROL_CIRCUIT);
event.getRegistry().register(PILL_ANDROID);
event.getRegistry().register(PILL_HUMANE);
event.getRegistry().register(BATTERY_CRUDE);

View File

@ -41,7 +41,7 @@ public class BlockEntityMatterDecomposer extends BlockEntityMatteryWorker implem
public final MatteryContainer item_container = new MatteryContainer(this::setChanged, 2);
private final LazyOptional<IItemHandler> handler_resolver = LazyOptional.of(() -> item_container.handler(
(slot, stack) -> slot == 0 && MatterRegistry.hasMatterValue(stack),
(slot, stack) -> slot == 0 && MatterRegistry.canDecompose(stack),
(slot, amount, stack) -> slot == 1
));

View File

@ -37,7 +37,7 @@ public class BlockEntityMatterScanner extends BlockEntityMatteryWorker implement
public final MatteryContainer input_slot = new MatteryContainer(this::setChanged, 1);
private final LazyOptional<IItemHandler> handler_resolver = LazyOptional.of(() -> input_slot.handler(
(slot, stack) -> MatterRegistry.hasMatterValue(stack),
(slot, stack) -> MatterRegistry.canDecompose(stack),
(slot, amount, stack) -> is_idling
));
@ -183,7 +183,7 @@ public class BlockEntityMatterScanner extends BlockEntityMatteryWorker implement
ItemStack stack = input_slot.getItem(0);
if (stack.isEmpty() || !MatterRegistry.hasMatterValue(stack))
if (stack.isEmpty() || !MatterRegistry.canDecompose(stack))
return null;
Collection<PatternState> get_state = grid.findPatterns(stack.getItem());

View File

@ -33,7 +33,7 @@ public class MatterDecomposerMenu extends PoweredMatteryMenu {
input = new MatterySlot(container, 0, 61, 36) {
@Override
public boolean mayPlace(ItemStack p_40231_) {
return MatterRegistry.hasMatterValue(p_40231_);
return MatterRegistry.canDecompose(p_40231_);
}
};

View File

@ -26,7 +26,7 @@ public class MatterScannerMenu extends PoweredMatteryMenu {
input = new MatterySlot(container, 0, 64, 38) {
@Override
public boolean mayPlace(ItemStack p_40231_) {
return MatterRegistry.hasMatterValue(p_40231_);
return MatterRegistry.canDecompose(p_40231_);
}
};

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:advanced_control_circuit"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:basic_control_circuit"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:tritanium_ingot"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:iron_plate"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:tritanium_plate"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:copper_wiring"
]
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"overdrive_that_matters:gold_wiring"
]
}

View File

@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###",
"RCR",
"###"
],
"key": {
"#": {
"tag": "forge:plates/tritanium"
},
"C": {
"tag": "forge:wires/copper"
},
"R": {
"tag": "forge:dusts/redstone"
}
},
"result": {
"item": "overdrive_that_matters:matter_cable",
"count": 16
}
}

View File

@ -0,0 +1,32 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"R R",
"GCG",
"PPP"
],
"key": {
"C": {
"tag": "forge:wires/copper"
},
"R": {
"tag": "forge:dusts/redstone"
},
"G": {
"tag": "forge:wires/gold"
},
"P": {
"item": "overdrive_that_matters:circuit_plating"
}
},
"result": {
"item": "overdrive_that_matters:advanced_control_circuit",
"count": 3
}
}

View File

@ -0,0 +1,27 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"CRC",
"PPP"
],
"key": {
"C": {
"tag": "forge:wires/copper"
},
"R": {
"tag": "forge:dusts/redstone"
},
"P": {
"item": "overdrive_that_matters:circuit_plating"
}
},
"result": {
"item": "overdrive_that_matters:basic_control_circuit",
"count": 3
}
}

View File

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"#@#",
" # "
],
"key": {
"#": {
"tag": "forge:ingots/copper"
},
"@": {
"tag": "forge:rods/wooden"
}
},
"result": {
"item": "overdrive_that_matters:copper_wiring",
"count": 16
}
}

View File

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"#@#",
" # "
],
"key": {
"#": {
"item": "minecraft:copper_ingot"
},
"@": {
"tag": "forge:rods/wooden"
}
},
"result": {
"item": "overdrive_that_matters:copper_wiring",
"count": 4
}
}

View File

@ -0,0 +1,32 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"RCR",
"GIG",
"RCR"
],
"key": {
"R": {
"tag": "forge:dusts/redstone"
},
"I": {
"tag": "forge:ingots/iron"
},
"G": {
"tag": "forge:nuggets/gold"
},
"C": {
"tag": "forge:wires/copper"
}
},
"result": {
"item": "overdrive_that_matters:electric_parts",
"count": 4
}
}

View File

@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" R ",
"CPC",
" R "
],
"key": {
"R": {
"tag": "forge:dusts/redstone"
},
"P": {
"item": "overdrive_that_matters:electric_parts"
},
"C": {
"tag": "forge:wires/copper"
}
},
"result": {
"item": "overdrive_that_matters:energy_bus",
"count": 1
}
}

View File

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"#@#",
" # "
],
"key": {
"#": {
"tag": "forge:ingots/gold"
},
"@": {
"tag": "forge:rods/wooden"
}
},
"result": {
"item": "overdrive_that_matters:gold_wiring",
"count": 16
}
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"tag": "forge:ingots/iron"
},
{
"tag": "forge:ingots/iron"
}
],
"result": {
"item": "overdrive_that_matters:iron_plate",
"count": 2
}
}

View File

@ -0,0 +1,36 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"GBG",
"PEP",
"TET"
],
"key": {
"G": {
"tag": "forge:glass"
},
"B": {
"item": "overdrive_that_matters:energy_bus"
},
"E": {
"item": "overdrive_that_matters:electric_parts"
},
"P": {
"tag": "forge:plates/iron"
},
"T": {
"tag": "forge:plates/tritanium"
}
},
"result": {
"item": "overdrive_that_matters:machine_frame",
"count": 1
}
}

View File

@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"L@L",
" # "
],
"key": {
"#": {
"item": "overdrive_that_matters:matter_cable"
},
"@": {
"tag": "forge:circuits/basic"
},
"L": {
"tag": "forge:plates/tritanium"
}
},
"result": {
"item": "overdrive_that_matters:matter_io_port",
"count": 1
}
}

View File

@ -0,0 +1,32 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" C ",
"PEP",
" M "
],
"key": {
"M": {
"item": "overdrive_that_matters:matter_cable"
},
"C": {
"tag": "forge:circuits/advanced"
},
"E": {
"tag": "forge:ender_pearls"
},
"P": {
"tag": "forge:plates/tritanium"
}
},
"result": {
"item": "overdrive_that_matters:matter_transform_matrix",
"count": 1
}
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"tag": "forge:ingots/tritanium"
},
{
"tag": "forge:ingots/tritanium"
}
],
"result": {
"item": "overdrive_that_matters:tritanium_plate",
"count": 2
}
}