Skip to content

Commit 7113141

Browse files
authored
Merge branch 'forge/1.20.1' into configkeysizelimit
2 parents 2b189da + 053524c commit 7113141

File tree

20 files changed

+150
-9
lines changed

20 files changed

+150
-9
lines changed

guidebook/items-blocks-machines/crafting_cpu_multiblock.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ item_ids:
1212
- ae2:16k_crafting_storage
1313
- ae2:64k_crafting_storage
1414
- ae2:256k_crafting_storage
15+
- ae2:singularity_crafting_storage
1516
- ae2:crafting_accelerator
1617
- ae2:crafting_monitor
1718
- ae2:crafting_unit
@@ -76,9 +77,11 @@ of the other components. They are also a base ingredient in the other components
7677
<BlockImage id="64k_crafting_storage" scale="4" />
7778

7879
<BlockImage id="256k_crafting_storage" scale="4" />
80+
81+
<BlockImage id="singularity_crafting_storage" scale="4" />
7982
</Row>
8083

81-
(Required) Crafting storages are available in all the standard cell sizes (1k, 4k, 16k, 64k, 256k). They store the ingredients and
84+
(Required) Crafting storages are available in all the standard cell sizes (1k, 4k, 16k, 64k, 256k) and <ItemLink id="ae2:singularity_crafting_storage" />(More on that below).
8285
intermediate ingredients involved in a craft, so larger or more storages are required for the CPU to handle crafting jobs
8386
with more ingredients.
8487

@@ -117,3 +120,12 @@ distributing the ingredient batches between the surrounding assemblers.
117120
The screen can be colored with a <ItemLink id="color_applicator" />.
118121

119122
<RecipeFor id="crafting_monitor" />
123+
124+
# Singularity Crafting Storage
125+
126+
<BlockImage id="singularity_crafting_storage" scale="4" />
127+
128+
The singularity crafting storage is a special crafting storage that provides MAX_LONG(2^63-1) bytes of storage.
129+
130+
Very powerful indeed, but also somewhat dangerous, since if you want to use this, it needs to be the only crafting storage in this cpu multiblock,
131+
otherwise you won't be able to select this cpu when trying to craft something.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
navigation:
3+
parent: items-blocks-machines/items-blocks-machines-index.md
4+
title: Pattern Box
5+
icon: pattern_box
6+
position: 411
7+
categories:
8+
- tools
9+
item_ids:
10+
- ae2:pattern_box
11+
---
12+
13+
# Pattern Box
14+
15+
<ItemImage id="pattern_box" scale="4" />
16+
17+
The Pattern Box is somewhat like the [Network Tool](network_tool.md), allowing you to store and transport [Encoded Patterns](patterns.md) instead of [Upgrade Cards](upgrade_cards.md).
18+
19+
It has 27 slots in which to store, well, [Encoded Patterns](patterns.md), and they will be available in any AE2 device UI if the tool
20+
is anywhere in your inventory.

guidebook/items-blocks-machines/upgrade_cards.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ item_ids:
1818
- ae2:crafting_card
1919
- ae2:equal_distribution_card
2020
- ae2:energy_card
21+
- ae2:auto_complete_card
2122
---
2223

2324
# Upgrade Cards
@@ -40,6 +41,8 @@ item_ids:
4041
<ItemImage id="equal_distribution_card" scale="2" />
4142

4243
<ItemImage id="energy_card" scale="2" />
44+
45+
<ItemImage id="auto_complete_card" scale="2" />
4346
</Row>
4447

4548
Upgrade cards change the behavior of AE2 [devices](../ae2-mechanics/devices.md) and machines, increasing their speed, improving their
@@ -168,3 +171,12 @@ Energy cards add more energy storage to certain tools like portable terminals, a
168171
more efficient.
169172

170173
<RecipeFor id="energy_card" />
174+
175+
## Auto Complete Card
176+
177+
<ItemImage id="auto_complete_card" scale="2" />
178+
179+
Auto Complete cards let the device send crafting requests to your [autocrafting](../ae2-mechanics/autocrafting.md)
180+
system to get the items it desires.
181+
182+
<RecipeFor id="auto_complete_card" />
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_advanced_card": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:advanced_card"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_crafting_card": {
17+
"conditions": {
18+
"items": [
19+
{
20+
"items": [
21+
"ae2:crafting_card"
22+
]
23+
}
24+
]
25+
},
26+
"trigger": "minecraft:inventory_changed"
27+
},
28+
"has_the_recipe": {
29+
"conditions": {
30+
"recipe": "ae2:materials/auto_complete_card"
31+
},
32+
"trigger": "minecraft:recipe_unlocked"
33+
}
34+
},
35+
"requirements": [
36+
[
37+
"has_advanced_card",
38+
"has_crafting_card",
39+
"has_the_recipe"
40+
]
41+
],
42+
"rewards": {
43+
"recipes": [
44+
"ae2:materials/auto_complete_card"
45+
]
46+
},
47+
"sends_telemetry_event": false
48+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"category": "misc",
4+
"ingredients": [
5+
{
6+
"item": "ae2:advanced_card"
7+
},
8+
{
9+
"item": "ae2:crafting_card"
10+
}
11+
],
12+
"result": {
13+
"item": "ae2:auto_complete_card"
14+
}
15+
}

