Skip to content

Commit

Permalink
Fix Barrier entity causing server side launch crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltMolnarrr committed Mar 31, 2024
1 parent ea0bb3c commit cb1172d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.2

- Fix Barrier entity causing server side launch crash

# 1.1.1

- Fix Aeternium claymore texture gaps
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fabric_api_version=0.87.0+1.20.1
# Mod
maven_group=net
archives_base_name=paladins
mod_version=1.1.1
mod_version=1.1.2

# Dependencies
trinkets_version=3.7.2
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/paladins/entity/BarrierEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import net.spell_engine.api.entity.TwoWayCollisionChecker;
import net.spell_engine.api.spell.Spell;
import net.spell_engine.internals.SpellRegistry;
import net.spell_engine.utils.SoundPlayerWorld;
import net.spell_engine.utils.TargetHelper;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -170,12 +171,11 @@ public void tick() {
if (spell == null) {
return;
}
if (this.getWorld().isClient()) {
var world = this.getWorld();
if (world.isClient()) {
// Client
if (!idleSoundFired) {
var clientWorld = (ClientWorld) this.getWorld();
var player = MinecraftClient.getInstance().player;
clientWorld.playSoundFromEntity(player, this, idleSound, SoundCategory.PLAYERS, 1F, 1F);
((SoundPlayerWorld)world).playSoundFromEntity(this, idleSound, SoundCategory.PLAYERS, 1F, 1F);
idleSoundFired = true;
}
} else {
Expand Down

0 comments on commit cb1172d

Please sign in to comment.