Skip to content

Commit e4e647f

Browse files
committed
Merge remote-tracking branch 'origin/master-1.21-lts' into master-26
2 parents c75b0c4 + 8e8baba commit e4e647f

7 files changed

Lines changed: 118 additions & 2 deletions

File tree

CHANGELOG-1.20.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.20.1
22
All notable changes to this project will be documented in this file.
33

4+
<a name="1.20.1-1.30.3"></a>
5+
## [1.20.1-1.30.3](/compare/1.20.1-1.30.2...1.20.1-1.30.3) - 2026-04-11 19:53:57
6+
7+
8+
### Changed
9+
* Give Delayer its own energy consumption config separate from Proxy (#1641), Closes #1640
10+
411
<a name="1.20.1-1.30.2"></a>
5-
## [1.20.1-1.30.2](/compare/1.20.1-1.30.1...1.20.1-1.30.2) - 2026-03-28 09:55:51
12+
## [1.20.1-1.30.2](/compare/1.20.1-1.30.1...1.20.1-1.30.2) - 2026-03-28 09:55:51 +0100
613

714

815
### Added

CHANGELOG-1.21.1.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
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.32.4"></a>
5+
## [1.21.1-1.32.4](https://github.com/CyclopsMC/IntegratedDynamics/compare/1.21.1-1.32.3...1.21.1-1.32.4) - 2026-04-11 19:55:58
6+
7+
8+
### Changed
9+
* Give Delayer its own energy consumption config separate from Proxy (#1641), Closes #1640
10+
11+
### Fixed
12+
* Fix constant list Variable Card deserialization failure after world reload (#1639), Closes #1639
13+
414
<a name="1.21.1-1.32.3"></a>
5-
## [1.21.1-1.32.3](https://github.com/CyclopsMC/IntegratedDynamics/compare/1.21.1-1.32.2...1.21.1-1.32.3) - 2026-03-28 10:18:26
15+
## [1.21.1-1.32.3](https://github.com/CyclopsMC/IntegratedDynamics/compare/1.21.1-1.32.2...1.21.1-1.32.3) - 2026-03-28 10:18:26 +0100
616

717

818
### 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.20.0 or higher.
3+
4+
Changes:
5+
* Give Delayer its own energy consumption config separate from Proxy (#1641), Closes #1640
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.26.0 or higher.
3+
4+
Changes:
5+
* Give Delayer its own energy consumption config separate from Proxy (#1641), Closes #1640
6+
7+
Fixes:
8+
* Fix constant list Variable Card deserialization failure after world reload (#1639), Closes #1639

src/main/java/org/cyclops/integrateddynamics/GeneralConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public class GeneralConfig extends DummyConfigCommon<IntegratedDynamics> {
7575
public static int panelLightDynamicBaseConsumption = 0;
7676
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the static light panel.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
7777
public static int panelLightStaticBaseConsumption = 0;
78+
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the delayer.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
79+
public static int delayerBaseConsumption = 2;
7880
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the proxy.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
7981
public static int proxyBaseConsumption = 2;
8082
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the redstone reader.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)

src/main/java/org/cyclops/integrateddynamics/network/DelayNetworkElement.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import net.minecraft.resources.Identifier;
44
import org.cyclops.cyclopscore.datastructure.DimPos;
5+
import org.cyclops.integrateddynamics.GeneralConfig;
56
import org.cyclops.integrateddynamics.Reference;
67

78
/**
@@ -21,4 +22,9 @@ public Identifier getGroup() {
2122
return DelayNetworkElement.GROUP;
2223
}
2324

25+
@Override
26+
public int getConsumptionRate() {
27+
return GeneralConfig.delayerBaseConsumption;
28+
}
29+
2430
}

src/test/java/org/cyclops/integrateddynamics/core/evaluate/variable/TestValueTypeListProxyFactories.java

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package org.cyclops.integrateddynamics.core.evaluate.variable;
22

33
import com.google.common.collect.Lists;
4+
import net.minecraft.nbt.ByteArrayTag;
45
import net.minecraft.nbt.CompoundTag;
6+
import net.minecraft.nbt.IntArrayTag;
7+
import net.minecraft.nbt.LongArrayTag;
58
import org.cyclops.cyclopscore.helper.CyclopsCoreInstance;
69
import org.cyclops.integrateddynamics.ModBaseMocked;
710
import org.cyclops.integrateddynamics.api.evaluate.variable.IValueTypeListProxy;
@@ -63,6 +66,81 @@ public void testMaterialized() throws IValueTypeListProxyFactoryTypeRegistry.Ser
6366
));
6467
}
6568

69+
@Test
70+
public void testMaterializedIntegerListFromIntArrayTag() throws IValueTypeListProxyFactoryTypeRegistry.SerializationException {
71+
// Simulate codec round-trip: ListTag<IntTag> -> IntArrayTag (as done by Minecraft's NbtOps)
72+
ValueTypeListProxyMaterialized<?, ?> proxy = new ValueTypeListProxyMaterialized<>(
73+
ValueTypes.INTEGER,
74+
Lists.newArrayList(ValueTypeInteger.ValueInteger.of(42))
75+
);
76+
CompoundTag tag = serialize(o -> {
77+
try {
78+
ValueTypeListProxyFactories.REGISTRY.serialize(o, proxy);
79+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
80+
throw new RuntimeException(e);
81+
}
82+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
83+
tag.put("values", new IntArrayTag(new int[]{42}));
84+
IValueTypeListProxy<?, ?> proxyNew = deserialize(tag, valueInput -> {
85+
try {
86+
return ValueTypeListProxyFactories.REGISTRY.deserialize(valueInput);
87+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
88+
throw new RuntimeException(e);
89+
}
90+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
91+
assertThat(proxyNew, equalTo(proxy));
92+
}
93+
94+
@Test
95+
public void testMaterializedLongListFromLongArrayTag() throws IValueTypeListProxyFactoryTypeRegistry.SerializationException {
96+
// Simulate codec round-trip: ListTag<LongTag> -> LongArrayTag (as done by Minecraft's NbtOps)
97+
ValueTypeListProxyMaterialized<?, ?> proxy = new ValueTypeListProxyMaterialized<>(
98+
ValueTypes.LONG,
99+
Lists.newArrayList(ValueTypeLong.ValueLong.of(123L))
100+
);
101+
CompoundTag tag = serialize(o -> {
102+
try {
103+
ValueTypeListProxyFactories.REGISTRY.serialize(o, proxy);
104+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
105+
throw new RuntimeException(e);
106+
}
107+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
108+
tag.put("values", new LongArrayTag(new long[]{123L}));
109+
IValueTypeListProxy<?, ?> proxyNew = deserialize(tag, valueInput -> {
110+
try {
111+
return ValueTypeListProxyFactories.REGISTRY.deserialize(valueInput);
112+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
113+
throw new RuntimeException(e);
114+
}
115+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
116+
assertThat(proxyNew, equalTo(proxy));
117+
}
118+
119+
@Test
120+
public void testMaterializedBooleanListFromByteArrayTag() throws IValueTypeListProxyFactoryTypeRegistry.SerializationException {
121+
// Simulate codec round-trip: ListTag<ByteTag> -> ByteArrayTag (as done by Minecraft's NbtOps)
122+
ValueTypeListProxyMaterialized<?, ?> proxy = new ValueTypeListProxyMaterialized<>(
123+
ValueTypes.BOOLEAN,
124+
Lists.newArrayList(ValueTypeBoolean.ValueBoolean.of(true))
125+
);
126+
CompoundTag tag = serialize(o -> {
127+
try {
128+
ValueTypeListProxyFactories.REGISTRY.serialize(o, proxy);
129+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
130+
throw new RuntimeException(e);
131+
}
132+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
133+
tag.put("values", new ByteArrayTag(new byte[]{(byte) 1}));
134+
IValueTypeListProxy<?, ?> proxyNew = deserialize(tag, valueInput -> {
135+
try {
136+
return ValueTypeListProxyFactories.REGISTRY.deserialize(valueInput);
137+
} catch (IValueTypeListProxyFactoryTypeRegistry.SerializationException e) {
138+
throw new RuntimeException(e);
139+
}
140+
}, ValueDeseralizationContextMocked.get().holderLookupProvider());
141+
assertThat(proxyNew, equalTo(proxy));
142+
}
143+
66144
@Test
67145
public void testNbtKeys() throws IValueTypeListProxyFactoryTypeRegistry.SerializationException {
68146
testFactoryType(new ValueTypeListProxyNbtKeys(

0 commit comments

Comments
 (0)