Skip to content

Commit 4598611

Browse files
committed
Chain crash fix
1 parent 191aaba commit 4598611

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

changelog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@
4848
- Chain drives NO LONGER HAVE GAPS between segments (this took way too long, but it's beautiful now)
4949
# 1.21.1-0.0.18
5050
- Changes:
51-
- Added item requirement for printing headlamps
51+
- Added item requirement for printing headlamps
52+
# 1.21.1-0.0.19
53+
- Fixes:
54+
- Fixed crash related to chains

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mod_name=Create Bits 'n' Bobs
3131
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3232
mod_license=MIT
3333
# The mod version. See https://semver.org/
34-
mod_version=0.0.18
34+
mod_version=0.0.19
3535
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3636
# This should match the base package used for the mod sources.
3737
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/com/kipti/bnb/content/cogwheel_chain/block/CogwheelChainBlockEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ public float getChainRotationFactor() {
225225
}
226226

227227
private void addPropogationLocationsFromController(final List<BlockPos> toPropagate, final BlockPos exclude) {
228-
assert chain != null;
229-
for (final var cogwheelNode : chain.getChainPathCogwheelNodes()) {
228+
if (chain == null) return;
229+
for (final PathedCogwheelNode cogwheelNode : chain.getChainPathCogwheelNodes()) {
230230
final BlockPos cogwheelPos = worldPosition.offset(cogwheelNode.localPos());
231231
if (!toPropagate.contains(cogwheelPos) && !cogwheelPos.equals(exclude)) {
232232
toPropagate.add(cogwheelPos);

0 commit comments

Comments
 (0)