Skip to content

Commit 6cba4af

Browse files
committed
Merge remote-tracking branch 'origin/master-1.20-lts' into master-1.21-lts
2 parents c0c9332 + 624b69e commit 6cba4af

8 files changed

Lines changed: 65 additions & 75 deletions

File tree

CHANGELOG-1.20.1.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# Changelog for Minecraft 1.20.1
22
All notable changes to this project will be documented in this file.
33

4+
<a name="1.20.1-1.6.15"></a>
5+
## [1.20.1-1.6.15](/compare/1.20.1-1.6.14...1.20.1-1.6.15) - 2025-12-31 15:10:58
6+
7+
8+
### Changed
9+
* Update to new crafting storage in Integrated Crafting
10+
11+
Required for CyclopsMC/IntegratedCrafting#112
12+
413
<a name="1.20.1-1.6.14"></a>
5-
## [1.20.1-1.6.14](/compare/1.20.1-1.6.13...1.20.1-1.6.14) - 2025-11-24 16:50:13
14+
## [1.20.1-1.6.14](/compare/1.20.1-1.6.13...1.20.1-1.6.14) - 2025-11-24 16:50:13 +0100
615

716

817
### Fixed

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ curseforge_project_id=295910
2121
modrinth_project_id=HmLJoQ1K
2222

2323
# NeoForge
24-
neoforge_version=21.1.89
24+
neoforge_version=21.1.152
2525
neoforge_loader_version_range=[4,)
2626
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-terminals.json
2727

@@ -32,7 +32,7 @@ org.gradle.caching=true
3232

3333
# Dependencies
3434
cyclopscore_version=1.25.1-627
35-
integrateddynamics_version=1.24.1-1004
35+
integrateddynamics_version=1.30.2-1454
3636
integratedterminalscompat_version=1.0.0-136
37-
integratedcrafting_version=1.1.9-227
38-
commoncapabilities_version=2.9.3-147
37+
integratedcrafting_version=1.4.0-429
38+
commoncapabilities_version=2.9.12-263
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.19.4 or higher.
3+
4+
Changes:
5+
* Update to new crafting storage in Integrated Crafting
6+
7+
Required for CyclopsMC/IntegratedCrafting#112

