Skip to content

Commit ef20ff2

Browse files
committed
chore: 🔧 Fixed mounted storage closing at extended reach
1 parent 4036167 commit ef20ff2

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎gradle.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ loader_version_range=[4,)
1313
mod_id=sophisticatedcore
1414
mod_name=Sophisticated Core
1515
mod_license=All Rights Reserved
16-
mod_version=1.4.102
16+
mod_version=1.4.103
1717
mod_group_id=net.p3pp3rf1y
1818
mod_authors=P3pp3rF1y
1919
mod_description=A library / shared functionality mod for Sophisticated Storage and Backpacks

‎src/main/java/net/p3pp3rf1y/sophisticatedcore/compat/create/MountedStorageContainerMenuBase.java‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ public boolean detectSettingsChangeAndReload() {
146146

147147
@Override
148148
public boolean stillValid(Player player) {
149-
return getContraptionEntity().map(c -> {
150-
Vec3 localPosVec = Vec3.atCenterOf(localPos);
151-
Vec3 currentPos = c.toGlobalVector(localPosVec, 0);
152-
return c.isAlive() && player.distanceToSqr(currentPos) < (8 * 8);
153-
}).orElse(false);
149+
return getContraptionEntity().map(c -> c.isAlive() && player.isWithinEntityInteractionRange(c, 4.0F)).orElse(false);
154150
}
155151

156152
@Override

0 commit comments

Comments
 (0)