Skip to content

Commit adb854f

Browse files
committed
Merge remote-tracking branch 'origin/master-1.21-lts' into master-26
2 parents 00a2455 + 352bce1 commit adb854f

3 files changed

Lines changed: 19 additions & 13 deletions

File tree

CHANGELOG-1.21.1.md

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

4+
<a name="1.21.1-1.4.6"></a>
5+
## [1.21.1-1.4.6](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.4.5...1.21.1-1.4.6) - 2026-04-26 13:55:40
6+
7+
8+
### Fixed
9+
* Fix channel mixup in crafting interface settings
10+
411
<a name="1.21.1-1.4.5"></a>
5-
## [1.21.1-1.4.5](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.4.4...1.21.1-1.4.5) - 2026-03-09 16:17:51
12+
## [1.21.1-1.4.5](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.4.4...1.21.1-1.4.5) - 2026-03-09 16:17:51 +0100
613

714

815
### Added
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.26.2 or higher.
3+
4+
Fixes:
5+
* Fix channel mixup in crafting interface settings

src/main/java/org/cyclops/integratedcrafting/core/part/PartTypeInterfaceCraftingBase.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ protected NetworkCapability<ICraftingNetwork> getNetworkCapability() {
8282
protected void addTargetToNetwork(INetwork network, PartTarget pos, S state, boolean initialize) {
8383
network.getCapability(getNetworkCapability())
8484
.ifPresent(craftingNetwork -> {
85-
int channelCrafting = state.getChannelCrafting();
85+
int channel = state.getChannel();
8686
state.setTarget(pos);
87-
state.setNetworks(network, craftingNetwork, NetworkHelpers.getPartNetworkChecked(network), channelCrafting, ValueDeseralizationContext.of(pos.getCenter().getPos().getLevel(true)), initialize);
87+
state.setNetworks(network, craftingNetwork, NetworkHelpers.getPartNetworkChecked(network), channel, ValueDeseralizationContext.of(pos.getCenter().getPos().getLevel(true)), initialize);
8888
state.setShouldAddToCraftingNetwork(true);
8989
});
9090
}
@@ -138,12 +138,12 @@ public void update(INetwork network, IPartNetwork partNetwork, PartTarget target
138138
addTargetToNetwork(network, target, state, false);
139139
}
140140

141-
int channel = state.getChannelCrafting();
141+
int channelCrafting = state.getChannelCrafting();
142142

143143
// Update the network data in the part state
144144
if (state.shouldAddToCraftingNetwork()) {
145145
ICraftingNetwork craftingNetwork = network.getCapability(getNetworkCapability()).orElse(null);
146-
craftingNetwork.addCraftingInterface(channel, state);
146+
craftingNetwork.addCraftingInterface(channelCrafting, state);
147147
state.setShouldAddToCraftingNetwork(false);
148148
}
149149

@@ -154,7 +154,7 @@ public void update(INetwork network, IPartNetwork partNetwork, PartTarget target
154154
if (state.getInventoryOutputBuffer().isEmpty()) {
155155
// Tick the job handler
156156
PartPos targetPos = state.getTarget().getTarget();
157-
state.getCraftingJobHandler().update(network, channel, targetPos);
157+
state.getCraftingJobHandler().update(network, channelCrafting, targetPos);
158158
}
159159
}
160160

@@ -189,7 +189,6 @@ public static abstract class State<P extends PartTypeInterfaceCraftingBase<P, S>
189189
protected INetwork network = null;
190190
protected IPartNetwork partNetwork = null;
191191
protected ICraftingNetwork craftingNetwork = null;
192-
private int channel = -1;
193192
protected ValueDeseralizationContext valueDeseralizationContext;
194193
private boolean shouldAddToCraftingNetwork = false;
195194
protected Player lastPlayer;
@@ -274,7 +273,7 @@ public void setNetworks(@Nullable INetwork network, @Nullable ICraftingNetwork c
274273
this.network = network;
275274
this.craftingNetwork = craftingNetwork;
276275
this.partNetwork = partNetwork;
277-
this.channel = channel;
276+
this.setChannel(channel);
278277
this.valueDeseralizationContext = valueDeseralizationContext;
279278
reloadRecipes(initialize);
280279
}
@@ -291,11 +290,6 @@ public ICraftingNetwork getCraftingNetwork() {
291290
return craftingNetwork;
292291
}
293292

294-
@Override
295-
public int getChannel() {
296-
return channel;
297-
}
298-
299293
@Override
300294
public boolean canScheduleCraftingJobs() {
301295
return getCraftingJobHandler().canScheduleCraftingJobs();

0 commit comments

Comments
 (0)