Skip to content

Commit

Permalink
shields blocking explosions has been moved to nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
Inf1nityy committed Aug 20, 2024
1 parent 809d373 commit 7977015
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main/java/com/nexia/core/mixin/player/PlayerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,4 @@ private void getAttackDelay(CallbackInfoReturnable<Integer> cir) {
public boolean setSprintFix(boolean par1) {
return ((CoreSavedPlayerData)PlayerDataManager.getDataManager(NexiaCore.CORE_DATA_MANAGER).get(this.getUUID()).savedData).isSprintFix();
}

@Inject(method = "hurt", at = @At("HEAD"), cancellable = true)
public void shieldBlockExplosion(DamageSource damageSource, float f, CallbackInfoReturnable<Boolean> cir) {
if (damageSource.isExplosion() && this.useItem.getItem() == Items.SHIELD) {
this.hurtCurrentlyUsedShield(f);
cir.setReturnValue(false);
}
}
}

0 comments on commit 7977015

Please sign in to comment.