Rethrow caught throwable if unchecked before propagating
import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Throwables;
import com.google.common.reflect.TypeToken;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.player.AttackEntityEvent;
@@ -160,6 +161,7 @@ public boolean post(Event event, boolean forced) {
modListener.getTimingsHandler().stopTimingIfSync();
}
this.exceptionHandler.handleException((EventBus) (Object) this, event, listeners, index, throwable);
+ Throwables.throwIfUnchecked(throwable);
throw new RuntimeException(throwable);
}
return (event.isCancelable() ? event.isCanceled() : false);
