Skip to content

Commit 24bd808

Browse files
committed
fix: 🐛 Fixed a crash that happened when magnet upgrade tried to pickup xp while the backpack was mounted on Create contraption
1 parent e56c00a commit 24bd808

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ org.gradle.daemon=false
33

44
mod_id=sophisticatedcore
55
mod_group_id=sophisticatedcore
6-
mod_version=1.2.75
6+
mod_version=1.2.76
77
sonar_project_key=sophisticatedcore:SophisticatedCore
88
github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedCore
99

src/main/java/net/p3pp3rf1y/sophisticatedcore/upgrades/magnet/MagnetUpgradeWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ private boolean tryToFillTank(ExperienceOrb xpOrb, @Nullable Entity entity, Leve
136136
xpOrb.value = 0;
137137
xpOrb.discard();
138138

139-
Player player = (Player) entity;
140-
141-
if (player != null) {
139+
if (entity instanceof Player player) {
142140
playXpPickupSound(world, player);
143141
}
144142

0 commit comments

Comments
 (0)