src/main/java/org/cyclops/integratedterminals/api/terminalstorage/crafting/ITerminalCraftingPlan.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public interface ITerminalCraftingPlan<I> {
4343
public long getCraftingQuantity();
4444

4545
/**
46-
* @return The ingredients that will be used from storage.
46+
* @return The ingredients within the storage buffer.
4747
*/
48-
public List<IPrototypedIngredient<?, ?>> getStorageIngredients();
48+
public List<IPrototypedIngredient<?, ?>> getBufferedIngredients();
4949

5050
/**
5151
* @return The ingredients that were missing for 1 job amount.

src/main/java/org/cyclops/integratedterminals/api/terminalstorage/crafting/TerminalCraftingPlanStatic.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class TerminalCraftingPlanStatic<I> implements ITerminalCraftingPlan<I> {
2525
private final List<IPrototypedIngredient<?, ?>> outputs;
2626
private TerminalCraftingJobStatus status;
2727
private final long craftingQuantity;
28-
private final List<IPrototypedIngredient<?, ?>> storageIngredients;
28+
private final List<IPrototypedIngredient<?, ?>> bufferedIngredients;
2929
private final List<List<IPrototypedIngredient<?, ?>>> lastMissingIngredients;
3030
private TerminalCraftingPlanStatic.Label label;
3131
@Nullable
@@ -40,7 +40,7 @@ public TerminalCraftingPlanStatic(I id,
4040
List<IPrototypedIngredient<?, ?>> outputs,
4141
TerminalCraftingJobStatus status,
4242
long craftingQuantity,
43-
List<IPrototypedIngredient<?, ?>> storageIngredients,
43+
List<IPrototypedIngredient<?, ?>> bufferedIngredients,
4444
List<List<IPrototypedIngredient<?, ?>>> lastMissingIngredients,
4545
TerminalCraftingPlanStatic.Label label,
4646
long tickDuration,
@@ -51,7 +51,7 @@ public TerminalCraftingPlanStatic(I id,
5151
this.outputs = outputs;
5252
this.status = status;
5353
this.craftingQuantity = craftingQuantity;
54-
this.storageIngredients = storageIngredients;
54+
this.bufferedIngredients = bufferedIngredients;
5555
this.lastMissingIngredients = lastMissingIngredients;
5656
this.label = label;
5757
this.unlocalizedLabelOverride = null;
@@ -86,8 +86,8 @@ public long getCraftingQuantity() {
8686
}
8787

8888
@Override
89-
public List<IPrototypedIngredient<?, ?>> getStorageIngredients() {
90-
return storageIngredients;
89+
public List<IPrototypedIngredient<?,?>> getBufferedIngredients() {
90+
return bufferedIngredients;
9191
}
9292

9393
@Override
@@ -233,7 +233,7 @@ protected static <I> void groupDependenciesByPrototype(IndexedEntries indexedEnt
233233
}
234234

235235
// Determine storage ingredients
236-
for (IPrototypedIngredient<?, ?> output : plan.getStorageIngredients()) {
236+
for (IPrototypedIngredient<?, ?> output : plan.getBufferedIngredients()) {
237237
TerminalCraftingPlanFlatStatic.Entry entry = indexedEntries.get(output);
238238
long quantity = IndexedEntries.getQuantity(output);
239239
entry.setQuantityInStorage(entry.getQuantityInStorage() + quantity);
@@ -275,11 +275,11 @@ public static <I> CompoundTag serialize(HolderLookup.Provider lookupProvider, Te
275275

276276
tag.putLong("craftingQuantity", plan.getCraftingQuantity());
277277

278-
ListTag storageIngredients = new ListTag();
279-
for (IPrototypedIngredient<?, ?> storageIngredient : plan.getStorageIngredients()) {
280-
storageIngredients.add(IPrototypedIngredient.serialize(lookupProvider, (PrototypedIngredient) storageIngredient));
278+
ListTag bufferedIngredients = new ListTag();
279+
for (IPrototypedIngredient<?, ?> storageIngredient : plan.getBufferedIngredients()) {
280+
bufferedIngredients.add(IPrototypedIngredient.serialize(lookupProvider, (PrototypedIngredient) storageIngredient));
281281
}
282-
tag.put("storageIngredients", storageIngredients);
282+
tag.put("bufferedIngredients", bufferedIngredients);
283283

284284
ListTag lastMissingIngredients = new ListTag();
285285
for (List<IPrototypedIngredient<?, ?>> lastMissingIngredient : plan.getLastMissingIngredients()) {
@@ -358,10 +358,10 @@ public static <I> TerminalCraftingPlanStatic<I> deserialize(HolderLookup.Provide
358358

359359
long craftingQuantity = tag.getLong("craftingQuantity");
360360

361-
ListTag storageIngredientsTag = tag.getList("storageIngredients", Tag.TAG_COMPOUND);
362-
List<IPrototypedIngredient<?, ?>> storageIngredients = Lists.newArrayListWithExpectedSize(storageIngredientsTag.size());
363-
for (Tag nbtBase : storageIngredientsTag) {
364-
storageIngredients.add(IPrototypedIngredient.deserialize(lookupProvider, (CompoundTag) nbtBase));
361+
ListTag bufferedIngredientsTag = tag.getList("bufferedIngredients", Tag.TAG_COMPOUND);
362+
List<IPrototypedIngredient<?, ?>> bufferedIngredients = Lists.newArrayListWithExpectedSize(bufferedIngredientsTag.size());
363+
for (Tag nbtBase : bufferedIngredientsTag) {
364+
bufferedIngredients.add(IPrototypedIngredient.deserialize(lookupProvider, (CompoundTag) nbtBase));
365365
}
366366

367367
ListTag lastMissingIngredientsTag = tag.getList("lastMissingIngredients", Tag.TAG_LIST);
@@ -391,7 +391,7 @@ public static <I> TerminalCraftingPlanStatic<I> deserialize(HolderLookup.Provide
391391
initiatorName = tag.getString("initiatorName");
392392
}
393393

394-
TerminalCraftingPlanStatic<I> plan = new TerminalCraftingPlanStatic<>(id, dependencies, outputs, status, craftingQuantity, storageIngredients,
394+
TerminalCraftingPlanStatic<I> plan = new TerminalCraftingPlanStatic<>(id, dependencies, outputs, status, craftingQuantity, bufferedIngredients,
395395
lastMissingIngredients, label, tickDuration, channel, initiatorName);
396396
if (unlocalizedLabelOverride != null) {
397397
plan.unlocalizedLabelOverride = unlocalizedLabelOverride;

src/main/java/org/cyclops/integratedterminals/client/gui/container/component/GuiCraftingPlan.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@
3838

3939
import javax.annotation.Nullable;
4040
import java.awt.*;
41-
import java.util.Collections;
4241
import java.util.List;
43-
import java.util.Locale;
44-
import java.util.Objects;
45-
import java.util.Optional;
42+
import java.util.*;
4643
import java.util.stream.Collectors;
4744

4845
/**
@@ -325,14 +322,14 @@ public static List<GuiCraftingPlan.Element> getElements(ITerminalCraftingPlan<?>
325322

326323
protected static void addElements(@Nullable Element parent, int indent, ITerminalCraftingPlan<?> craftingPlan, List<GuiCraftingPlan.Element> elements) {
327324
boolean valid = craftingPlan.getStatus().isValid()
328-
|| (!craftingPlan.getStorageIngredients().isEmpty() || !craftingPlan.getDependencies().isEmpty());
325+
|| (!craftingPlan.getBufferedIngredients().isEmpty() || !craftingPlan.getDependencies().isEmpty());
329326
int elementId = Objects.hash(craftingPlan.getId()) * 100;
330327
Element currentElement = new Element(
331328
elementId++,
332329
indent,
333-
(List) craftingPlan.getOutputs()
330+
craftingPlan.getOutputs()
334331
.stream()
335-
.map(Collections::singletonList)
332+
.map(i -> Collections.singletonList((IPrototypedIngredient) i))
336333
.collect(Collectors.toList()),
337334
0,
338335
valid ? craftingPlan.getCraftingQuantity() : 0,
@@ -346,7 +343,7 @@ protected static void addElements(@Nullable Element parent, int indent, ITermina
346343
if (craftingPlan.getStatus() == TerminalCraftingJobStatus.PENDING_INPUTS) {
347344
// Add last missing ingredients
348345
for (List<IPrototypedIngredient<?, ?>> lastMissingIngredient : craftingPlan.getLastMissingIngredients()) {
349-
List outputs = Collections.singletonList(lastMissingIngredient
346+
List<List<IPrototypedIngredient>> outputs = Collections.singletonList(lastMissingIngredient
350347
.stream()
351348
.map(prototypedIngredient -> {
352349
IIngredientMatcher matcher = prototypedIngredient.getComponent().getMatcher();
@@ -359,9 +356,9 @@ protected static void addElements(@Nullable Element parent, int indent, ITermina
359356
0, 0, craftingPlan.getCraftingQuantity(), TerminalCraftingJobStatus.INVALID.getColor(), TerminalCraftingJobStatus.INVALID)));
360357
}
361358
} else if (craftingPlan.getStatus() != TerminalCraftingJobStatus.CRAFTING) {
362-
for (IPrototypedIngredient storageIngredient : craftingPlan.getStorageIngredients()) {
363-
elements.add(currentElement.addChild(new Element(elementId++, indent + 1, Collections.singletonList(Collections.singletonList(storageIngredient)),
364-
storageIngredient.getComponent().getMatcher().getQuantity(storageIngredient.getPrototype()),
359+
for (IPrototypedIngredient bufferedIngredient : craftingPlan.getBufferedIngredients()) {
360+
elements.add(currentElement.addChild(new Element(elementId++, indent + 1, Collections.singletonList(Collections.singletonList(bufferedIngredient)),
361+
bufferedIngredient.getComponent().getMatcher().getQuantity(bufferedIngredient.getPrototype()),
365362
0, 0, TerminalCraftingJobStatus.FINISHED.getColor(), TerminalCraftingJobStatus.FINISHED)));
366363
}
367364
}
@@ -393,11 +390,11 @@ public static class Element {
393390

394391
private boolean enabled;
395392

396-
public Element(int id, int indent, List<List<IPrototypedIngredient<?, ?>>> outputs, long storageQuantity, long craftQuantity,
393+
public Element(int id, int indent, List<List<IPrototypedIngredient>> outputs, long storageQuantity, long craftQuantity,
397394
long missingQuantity, int color, TerminalCraftingJobStatus status) {
398395
this.id = id;
399396
this.indent = indent;
400-
this.outputs = outputs;
397+
this.outputs = (List) outputs;
401398
this.storageQuantity = storageQuantity;
402399
this.craftQuantity = craftQuantity;
403400
this.missingQuantity = missingQuantity;

src/main/java/org/cyclops/integratedterminals/modcompat/integratedcrafting/TerminalCraftingPlanCraftingJobDependencyGraph.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public TerminalCraftingPlanCraftingJobDependencyGraph(int id,
2222
List<IPrototypedIngredient<?, ?>> outputs,
2323
TerminalCraftingJobStatus status,
2424
long craftingQuantity,
25-
List<IPrototypedIngredient<?, ?>> storageIngredients,
25+
List<IPrototypedIngredient<?, ?>> bufferedIngredients,
2626
List<List<IPrototypedIngredient<?, ?>>> lastMissingIngredients,
2727
TerminalCraftingPlanStatic.Label label,
2828
long tickDuration,
2929
int channel,
3030
@Nullable String initiatorName,
3131
CraftingJobDependencyGraph craftingJobDependencyGraph) {
32-
super(id, dependencies, outputs, status, craftingQuantity, storageIngredients, lastMissingIngredients,
33-
label, tickDuration, channel, initiatorName);
32+
super(id, dependencies, outputs, status, craftingQuantity, bufferedIngredients,
33+
lastMissingIngredients, label, tickDuration, channel, initiatorName);
3434
this.craftingJobDependencyGraph = craftingJobDependencyGraph;
3535
}
3636

0 commit comments

Comments
 (0)