Skip to content

Commit

Permalink
Fix console spam when cancelling AttackEntityEvents on paintings. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JBYoshi committed Mar 17, 2018
1 parent b7eadd1 commit 33ab423
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -90,7 +90,7 @@ public void readFromNbt(NBTTagCompound compound) {
}
}

@Inject(method = "attackEntityFrom", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/EntityHanging;setDead()V"))
@Inject(method = "attackEntityFrom", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/EntityHanging;setDead()V"), cancellable = true)
private void onAttackEntityFrom(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
try (CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
frame.pushCause(source);
Expand Down

0 comments on commit 33ab423

Please sign in to comment.