src/main/java/appeng/client/gui/me/crafting/CraftConfirmTableRenderer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ protected List<Component> getEntryDescription(CraftingPlanSummaryEntry entry) {
5858
if (entry.storedAmount() > 0) {
5959
var percentage = NumberUtil.createPercentageComponent(
6060
entry.missingAmount() == 0 ? entry.storedAmount() : entry.missingAmount(),
61-
entry.availableAmount());
61+
entry.availableAmount(),
62+
entry.missingAmount() > 0);
6263
lines.add(GuiText.UsedAmount.text().withStyle(percentage.getStyle()).append(percentage));
6364
}
6465
return lines;
@@ -90,7 +91,8 @@ protected List<Component> getEntryTooltip(CraftingPlanSummaryEntry entry) {
9091
if (entry.storedAmount() > 0) {
9192
var percentage = NumberUtil.createPercentageComponent(
9293
entry.missingAmount() == 0 ? entry.storedAmount() : entry.missingAmount(),
93-
entry.availableAmount());
94+
entry.availableAmount(),
95+
entry.missingAmount() > 0);
9496
lines.add(GuiText.UsedAmount.text().withStyle(percentage.getStyle()).append(percentage));
9597
}
9698

src/main/java/appeng/client/gui/me/patternaccess/PatternAccessTermScreen.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
import appeng.client.gui.style.PaletteColor;
6363
import appeng.client.gui.style.ScreenStyle;
6464
import appeng.client.gui.widgets.AETextField;
65+
import appeng.client.gui.widgets.PatternBoxPanel;
6566
import appeng.client.gui.widgets.Scrollbar;
6667
import appeng.client.gui.widgets.ServerSettingToggleButton;
6768
import appeng.client.gui.widgets.SettingToggleButton;
@@ -160,6 +161,10 @@ public PatternAccessTermScreen(C menu, Inventory playerInventory,
160161

161162
this.addToLeftToolbar(showPatternProviders);
162163

164+
if (menu.getPatternBox().isPresent()) {
165+
this.widgets.add("patternbox", new PatternBoxPanel(style, menu.getPatternBox().getName()));
166+
}
167+
163168
this.searchField = widgets.addTextField("search");
164169
this.searchField.setResponder(str -> this.refreshList());
165170
this.searchField.setPlaceholder(GuiText.SearchPlaceholder.text());

src/main/java/appeng/core/definitions/AEBlocks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public final class AEBlocks {
192192
public static final BlockDefinition<CraftingUnitBlock> CRAFTING_STORAGE_64K = craftingBlock("64k Crafting Storage", AEBlockIds.CRAFTING_STORAGE_64K, () -> new CraftingUnitBlock(CraftingUnitType.STORAGE_64K), () -> AEItems.CELL_COMPONENT_64K);
193193
public static final BlockDefinition<CraftingUnitBlock> CRAFTING_STORAGE_256K = craftingBlock("256k Crafting Storage", AEBlockIds.CRAFTING_STORAGE_256K, () -> new CraftingUnitBlock(CraftingUnitType.STORAGE_256K), () -> AEItems.CELL_COMPONENT_256K);
194194
// Don't make this a CraftingBlockItem since we don't want a disassembly item
195-
public static final BlockDefinition<CraftingUnitBlock> CRAFTING_STORAGE_SINGULARITY = block("Singularity Crafting Storage", AEBlockIds.CRAFTING_STORAGE_SINGULARITY, () -> new CraftingUnitBlock(CraftingUnitType.SINGULARITY));
195+
public static final BlockDefinition<CraftingUnitBlock> CRAFTING_STORAGE_SINGULARITY = block("Singularity Crafting Storage", AEBlockIds.CRAFTING_STORAGE_SINGULARITY, () -> new CraftingUnitBlock(CraftingUnitType.SINGULARITY), AEBaseBlockItem::new);
196196
public static final BlockDefinition<CraftingMonitorBlock> CRAFTING_MONITOR = craftingBlock("Crafting Monitor", AEBlockIds.CRAFTING_MONITOR, () -> new CraftingMonitorBlock(CraftingUnitType.MONITOR), () -> AEParts.STORAGE_MONITOR);
197197

198198
private static <T extends Block> BlockDefinition<T> craftingBlock(String englishName, ResourceLocation id, Supplier<T> blockSupplier, Supplier<ItemLike> disassemblyExtra) {

src/main/java/appeng/datagen/providers/recipes/CraftingRecipes.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ public void buildRecipes(Consumer<FinishedRecipe> consumer) {
113113
.define('b', AEItems.ADVANCED_CARD)
114114
.unlockedBy("has_advanced_card", has(AEItems.ADVANCED_CARD))
115115
.save(consumer, AppEng.makeId("materials/cardenergy"));
116+
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, AEItems.AUTO_COMPLETE_CARD)
117+
.requires(AEItems.ADVANCED_CARD)
118+
.requires(AEItems.CRAFTING_CARD)
119+
.unlockedBy("has_advanced_card", has(AEItems.ADVANCED_CARD))
120+
.unlockedBy("has_crafting_card", has(AEItems.CRAFTING_CARD))
121+
.save(consumer, AppEng.makeId("materials/auto_complete_card"));
116122

117123
// ====================================================
118124
// Misc Materials

src/main/java/appeng/init/client/InitRenderTypes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public final class InitRenderTypes {
5656
AEBlocks.CRAFTING_STORAGE_16K,
5757
AEBlocks.CRAFTING_STORAGE_64K,
5858
AEBlocks.CRAFTING_STORAGE_256K,
59+
AEBlocks.CRAFTING_STORAGE_SINGULARITY,
5960
AEBlocks.SPATIAL_PYLON,
6061
AEBlocks.SKY_STONE_TANK,
6162
AEBlocks.SMALL_QUARTZ_BUD,

0 commit comments

Comments
 (0)